Dear David, Dear Peter,
Thank you very much for your constructive hints.
As you suggested, I initiated the polymers far from the constraint and the issue is solved.
This is the consequence of all forces being capped. Then, there is a finite energy needed to cross the barrier, and hence finite probability that this happens during the warmup. The same situation occurs when warming up a polymer with FENE bonds.
Tweaking the warmup loop will not solve the problem, it will only decrease the probability that this happens.
If you set penetrable=true, then you will have to ensure that all particles are within the pore after you set penetrable=false.
What helps is setting up the polymer well inside the pore, and avoiding warmup and replacing it e.g. by steepest descent energy minimization.
My guess is that that the particles crossed the pore constraint during
the warmup phase. Try visualizing what happens right before/after the
error to confirm this.
Normally, the LJ interaction you have should not allow the particles
to cross the constraint. However, during the warmup there is an LJ cap
that reduces the repulsion between the particles and the wall. This
opens a short window of opportunity for the crossing that I think
occurs. There are many ways around this issue depending on what you
want, for example:
i) Consider having the flag penetrable=True to stop the simulation
from halting when this occurs (set it to to penetrable=False after
you've finished the warmup)
ii) Init the polymer far from the pore
iii) Init the polymer as a SAW
iv) Tweak the warmup loop (rate at which the cap rises)
v) Add the pore AFTER the polymer warmup
Le mar. 12 nov. 2019 à 09:11, Ahmad Reza Motezakker <address@hidden> a écrit :
> Dear EspressoMD users,
> I am trying to simulate couple of polymer chains with SimplePore constraint. There is LJ interaction between the particles.
> During the warmup process, I face "constraint violated by particle".
> Could you pleas help me to get over this Error?
> A part of my code is attached to this email. Thank you in Advance.
> Best Regards,
> Ahmad Reza
Dr. Peter Košovan
Department of Physical and Macromolecular Chemistry
Faculty of Science, Charles University in Prague, Czech Republic
Katedra fyzikální a makromolekulární chemie
Přírodovědecká fakulta Univerzity Karlovy v Praze