Improve argument handling and clean up unecessary files

This commit is contained in:
cryobry
2019-07-07 23:23:46 -04:00
parent 7c4d34f9bf
commit 9d1747fc9a
12 changed files with 9466 additions and 516 deletions

27
run_simulation.py Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env python3
from auto_namd.functions import *
from auto_namd.job import get_next_job
def main(**kwargs):
while True:
job = get_next_job(kwargs['jobs_path'])
job.simulate(kwargs['ffs_path'], kwargs['steps'], kwargs['namdbin'], kwargs['params'])
if __name__ == '__main__':
# Defaults
args = {
'jobs_path': ['/home/bryan/MD/CFTR/4-jobs', 'Number of timesteps to run'],
'ffs_path': ['/home/bryan/MD/CFTR/0-forcefields', 'Location of the forcefield files'],
'steps': [1000000, 'Number of timesteps to run the simulation'],
'namdbin': ['namd2', 'Location of the namd2 executable'],
'params': [f'+p{os.cpu_count() - 1}', 'Optional namd parameters']
}
# Override defaults with user input
args = sim_parser(args)
main(**args)