@@ -89,7 +89,8 @@ TEST_F(IonsMoveCGTest, TestStartConverged)
8989 GlobalV::ofs_running.close ();
9090
9191 // Check output
92- std::string expected_output = " largest force is 0, no movement is possible.\n it may converged, otherwise no "
92+ std::string expected_output = " \n Largest gradient in force is 0 eV/A.\n Threshold is -1 eV/A.\n "
93+ " largest force is 0, no movement is possible.\n it may converged, otherwise no "
9394 " movement of atom is allowed.\n end of geometry optimization\n "
9495 " istep = 1\n update iteration = 5\n " ;
9596 std::ifstream ifs (" log" );
@@ -122,7 +123,8 @@ TEST_F(IonsMoveCGTest, TestStartSd)
122123 GlobalV::ofs_running.close ();
123124
124125 // Check output
125- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
126+ std::string expected_output = " \n Largest gradient in force is 0.257111 eV/A.\n Threshold is -1 eV/A.\n\n "
127+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
126128 std::ifstream ifs (" log" );
127129 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
128130 ifs.close ();
@@ -159,7 +161,8 @@ TEST_F(IonsMoveCGTest, TestStartTrialGoto)
159161 GlobalV::ofs_running.close ();
160162
161163 // Check output
162- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
164+ std::string expected_output = " \n Largest gradient in force is 0.0257111 eV/A.\n Threshold is -1 eV/A.\n\n "
165+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
163166 std::ifstream ifs (" log" );
164167 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
165168 ifs.close ();
@@ -195,7 +198,8 @@ TEST_F(IonsMoveCGTest, TestStartTrial)
195198 GlobalV::ofs_running.close ();
196199
197200 // Check output
198- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
201+ std::string expected_output = " \n Largest gradient in force is 0.257111 eV/A.\n Threshold is -1 eV/A.\n\n "
202+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
199203 std::ifstream ifs (" log" );
200204 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
201205 ifs.close ();
@@ -233,7 +237,8 @@ TEST_F(IonsMoveCGTest, TestStartNoTrialGotoCase1)
233237 GlobalV::ofs_running.close ();
234238
235239 // Check output
236- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
240+ std::string expected_output = " \n Largest gradient in force is 0.0257111 eV/A.\n Threshold is -1 eV/A.\n\n "
241+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
237242 std::ifstream ifs (" log" );
238243 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
239244 ifs.close ();
@@ -270,7 +275,8 @@ TEST_F(IonsMoveCGTest, TestStartNoTrialGotoCase2)
270275 GlobalV::ofs_running.close ();
271276
272277 // Check output
273- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
278+ std::string expected_output = " \n Largest gradient in force is 0.257111 eV/A.\n Threshold is -1 eV/A.\n\n "
279+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
274280 std::ifstream ifs (" log" );
275281 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
276282 ifs.close ();
@@ -308,7 +314,8 @@ TEST_F(IonsMoveCGTest, TestStartNoTrial)
308314 GlobalV::ofs_running.close ();
309315
310316 // Check output
311- std::string expected_output = " \n Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
317+ std::string expected_output = " \n Largest gradient in force is 0.0257111 eV/A.\n Threshold is -1 eV/A.\n\n "
318+ " Ion relaxation is not converged yet (threshold is 0.0257111)\n " ;
312319 std::ifstream ifs (" log" );
313320 std::string output ((std::istreambuf_iterator<char >(ifs)), std::istreambuf_iterator<char >());
314321 ifs.close ();
0 commit comments