@@ -145,15 +145,19 @@ def test_dump_spin(self):
1451455.499851012568 4.003388899277 5.342621842622 0 0 0 mag 3.000000000000 3.000000000000 3.000000000000
146146"""
147147 self .assertTrue (stru_ref in c )
148-
148+
149149 def test_dump_move_from_vasp (self ):
150150 self .system = dpdata .System ()
151151 self .system .from_vasp_poscar (os .path .join ("poscars" , "POSCAR.oh.c" ))
152- self .system .to ("abacus/stru" , "STRU_tmp" )
152+ self .system .to (
153+ "abacus/stru" ,
154+ "STRU_tmp" ,
155+ pp_file = {"O" : "O.upf" , "H" : "H.upf" },
156+ )
153157 assert os .path .isfile ("STRU_tmp" )
154158 with open ("STRU_tmp" ) as f :
155159 c = f .read ()
156-
160+
157161 stru_ref = """O
1581620.0
1591631
@@ -164,12 +168,17 @@ def test_dump_move_from_vasp(self):
1641681.262185604418 0.701802783513 0.551388341420 0 0 0
165169"""
166170 self .assertTrue (stru_ref in c )
167-
168- self .system .to ("abacus/stru" , "STRU_tmp" , move = [[True , False , True ], [False , True , False ]])
171+
172+ self .system .to (
173+ "abacus/stru" ,
174+ "STRU_tmp" ,
175+ pp_file = {"O" : "O.upf" , "H" : "H.upf" },
176+ move = [[True , False , True ], [False , True , False ]],
177+ )
169178 assert os .path .isfile ("STRU_tmp" )
170179 with open ("STRU_tmp" ) as f :
171180 c = f .read ()
172-
181+
173182 stru_ref = """O
1741830.0
1751841
@@ -180,9 +189,7 @@ def test_dump_move_from_vasp(self):
1801891.262185604418 0.701802783513 0.551388341420 0 1 0
181190"""
182191 self .assertTrue (stru_ref in c )
183-
184-
185-
192+
186193
187194class TestABACUSParseStru (unittest .TestCase ):
188195 def test_parse_stru_post (self ):
0 commit comments