Re, Effect of minimization

Dear Andrew

Thank you very much for your reply,

1- I used exactly system.in file, output of moltemplate, Can it be useful? Because when i build my system.in i take several error about pair coeff,

Dear Andrew, I know my request take your time,

I have to perform these step, Can you give a bit guidance for each step,

1- Relaxation of crystal,

2- Using prior output for construction of my new system that it is contained crystal and a lot of typical hydrocarbon over its one surface, It means i have to add new molecules to my sysytem, How can i use relaxed crystal for this my intention? and Can i do this by moltemplate? After that i will have a system, in y and z directions is periodic and in x direction, it is not,

3- Minimization of this system

4- NVT and NPT ensemble for this my new system,

In each step i need to new updated output files from prior step,

I don't have enough time to give you a very detailed reply. Here are
some quick answers:

Dear Andrew
Thank you very much for your reply,
1- I used exactly system.in file, output of moltemplate, Can it be useful?

The system.in file created by moltemplate is not complete. Users must
add their own commands to perform minimization, and run the simulation
(as you have done in your previous email, although there was a
mistake).

Because when i build my system.in i take several error about pair coeff,

Without more information, I can not say why this is hapenning. If
these are moltemplate errors that you emailed me about earlier, it
means you must delete the (Data) "Pair Coeffs" section, and use only
"pair_coeff" commands. (Or visa-versa. Moltemplate is attempting to
help you with these warning messages. LAMMPS will not allow you to
have both a "Pair Coeff" section in your data file, and use
"pair_coeff" commands in your input scripts.)

Dear Andrew, I know my request take your time,

I have to perform these step, Can you give a bit guidance for each step,

1- Relaxation of crystal,

It looks like you are using a reasonable command to perform
minimization. However the minimize command minimizes "all" of the
atoms in your system. You can not only minimize some of them.

2- Using prior output for construction of my new system that it is contained
crystal and a lot of typical hydrocarbon over its one surface, It means i
have to add new molecules to my sysytem, How can i use relaxed crystal for
this my intention? and Can i do this by moltemplate? After that i will have
a system, in y and z directions is periodic and in x direction, it is not,

3- Minimization of this system

Use moltemplate to build your entire system, including the other
molecules present and then minimize it just as you did earlier.

  ----- possible exception (perhaps you should ignore the advice below) -----

Are you trying to minimize the atoms in the calcite crystal without
modifying the coordinates of the other molecules in your system? (I'm
not sure why you would want to do this.) If that is what you must do,
then follow these instructions instead:

a) Define a group which contains the atoms in your calcite crystal.

b) Running a simulation at low temperature can also be used to
minimize your system.
Do not use the "minimize" command (it will modify the positions of all
the atoms). Instead run a short simulation of your system at low
temperature using fix langevin and fix nve, to minimize it. You will
probably need to use a small timestep. When you do this, use the group
you defined earlier. (...containing the atoms in your calcite crystal.
Don't use the "all" group for this step.).

c) You can minimize the remaining atoms in your system using a similar approach.

4- NVT and NPT ensemble for this my new system,

If you are using a hybrid pair_style, then you can not use
read_restart. (This is a LAMMPS bug.) See my previous post for
instructions to get around this limitation.

Must go now.
Cheers!

Andrew

LAMMPS will not allow you to
have both a "Pair Coeff" section in your data file, and use
"pair_coeff" commands in your input scripts.)

Actually, this is fine. LAMMPS simply uses the latest definitions,
i.e. one overwrite the other.

Steve

LAMMPS will not allow you to
have both a "Pair Coeff" section in your data file, and use
"pair_coeff" commands in your input scripts.)

Actually, this is fine. LAMMPS simply uses the latest definitions,
i.e. one overwrite the other.

Steve

Hi Steve
What you say is true for LAMMPS users, if they are careful and include
Pair Coeff entries for all the atom types. But for moltemplate users,
this is dangerous and I discourage it, because moltemplate constructs
these files in a piecemeal fashion. (Details explained below.)
Instead I recommend that moltemplate keep all force-field parameters
out of the data file, and use "pair_coeff" input-script commands
instead.

(Likewise, to write portable molecule definitions, moltemplate users
should avoid "Bond Coeffs", "Angle Coeffs", "Dihedral Coeffs", and
"Improper Coeffs" sections, and use "bond_coeff", and "angle_coeff",
"dihedral_coeff", and "improper_coeff" commands instead. This is not
so clear at the beginning of the manual. I only mention it later.
Perhaps I should change this.)

--- ugly details ---
--- (feel free to skip) ---

The reason is: LAMMPS expects the number of entries in the "Pair
Coeffs" section of the data file to match the number of atom types. I
think the problem occurs when some (but not all) of the pair_coeffs
for your atoms are defined there. This scenario comes up often when
moltemplate users mix different molecules together, some of them may
have their pair parameters defined in the "Pair Coeff" section of the
data file, other molecules use "pair_coeff" statements instead. In
this case, the number of atom types (used in both molecules) may
exceed the number of entries in the "Pair Coeffs" section of the data
file (used only in one of the molecules). LAMMPS will complain when
it prematurely runs into the header from the next Data section.
("ERROR: Illegal pair_coeff command". See attached DATA file and
input script, for an example.)

I don't think this issue comes up very frequently for non-moltemplate users.

Sorry for the long digression.
Cheers!
Andrew

system.data (1.36 KB)

run.in.min (958 Bytes)

The reason is: LAMMPS expects the number of entries in the "Pair
Coeffs" section of the data file to match the number of atom types

This is indeed the required format for a data file. No explicit mixiing
coeffs for types I,J are allowed in the data file, only in the input
script. However you can read a data file, then add/edit the pair coeffs
in the input script.

Steve