Skip to content

Commit

Permalink
Fix restart simulation for GaWTM-eABF
Browse files Browse the repository at this point in the history
  • Loading branch information
fhh2626 committed Apr 29, 2023
1 parent 2ce5860 commit c2b7859
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
5 changes: 1 addition & 4 deletions BFEE2/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1667,10 +1667,7 @@ def f():
QMessageBox.warning(self, 'Error',
f'\
The feature of using GaWTM-eABF as the workhorse engine is \
experimental! Known issues:\n \
The config files for extending GaWTM-eABF simulations \
will do pre-equilibration again. This may cause some errors. \
One can revise the config file manually to avoid it'
experimental! Please always use the latest devel version of NAMD!\n'
)

try:
Expand Down
25 changes: 20 additions & 5 deletions BFEE2/templates_namd/configTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ def namdConfigTemplate(
configString += f'\
colvarsConfig {cvFile} \n'

if CVRestartFile != '':
configString += f'\
if CVRestartFile != '':
configString += f'\
colvarsInput {CVRestartFile} \n'


Expand All @@ -211,13 +211,16 @@ def namdConfigTemplate(
configString += f'\
accelMD on \n\
accelMDG on \n\
accelMDdihe on \n\
accelMDOutFreq 1000 \n\
accelMDGSigma0D 6.0 \n'
if CVRestartFile == '':
# new GaMD-WTM-eABF simulation
configString += f'\
accelMDGcMDSteps 500000 \n\
accelMDGcMDPrepSteps 100000 \n\
accelMDGEquiPrepSteps 100000 \n\
accelMDGEquiSteps 500000 \n\
accelMDdihe on \n\
accelMDOutFreq 1000 \n\
accelMDGSigma0D 6.0 \n\
for {{set stage 0}} {{$stage < 2}} {{incr stage}} {{ \n\
if {{$stage == 0}} {{ \n\
puts "Probing the GaMD parameters..." \n\
Expand All @@ -230,6 +233,18 @@ def namdConfigTemplate(
run norepeat {numSteps} \n\
}} \n\
}} \n'
else:
configString += f'\
accelMDGcMDSteps 0 \n\
accelMDGcMDPrepSteps 0 \n\
accelMDGEquiPrepSteps 0 \n\
accelMDGEquiSteps 0 \n\
accelMDGRestart on \n\
accelMDGRestartFile {CVRestartFile}.gamd \n\
colvarsConfig {cvFile + ".amd"} \n\
colvarsInput {CVRestartFile} \n\
run norepeat {numSteps} \n'

else:
# currently the alchemical route is somewhat hard-coded
# this will be improved in the future
Expand Down
2 changes: 1 addition & 1 deletion unitTest/userDefinedPath.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VMDPATH = r'C:/Program Files/VMD/vmd.exe'
VMDPATH = r'D:/Program Files (x86)/University of Illinois/VMD/vmd.exe'
UNITTESTPATH = r'D:/Users/fhh26/Documents/GitHub/BFEE2/unitTest'

0 comments on commit c2b7859

Please sign in to comment.