Skip to content

Commit

Permalink
Added docs for the main file called test1.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumaranu committed May 15, 2024
1 parent 7ddf57c commit 39b0662
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/test1.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@

import sys
import ase
import toml
from neb_wrapper import run_neb_method


if __name__ == "__main__":
with open(sys.argv[1], 'r') as f:
def main(config_file: str) -> None:
"""
Run NEB method using the provided configuration file.
Args:
config_file (str): Path to the configuration file.
"""
with open(config_file, 'r') as f:
inputs = toml.load(f)

input_sets = inputs['input_sets']
logdir = inputs['input_paths']['logdir']

for input_set in input_sets:
optimizer_name = input_set['optimizer']
Expand All @@ -28,3 +32,11 @@
N_intermediate=inputs['geodesic_inputs']['N_intermediate'],
)


if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python script.py config_file.toml")
sys.exit(1)

config_file = sys.argv[1]
main(config_file)

0 comments on commit 39b0662

Please sign in to comment.