Skip to content

Commit 20cefaf

Browse files
Remove unused copy_contcar_to_poscar_if_valid function (#420)
In #416, a utility function `copy_contcar_to_poscar_if_valid` was added, but it is unused. We should remove the unused code to prevent bloat.
1 parent 905fec1 commit 20cefaf

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/custodian/vasp/utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff 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 []

0 commit comments

Comments
 (0)