Skip to content

Commit

Permalink
Modified the script to check the graph isomorphism to not have a hard…
Browse files Browse the repository at this point in the history
…-coded 265 number of directories.
  • Loading branch information
kumaranu committed Apr 16, 2024
1 parent c2713ed commit 52d91d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/check_graph_iso.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import glob
import os
from ase.io import read
from pymatgen.io.ase import AseAtomsAdaptor
Expand Down Expand Up @@ -70,7 +71,8 @@ def compare_mols(molecule_1, molecule_2) -> bool:


def check_graph_iso(ref_dir):
for i in range(265):
num_directories = len(glob.glob(ref_dir + '/???/'))
for i in range(num_directories):
logdir = os.path.join(ref_dir, f'{i:03}')
if os.path.exists(logdir):
reactant_traj_file = os.path.join(logdir, 'reactant_opt.traj')
Expand Down Expand Up @@ -100,6 +102,6 @@ def check_graph_iso(ref_dir):


if __name__ == '__main__':
# ref_dir = '/global/cfs/cdirs/m2834/kumaranu/neb_nn_inputs'
ref_dir = '/home/kumaranu/Downloads/neb_nn_inputs'
ref_dir = '/global/cfs/cdirs/m2834/kumaranu/neb_nn_inputs'
#ref_dir = '/home/kumaranu/Downloads/neb_nn_inputs'
check_graph_iso(ref_dir)

0 comments on commit 52d91d2

Please sign in to comment.