File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -142,21 +142,3 @@ def is_valid_poscar(filename: str, directory: str = "./") -> bool:
142142 except Exception as exc :
143143 logger .warning (f"{ filename } could not be parsed: { exc } " )
144144 return False
145-
146-
147- def copy_contcar_to_poscar_if_valid (directory : str = "./" ) -> list [dict ]:
148- """Return action to copy CONTCAR to POSCAR only if CONTCAR is valid.
149-
150- This prevents copying incomplete CONTCAR files that may result from
151- terminating VASP mid-write.
152-
153- Args:
154- directory: Directory containing CONTCAR
155-
156- Returns:
157- List containing the copy action if CONTCAR is valid, empty list otherwise.
158- """
159- if is_valid_poscar ("CONTCAR" , directory ):
160- return [{"file" : "CONTCAR" , "action" : {"_file_copy" : {"dest" : "POSCAR" }}}]
161- logger .warning ("CONTCAR is not valid, skipping copy to POSCAR" )
162- return []
You can’t perform that action at this time.
0 commit comments