michellab / BioSimSpace

Code and resources for the EPSRC BioSimSpace project.
https://biosimspace.org
GNU General Public License v3.0
77 stars 19 forks source link

Setting custom config, does not update process info in print out? #56

Closed ppxasjsm closed 5 years ago

ppxasjsm commented 5 years ago

If I set the following code:

protocol = BSS.Protocol.Equilibration()
process = BSS.Process.Amber(equ2, protocol, name="equ3", work_dir=w_dir, exe=exe)
process.setConfig(node.getInput("step3"))
prc_info = process.start()

prc_info contains the following information:

BioSimSpace.Process.Amber(<BioSimSpace.System: nMolecules=4047>, BioSimSpace.Protocol.Equilibration(timestep=2.0000 fs, runtime=0.2000 ns, temperature_start=300.0000 K, temperature_end=300.0000 K, frames=20, ensemble='NVT', restrain_backbone=False), exe='/home/ppxasjsm/Software/amber18/bin/sander', name='equ3', work_dir='/home/ppxasjsm/Projects/People/Conformational_analysis/eq3', seed=None)

the actual input file looks like this:

&cntrl
 ig=-1,  imin=0, ntr=1, nstlim=1000, dt=0.002, ntb=2, ntp=1, ntt=3, gamma_ln=0.2, ntf=2, ntc=2, temp0=318, tempi=0, restraint_wt=5, restraintmask="!:WAT",
 /

Clearly the temperature should be 318K and not 300. Is this because I should be using custom protocol instead?

lohedges commented 5 years ago

Yes, I don't think I've implemented the print formatting for a Custom protocol. Will take a look this afternoon.

Cheers.

On Wed, 27 Feb 2019, 09:22 ppxasjsm, notifications@github.com wrote:

If I set the following code:

protocol = BSS.Protocol.Equilibration() process = BSS.Process.Amber(equ2, protocol, name="equ3", work_dir=w_dir, exe=exe) process.setConfig(node.getInput("step3")) prc_info = process.start()

prc_info contains the following information:

BioSimSpace.Process.Amber(, BioSimSpace.Protocol.Equilibration(timestep=2.0000 fs, runtime=0.2000 ns, temperature_start=300.0000 K, temperature_end=300.0000 K, frames=20, ensemble='NVT', restrain_backbone=False), exe='/home/ppxasjsm/Software/amber18/bin/sander', name='equ3', work_dir='/home/ppxasjsm/Projects/People/Conformational_analysis/eq3', seed=None)

the actual input file looks like this:

&cntrl ig=-1, imin=0, ntr=1, nstlim=1000, dt=0.002, ntb=2, ntp=1, ntt=3, gamma_ln=0.2, ntf=2, ntc=2, temp0=318, tempi=0, restraint_wt=5, restraintmask="!:WAT", /

Clearly the temperature should be 318K and not 300. Is this because I should be using custom protocol instead?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/michellab/BioSimSpace/issues/56, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnlbajU4i0g-AL1mVbtLVeZ9AwFjYRwks5vRk5qgaJpZM4bUEC6 .

lohedges commented 5 years ago

When you customise the protocol there's no easy way to copy the updated values back into the original Protocol object, which is used to generate the print output.

I'll try to think of a way to do this. If you make simple changes to an existing protocol then it would be easy, e.g. changing the temperature for an equilibration, since we could search for keywords. However, as it's possible to change the protocol to literally anything it's quite likely that it will no longer match the template of any existing Protocol objects. Perhaps it should just print something like "custom" in this case.

lohedges commented 5 years ago

I've now updated the code so that BioSimSpace.Protocol.Custom is printed when the protocol is modified. I'll try to come up with a more elegant way of fixing this.