[lammps-users] several questions in npt simulation of rod-coil polymers and typo in the document of fix rigid

Hi LAMMPS users,

I would like to simulate a system of rod-coil copolymers. With Axel,s help, I can manage to simulate the system with NPT (iso). However, when I checked the output, I found the pressure is a little bit off from the target pressure by 0.5 (LJ unit) in average consistently. In my simulation, I have used fix rigid/nvt for rod parts and fix npt dilate partial for coil parts. Could any one tell me why the pressure is off from the target pressure? Thank you in advance.

Second question: Since I expect the lamellae formation, I would like to do NPT simulations to allow dimensions to change independently with fix npt tri option. I set up my simulation in equilibration mode and production mode sequentially by:

dump 1 all atom 10000 eq.T${t2}P${pf}.lammpstrj
dump_modify 1 scale no
run 200000 ##### equilibration
undump 1
dump 1 all atom 10000 prod.T${t2}P${pf}.lammpstrj
dump_modify 1 scale no
run 300000 #######production

However, the simulation would crash after the equilibration. The error message is" ERROR: Fix rigid: Bad principal moments". Then I try to extend the equilibration time, it works fine til the production mode. I checked the source code and found that LAMMPS might check the principal moments by init() in fix_rigid.cpp when starting to run the production. If it is important to check the principal moments, I am wondering why it is checked only once by init(). If the principal moments go bad during simulations, should I worry about it?

PS: if anyone would like to debug it, I have prepared all files and am more than happy to give it to you.

Typo: at http://lammps.sandia.gov/doc/fix_rigid.html
keyword = temp or press or tparam or pparam or force or torque

*press* values = Pstart Pstop Pperiod
    Pstart,Pstop = desired temperature at start/stop of run (pressure units)

    Pdamp = pressure damping parameter (time units)

 *pparam* values = Pchain
    Pchain = length of Nose/Hoover barostat chain
 

I think the above info used only for barostat, so it is not correct for fix rigid.

Third question: When I used fix npt tri, the system might crash because “fix npt/nph has tilted box beyond 45 degrees”. The document had mentioned this problem and pointed out three possible error source:

The three most common sources of this error are using keyword tri on a liquid system, specifying an external shear stress tensor that exceeds the yield stress of the solid, and specifying values of Pstart that are too far from the current stress value.

In my simulation, I had equilibrated the system at P=30 and T=3.0 by fix npt iso, then I quenched the system to T=0.7 by velocity scale and kept P=30 by fix npt tri. I checked the instantaneous press after velocity scale is about 26. I don’t know if the system crash due to large difference of Pstart and Pstop. Could anyone give me some suggestion how to prevent the crash? Thanks.

Best,

Dongsheng

The LJ cutoff has a large effect on the pressure. Are you
using the same cutoff that was used to create the data you are
comparing with?
Matt

Date: Wed, 18 Aug 2010 16:30:06 -0600
From: dongsheng zhang <[email protected]>
Subject: [lammps-users] several questions in npt simulation

of rod-coil polymers and typo in the document of fix rigid

To: LAMMPS Users <[email protected]>

  Hi LAMMPS users,

  I would like to simulate a system of rod-coil
  copolymers. With Axel,s help, I can manage to
  simulate the system with NPT (iso). However, when I
  checked the output, I found the pressure is a little
  bit off from the target pressure by 0.5 (LJ unit) in
  average consistently. In my simulation, I have used
  fix rigid/nvt for rod parts and fix npt dilate
  partial for coil parts. Could any one tell me why
  the pressure is off from the target pressure? Thank
  you in advance.

  Second question: Since I expect the lamellae
  formation, I would like to do NPT simulations to
  allow dimensions to change independently with fix
  npt tri option. I set up my simulation in
  equilibration mode and production mode sequentially
  by:

  dump 1 all atom 10000
  eq.T${t2}P${pf}.lammpstrj
  dump_modify 1 scale no
  run 200000 ##### equilibration
  undump 1
  dump 1 all atom 10000
  prod.T${t2}P${pf}.lammpstrj
  dump_modify 1 scale no
  run 300000 #######production

  However, the simulation would crash after the
  equilibration. The error message is" ERROR: Fix
  rigid: Bad principal moments". Then I try to extend
  the equilibration time, it works fine til the
  production mode. I checked the source code and
  found that LAMMPS might check the principal moments
  by init() in fix_rigid.cpp when starting to run
  the production. If it is important to check the
  principal moments, I am wondering why it is checked
  only once by init(). If the principal moments go
  bad during simulations, should I worry about it?

  PS: if anyone would like to debug it, I have
  prepared all files and am more than happy to give it
  to you.

  Typo: at
  http://lammps.sandia.gov/doc/fix_rigid.html
  keyword = temp or press or tparam or pparam or force
  or torque

press values = Pstart Pstop Pperiod
    Pstart,Pstop = desired temperature at start/stop of run

(pressure units)

Sorry. Reading this again I see that the "target" pressure is
the pressure you specify for the barostat. If it is really a
good long time average pressure, I would suspect the rigid
portion isn't being accounted for correctly. But just a guess.
Matt

Date: Wed, 18 Aug 2010 20:05:44 -0500 (CDT)
From: <[email protected]>
Subject: Re: [lammps-users] several questions in npt

simulation of rod-coil polymers and typo in the document of
fix rigid

To: "dongsheng zhang" <[email protected]>, "LAMMPS Users"

<[email protected]>

Fixed the doc page - thanks

Re: check for principal moments. It's expensive, so we don't want to do
it all the time. If you do a reasonable simulation, a one-time check should
be enough.

Steve

Hi Steve,

Thank you very much for your reply. How can we check if the simulation is reasonable? In my case, if I continue the simulation from the equilibration to get the production data, the system will crash, do you think my simulation in the equilibration period is reasonable or not? Do you have any trick to control it?

In my previous email, I had three questions. Could you please answer other two questions as well? Why the pressure is off from the target pressure when I use fix NPT and fix rigid/nvt?

How to prevent the error " fix npt/nph has tilted box beyond 45 degrees" when we use fix npt tri?

Thanks.

All the best,

Dongsheng

In my previous email, I had three questions. Could you please answer other
two questions as well? Why the pressure is off from the target pressure
when I use fix NPT and fix rigid/nvt?

I don't know. Running NVT on the rigid particles and npt/partial
on the rest should be OK. You might want to try just fix rigid
or rigid/nve on the rigid particles and either thermostat just the
fluid or apply fix langevin to the rigid particles, to see if that
helps.

How to prevent the error " fix npt/nph has tilted box beyond 45 degrees"
when we use fix npt tri?

This is something we don't allow yet. It usually indicates that you are
applying an external shear to a fluid which is a bad idea, as it will
tilt indefinitely. Are you simulating a solid (which should resist) or
a fluid?

Steve