Skip to content

Commit

Permalink
apply cfg mdrun.maxthreads also to mdpow.run() pipeline
Browse files Browse the repository at this point in the history
- fix issue #119
- helps with #126
- NOTE: -nt maxthreads is propagated to gromacs.setup.energy_minimization()
  which might fail with minimizers that are not parallelized. NOT TESTED.
  • Loading branch information
orbeckst committed Jan 25, 2021
1 parent 1f471a9 commit 0e37d11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ orbeckst, VOD555
found. Either supply the name of the right checkpoint file or do not use
-append": mdpow.run.runMD_or_exit() does not anymore add -append to GROMACS
invocation (#128)
* Configuration setting mdrun.maxthreads now also applies to energy
minimization with mdpow-equilibrium.py/mdpow.run() (#119)


2017-05-02 0.6.1
Expand Down
3 changes: 2 additions & 1 deletion mdpow/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,12 @@ def equilibrium_simulation(cfg, solvent, **kwargs):
if S.journal.has_not_completed("energy_minimize"):
maxwarn = cfg.getint("setup", "maxwarn") or None
prm = cfg.get("setup", "prm") or None
maxthreads = cfg.get('mdrun', 'maxthreads') or None,
S.topology(itp=cfg.getpath("setup", "itp"), prm=prm)
S.solvate(struct=cfg.getpath("setup", "structure"),
bt=cfg.get("setup", "boxtype"),
maxwarn=maxwarn)
S.energy_minimize(maxwarn=maxwarn)
S.energy_minimize(maxwarn=maxwarn, mdrun_args={'nt': maxthreads})
checkpoint('energy_minize', S, savefilename)
else:
logger.info("Fast-forwarding: setup + energy_minimize done")
Expand Down

1 comment on commit 0e37d11

@Ntr9999
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to delete the "," after None in this line:
maxthreads = cfg.get('mdrun', 'maxthreads') or None,

Apologies if not.
But it works when I changed that manually.

Please sign in to comment.