espressopp icon indicating copy to clipboard operation
espressopp copied to clipboard

RATTLE error

Open eduardodinizRO opened this issue 6 years ago • 1 comments

Hello! I've noticed that the fadrres_protein example for explaining how to setup an adress simulation of a protein in espressopp wasn't constraining hydrogen-heavyAtoms bonds in the protein. As I saw in documentation espressopp provides RATTLE algorithm for that. Then I added the following lines to the ubiquitin.py script:

rattle = espressopp.integrator.Rattle(system, maxit = 1000, tol = 1e-6, rptol = 1e-6) pidlist = range(1,nProtAtoms+1) hydrogenIDs, constrainedBondsDict, constrainedBondsList = espressopp.tools.findConstrainedBonds(pidlist, atBondtypes,bondtypeparams, atMasses, massCutoff = 1.1) rattle.addConstrainedBonds(constrainedBondsList) integrator.addExtension(rattle)

and when a launched the parallel run it gaves the following error:

import espressopp File "/home/eduardo/espressopp-1.9.5/espressopp/init.py", line 73, in pmi.startWorkerLoop() File "/home/eduardo/espressopp-1.9.5/espressopp/pmi.py", line 659, in startWorkerLoop receive() File "/home/eduardo/espressopp-1.9.5/espressopp/pmi.py", line 887, in receive return cmd_func(*args, **kwds) File "/home/eduardo/espressopp-1.9.5/espressopp/pmi.py", line 400, in __workerCall return function(*args, **kwds) File "/home/eduardo/espressopp-1.9.5/espressopp/pmi.py", line 1102, in call return self.method(*args, **kwds) File "/home/eduardo/espressopp-1.9.5/espressopp/integrator/MDIntegrator.py", line 58, in run return self.cxxclass.run(self, niter) RuntimeError: In Rattle, cannot find light particle 1155, all light and heavy particles in a group of rigid bonds must be on the same node

When I tried running in serial it worked without this error.

Another thing is: this ubiquitin.py script provided with espressopp can work apparently normally with a time step of dt=0.001 without using some algorithm for restraining the hydrogen-heavyAtoms bonds of the protein, which immediatly would give an error if I were simulating in ,for example, gromacs. So if the user is not careful he won't notice this issue.

I would appreciate if anyone could help me! Thank you

Eduardo

eduardodinizRO avatar Aug 02 '18 19:08 eduardodinizRO

Hi Eduardo,

The RATTLE algorithm as implemented in espressopp only works if all the heavy and light atoms in a group of rigid bonds are on the same node. One way to achieve this is to group all the heavy and light atoms together in an AdResS tuple. You can read about it in the documentation here: http://espressopp.github.io/espressopp.integrator.Rattle.html, "Note: At the moment, the RATTLE implementation only works if all atoms in an isolated group of rigid bonds are on the same CPU. This can be achieved by grouping all the particles using DomainDecompositionAdress and FixedTupleListAdress."

The documentation link I just mentioned doesn't give an example of how to set up the AdResS tuples, but you can find this in the ubiquitin.py script, I hope.

However, setting up an entire AdResS simulation just to use RATTLE might be overkill for your case...

As for running with a time step of dt=0.001 without using some algorithm for restraining the hydrogen-heavyAtoms bonds, I don't think we should raise an error in this case. There's no computational error. One could argue that the user is making an error of judgement (1 fs + no constraints = bad scientific practice in many cases) but every user is free to choose whatever time step he wants, whether that's 0.1 fs or 20 fs ;) And there are use cases where 1 fs + no constraints + very strong thermostat may be perfectly fine for whatever properties the user wants to calculate... that's up to him to decide. I would argue that espressopp doesn't make those decisions.

acfogarty avatar Aug 27 '18 17:08 acfogarty