Effect of minimization

Dear users

After construction of my system by Moltemplate software,

I want to only minimize my system, I run lmp_… and it is finished,

How can i understand this process has effected on my system.data?

My run section,

– minimize –

minimize 1.0e-5 1.0e-7 1000 10000
timestep 1.0
fix fxlan all langevin 300.0 300.0 5000 48279
run 50000

Dear users

After construction of my system by Moltemplate software,

I want to only minimize my system, I run lmp_... and it is finished,

if you only what to minimize, why do you use "fix langevin" and "run"?

How can i understand this process has effected on my system.data?

what do you mean by that??
that file is not touched at all.

My run section,

# -- minimize --
minimize 1.0e-5 1.0e-7 1000 10000
timestep 1.0
fix fxlan all langevin 300.0 300.0 5000 48279
run 50000

incomplete information => incomplete advice.

axel.

1-define a thermo command to show you the variation of Energy, force …

thermo 10
thermo_style custom step temp pe fnorm fmax

2-create a restart file by write_restart command, and for use read_restart command to use the minimized file in later simulations.

Dear Hadi

Thank you very much for your reply,

Ali, from your script it appears like like you want to minimize the
system, and then run a short simulation after minimization. If so
then this will not succeed, the fix langevin command does not work by
itself. If you want the system to evolve over time, you also need to
add a "fix nve" command to integrate the equations of motion. See the
doc page for "langevin" for more information:

1-define a thermo command to show you the variation of Energy, force ....
thermo 10
thermo_style custom step temp pe fnorm fmax
2-create a restart file by write_restart command, and for use read_restart
command to use the minimized file in later simulations.

Disclaimer/warning:
     Sometimes "read_restart" does not work. (It is not my fault.
This problem has nothing to do with moltemplate.) Over the last year,
I've noticed that the the read_restart command does not always work
reliably. (It sometimes fails when using hybrid force-field styles. I
have noticed this problem using the 2012Dec13 version of LAMMPS) I
don't know of this issue has been patched yet. This usually only
occurs if you are using "hybrid" styles. (Most of the moltemplate
examples use hybrid styles.)

For reference here are some earlier discussions of the issue:

http://sourceforge.net/mailarchive/message.php?msg_id=30238375

You do not have to use "read_restart". As an alternative to
"read_restart", you can try using "read_dump" or create a new data
file from the restart file using the "restart2data" program (in the
"tools" directory distributed with LAMMPS). You can also create a new
data file the last frame in your trajectory using pizza.py's
"dump2data.py" script (or my "dump2data.py" script, included in the
.tar.gz file in the last link).

I run lammps on system.in from moltemplate : I can cretain that my crystal
is relaxed?

If your minimization succeeded, it will print out a message saying
something like this:
Minimization stats:
  Stopping criterion = energy tolerance

(This means your system has reached a local energy minimum. You
probably still have to run it at constant temperature and/or pressure
for a while if you want it to be "equilibrated". It seems like that
is what you are trying to do.)

If minimization failed, it usually prints out a message saying something else:
Minimization stats:
  Stopping criterion = max iterations
  or something other issue

Check your log.lammps file and look for this message.
Cheers
Andrew

     Sometimes "read_restart" does not work. (It is not my fault.
This problem has nothing to do with moltemplate.) Over the last year,
I've noticed that the the read_restart command does not always work
reliably. (It sometimes fails when using hybrid force-field styles. I
have noticed this problem using the 2012Dec13 version of LAMMPS) I
don't know of this issue has been patched yet. This usually only
occurs if you are using "hybrid" styles. (Most of the moltemplate
examples use hybrid styles.)

Do you have an example file that read_restart doesn't work with?
And what does "not work" mean - does it mean you get an error
message, or a crash or what?

Steve

Hi Steve

Problems with "read_restart" and hybrid pair_styles have occasionally
popped up over the last year. For reference, in April 2012, I posted
a bug report regarding a different problem with "read_restart" and
Axel posted a fix.
http://lammps.sandia.gov/threads/msg27987.html
(In that case, I think LAMMPS was crashing, not printing an error message.)

I am assuming his patch entered the code, because since then, the
problem went away (I think). However a perhaps different problem with
"read_restart" resurfaced again in December.

  --- the current issue ---
I've attached two variants of the same test system (8 water molecules).
In the "working" version, I use
pair_style lj/charmm/coul/long 9.0 10.0 10.0
pair_coeff 1 1 0.1553 3.166
pair_coeff 2 2 0.0 2.058

In the "not_working" version I use a hybrid pair_style:
pair_style hybrid lj/charmm/coul/long 9.0 10.0 10.0
pair_coeff 1 1 lj/charmm/coul/long 0.1553 3.166
pair_coeff 2 2 lj/charmm/coul/long 0.0 2.058

To demonstrate the problem, cd to the "not_working" example, and run
lammps on "run.in.min" and "run.in.npt" in that order. (The
"run.in.npt" invokes read_restart on a restart file created during the
previous run.) When I do this, I get:
ERROR: KSpace style is incompatible with Pair style (kspace.cpp:147)

I tested this problem today with the 2013Jan11 version of LAMMPS.
(This has been a problem for moltemplate users in the past.
http://sourceforge.net/mailarchive/message.php?msg_id=30238375)

Sorry, I know it's never fun to get these kinds of posts.
Thanks for checking this out

   --- details why I use hybrid styles ---
   --- (not important. feel free to skip) ---
Why am I using "pair_style hybrid" with only one sub-style in the
"not_working" example?
In most moltemplate examples, I use hybrid pair_styles (and
angle_styles, etc) even if I don't need to. The goal is to define
molecules which are modular and can be imported into other users
simulations: If I post a molecule using a hybrid pair_style, then
later it makes it easier later for other users to import my molecule
and combine it with their own molecules which may use a different
pair_style. They can override the "pair_style" command in their own
files to include whatever extra sub-styles they need. But the
decision to use a hybrid or not-hybrid pair_style in the original
molecule has to be made at the beginning, because it effects the
syntax of all the "pair_coeff" commands which come later. Currently,
moltemplate is too dumb to change the syntax of the pair_coeff
commands to combine molecules defined with hybrid and non-hybrid
pair_styles.

working.tar.gz (1.14 KB)

not_working.tar.gz (1.19 KB)