@@ -42,10 +42,16 @@ namespace dftfe
4242 initializeSSDPtr (std::string XCType,
4343 std::shared_ptr<xc_func_type> funcXPtr,
4444 std::shared_ptr<xc_func_type> funcCPtr,
45- std::string modelXCInputFile)
45+ std::string modelXCInputFile,
46+ bool printXCInfo)
4647 {
4748 dftfe::Int exceptParamX = -1 , exceptParamC = -1 ;
4849
50+ int vmajor, vminor, vmicro;
51+ xc_version (&vmajor, &vminor, &vmicro);
52+ if (printXCInfo)
53+ printf (" Libxc version: %d.%d.%d\n " , vmajor, vminor, vmicro);
54+
4955 std::shared_ptr<ExcSSDFunctionalBaseClass<memorySpace>> excObj;
5056 if (XCType == " LDA-PZ" )
5157 {
@@ -77,6 +83,7 @@ namespace dftfe
7783 xc_func_init (funcXPtr.get (), XC_GGA_X_PBE , XC_POLARIZED );
7884 exceptParamC =
7985 xc_func_init (funcCPtr.get (), XC_GGA_C_PBE , XC_POLARIZED );
86+
8087 excObj = std::make_shared<excDensityGGAClass<memorySpace>>(funcXPtr,
8188 funcCPtr);
8289 }
@@ -159,6 +166,22 @@ namespace dftfe
159166 exit (-1 );
160167 }
161168 }
169+
170+ if (printXCInfo)
171+ {
172+ for (int i = 0 ; i < 1 ; i++)
173+ if (funcXPtr->info ->refs [i] != NULL )
174+ printf (" X Functional: %s (DOI %s)\n " ,
175+ funcXPtr->info ->refs [i]->ref ,
176+ funcXPtr->info ->refs [i]->doi );
177+
178+ for (int i = 0 ; i < 1 ; i++)
179+ if (funcCPtr->info ->refs [i] != NULL )
180+ printf (" C Functional: %s (DOI %s)\n " ,
181+ funcCPtr->info ->refs [i]->ref ,
182+ funcCPtr->info ->refs [i]->doi );
183+ }
184+
162185 return excObj;
163186 }
164187 } // namespace
@@ -196,7 +219,8 @@ namespace dftfe
196219 void
197220 excManager<memorySpace>::init(std::string XCType,
198221 bool isSpinPolarized,
199- std::string modelXCInputFile)
222+ std::string modelXCInputFile,
223+ const bool printXCInfo)
200224 {
201225 clear ();
202226
@@ -223,15 +247,13 @@ namespace dftfe
223247 d_excObj =
224248 std::make_shared<ExcDFTPlusU<dataTypes::number, memorySpace>>(
225249 initializeSSDPtr<memorySpace>(
226- XCInput, d_funcXPtr, d_funcCPtr, modelXCInputFile),
250+ XCInput, d_funcXPtr, d_funcCPtr, modelXCInputFile, printXCInfo ),
227251 numSpin);
228252 }
229253 else
230254 {
231- d_excObj = initializeSSDPtr<memorySpace>(XCType,
232- d_funcXPtr,
233- d_funcCPtr,
234- modelXCInputFile);
255+ d_excObj = initializeSSDPtr<memorySpace>(
256+ XCType, d_funcXPtr, d_funcCPtr, modelXCInputFile, printXCInfo);
235257 }
236258 }
237259
0 commit comments