LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] RATTLE in version 2017!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] RATTLE in version 2017!

From: Hai Hoang <hhoang052@...24...>
Date: Fri, 10 Nov 2017 11:51:25 +0100

Dear all,

Thank you so much for your explainations and suggestions. 

Here, I am sending you input script and input data that I have simulated. If I did with lammps-10Aug15, results are adequate as the temperature at t=0 is equal to the imposed one, see as followings:
Memory usage per processor = 7.806 Mbytes
Step Temp E_pair E_mol TotEng Press Volume 
       0          298   -10713.761            0   -8946.9696      -106696    30148.974 
 1000000    304.02118   -11136.993            0   -9334.5026    46.237694    29866.604

However, if I did with lammps-31Mar17, results are inadequate, these temperatures are not the same, the difference seems to stem from the number of freedom, i.e. ration is around 3/2, see below:
Per MPI rank memory allocation (min/avg/max) = 10.18 | 10.22 | 10.25 Mbytes
Step Temp E_pair E_mol TotEng Press Volume 
       0    197.43225   -10713.761            0   -9543.2188    2785.2916    30148.974 
 1000000    295.15336   -11162.118            0   -9412.2038    102.95901    30308.874 

In addition, this version yield a errror as:

ERROR: Non-numeric pressure - simulation unstable (../fix_nh.cpp:1029)

Because I am a new user in lammps, so checking code is rather difficult to me. I am really grateful that you can explain me how I should do in more detail.



On Fri, Nov 10, 2017 at 12:14 AM, Peter Wirnsberger <peter.wirnsberger@...24...> wrote:
Hello Hai,

I haven't been involved in any changes to fix rattle since 2015. It's
always possible that a bug was there already in the original code or
that it has been introduced at a later stage. However, given the limited
information you provided, I am not sure I understand the problem
regarding the velocity initialisation.

Could you prepare a minimal working example to demonstrate the issue for
the latest stable version of LAMMPS? If there is a problem with the
constraints or number of degrees of freedom for rattle compared to
shake, then you should see the problem already by just looking at a
single water molecule. For testing purposes, you can compile LAMMPS with
RATTLE_DEBUG set to 1 (see fix_rattle.cpp), as explained in the doc
pages, so that you get some diagnostic output about the accuracy of rattle.

With regard to your second point, what do you mean by 'one of them has
error'? What is the kind of error you are talking about? A crash? Again
it could be due to rattle, but if there was a problem with the
constraints (rattle) I would expect all of your simulations to fail and
not only one of them. It's not unreasonable to assume that this one
simulation crashes because of some other problem. However, if you can
provide a reproducible and reasonably simple example to demonstrate that
rattle fails while shake works, we can look into that.

Best wishes,


On 11/06/2017 05:54 PM, Steve Plimpton wrote:
> I suggest you confer with the author of RATTLE for LAMMPS.  Peter is CCd
> on this message.
> Steve
> On Wed, Oct 18, 2017 at 2:25 AM, Hai Hoang <hhoang052@...24...
> <mailto:hhoang052@...24...>> wrote:
>     Dear all,
>     I have employed RATTLE method to constrain the rigid bonds in water
>     molecules and to count the number of freedom for generating initial
>     velocities of atoms as:
>     --------------------------------
>         # Fix rigid bonds
>         fix shake_bond    fluid shake 1.0e-5 200 0 b 1 a 1
>         # Creat the velocity
>         velocity fluid create ${Temp_imp} ${Iseed_imp} mom yes rot yes
>     dist gaussian
>         # Transient duration
>         timestep ${dt}
>         reset_timestep 0
>         fix npt_md fluid npt temp ${Temp_imp} ${Temp_imp} ${Damp_temp}
>     iso ${Press_imp} ${Press_imp} ${Damp_press}
>     ---------------------------------
>      If I used versions 2015, it works well, i.e. it exports the
>     temperature at t=0 is exactly equal to ${Temp_imp}. However, with
>     version 2017, it shows that at t=0, the temperature does not remove
>     number of constraints in computing the temperature, i.e. temperature
>     at t=0 is not equal ${Temp_imp}.
>     In addition, use of RATTLE in version 2017 is not stable, i.e. i
>     mean that all input and script are the same, but run independently
>     one of them has error, others are not. Such situations donot occur
>     with version 2015.
>     (Note that: if use of SHAKE, all are correct with both versions 2015
>     and 2017)
>     So, anyone can tell me what changed in RATTLE of version 2015 and
>     2017? Or explain me what happen?
>     Thanks,
>     ------------------------------------------------------------------------------
>     Check out the vibrant tech community on one of the world's most
>     engaging tech sites,!
>     _______________________________________________
>     lammps-users mailing list
>     <>
>     <>

Description: Binary data

Description: Binary data

Description: Binary data