Skip to content

Commit 4a3d067

Browse files
lllangWVshyueppre-commit-ci[bot]mkhortonAndrew-S-Rosen
authored
Fix file existence check in ChargemolAnalysis to verify directory instead. (#4226)
* Fix file existence check in ChargemolAnalysis to verify directory instead of file. atomic_densities dir for chargemold is a dir not a file. * pre-commit auto-fixes --------- Co-authored-by: Shyue Ping Ong <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Matthew Horton <[email protected]> Co-authored-by: Andrew S. Rosen <[email protected]>
1 parent c71ae6f commit 4a3d067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pymatgen/command_line/chargemol_caller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def _write_jobscript_for_chargemol(
387387
"The DDEC6_ATOMIC_DENSITIES_DIR environment variable must be set or the atomic_densities_path must"
388388
" be specified"
389389
)
390-
if not os.path.isfile(atomic_densities_path):
390+
if not os.path.isdir(atomic_densities_path):
391391
raise FileNotFoundError(f"{atomic_densities_path=} does not exist")
392392

393393
# This is to fix a Chargemol filepath nuance

0 commit comments

Comments
 (0)