Closed nyubachi closed 4 months ago
Hi @nyubachi,
Sorry for the delay. I've reviewed the code and confirmed that the checkpoint is being saved correctly.
##################################
# Writing last frame information of stride
print("\n> Writing state file (" + str(rst_file) + ")...")
state = simulation.context.getState( getPositions=True, getVelocities=True )
with open(rst_file, 'w') as f:
f.write(XmlSerializer.serialize(state))
last_frame = int(nsteps/nsavcrd)
print("> Writing coordinate file (" + str(pdb_file) + ", frame = " + str(last_frame) + ")...")
positions = simulation.context.getState(getPositions=True).getPositions()
PDBFile.writeFile(simulation.topology, positions, open(pdb_file, 'w'))
print("\n> Finished!\n")
The main correction was made to the log statements to ensure the right message about file saving is provided to the user. I've applied the changes to the file
Thank you.
Hello,
I salute you all for your excellent efforts.
On a very minor point, for example, in the file "Protein_ligand.ipynb", in "Runs a Production MD simulation (NPT ensemble) after equilibration", the following code
I was a little concerned that the checkpoint frequency is "savcrd_freq". This may need to be corrected, as I feel that checkpoints are actually created for each stride.
Best regards,
nyubachi