@@ -79,11 +79,8 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
7979 const K_Vectors& kv_in,
8080 const TwoCenterBundle& two_center_bundle,
8181 const LCAO_Orbitals& orb,
82- elecstate::DensityMatrix<TK, double >* DM_in
83- #ifdef __MLALGO
84- ,
85- LCAO_Deepks<TK>* ld_in
86- #endif
82+ elecstate::DensityMatrix<TK, double >* DM_in,
83+ DeePKS<TK> &deepks
8784#ifdef __EXX
8885 ,
8986 const int istep,
@@ -214,7 +211,7 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
214211 &orb,
215212 this ->kv ->get_nks (),
216213 DM_in,
217- ld_in );
214+ deepks. ld );
218215 this ->getOperator ()->add (deepks);
219216 this ->V_delta_R = dynamic_cast <DeePKS<OperatorLCAO<TK, TR>>*>(deepks)->get_V_delta_R ();
220217 }
@@ -330,7 +327,7 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
330327#ifdef __MLALGO
331328 if (PARAM.inp .deepks_scf )
332329 {
333- Operator<TK>* deepks = new DeePKS<OperatorLCAO<TK, TR>>(this ->hsk ,
330+ Operator<TK>* deepks_op = new DeePKS<OperatorLCAO<TK, TR>>(this ->hsk ,
334331 this ->kv ->kvec_d ,
335332 hR,
336333 &ucell,
@@ -339,9 +336,9 @@ HamiltLCAO<TK, TR>::HamiltLCAO(Gint_Gamma* GG_in,
339336 &orb,
340337 this ->kv ->get_nks (),
341338 DM_in,
342- ld_in );
343- this ->getOperator ()->add (deepks );
344- this ->V_delta_R = dynamic_cast <DeePKS<OperatorLCAO<TK, TR>>*>(deepks )->get_V_delta_R ();
339+ deepks. ld );
340+ this ->getOperator ()->add (deepks_op );
341+ this ->V_delta_R = dynamic_cast <DeePKS<OperatorLCAO<TK, TR>>*>(deepks_op )->get_V_delta_R ();
345342 }
346343#endif
347344 // TDDFT_velocity_gauge
0 commit comments