Python interface to LAMMPS

Hi everyone, I have been having some issues with the first step in “Extending Python with a serial version of LAMMPS,” under the
main article “Python interface to LAMMPS.”

After navigating to my “python” folder within my LAMMPS distribution (from the C++ tarball), I type “python setup_serial.py build.”
Lots of errors come up in the terminal after the line with “building ‘_lammps_serial’ extension”:

Nathan,

It looks like you are using windows.
The vast majority of lammps users
and even more so developers does not.
I don’t think that the python wrapper
has ever been tested for windows
compatibility. Which means that you
are pretty much on your own. If you
can, I would recommend to try it on
Linux or macos.

Axel

Hi all:

I am trying to run an NVT simulation for alpha quartz using ewald/n with bks/coul/long pair style.

When I look at the trajectory after couple of timesteps at 300K the system is no longer crystalline.

I am using read_data for creating atoms. The triclinic system is defined using the following lines in read_data.

0.0000000E+00 27.7 xlo xhi

0.5700000 17.65 ylo yhi

2.0000001E-02 21.08 zlo zhi

-8.4850000 0.000 0.000 xy xz yz

The atomic positions in the data file are the positions for the triclinic system, meaning when I view the structure it shows the alpha-quartz structure.

My question is, do I have to specify atomic position in orthogonal box when I am specifying the tilt factor.

I would really appreciate it if anybody could help me understand why the crystalline alpha quartz changes its structure?

Thanks a lot

Deena

My input file is given below.

units metal

atom_style charge

dimension 3

boundary p p p

read_data QZ.data

pair_style buck/coul/long 10.0 10.0

pair_coeff 1 1 1388.77300 0.3623188406 175.0000

pair_coeff 1 2 18003.7572 0.2052048149 133.5381

pair_coeff 2 2 0.00000000 1.0000000000 0.000000

kspace_style ewald/n 1.0e-4

neighbor 4.0 bin

neigh_modify delay 10

thermo 10

dump 1 all xyz 1 QZ.xyz

velocity all create 300.0 786888 dist gaussian

fix 1 all nvt temp 300 300 0.01

run 100000

Hi all:

I am trying to run an NVT simulation for alpha quartz using ewald/n with
bks/coul/long pair style.

When I look at the trajectory after couple of timesteps at 300K the system
is no longer crystalline.

what is the potential/kinetic energy of your system?
are you sure you have the right units? or matching parameters?

I am using read_data for creating atoms. The triclinic system is defined
using the following lines in read_data.

0.0000000E+00 27.7 xlo xhi

0.5700000 17.65 ylo yhi

2.0000001E-02 21.08 zlo zhi

-8.4850000 0.000 0.000 xy xz yz

The atomic positions in the data file are the positions for the triclinic
system, meaning when I view the structure it shows the alpha-quartz
structure.

how do you "view the structure"?

My question is, do I have to specify atomic position in orthogonal box when
I am specifying the tilt factor.

I would really appreciate it if anybody could help me understand why the
crystalline alpha quartz changes its structure?

are you sure that it is due to the input of the coordinates and nothing else?

axel.

Axel's questions are good ones. I doubt this
is due to a bad initial structure, espeically if
you can viz it and it looks regular. So long
as you have defined the triclinic box correctly,
LAMMPS does not care where the read data
atom coords are. You can put them inside the
triclinic box or outside. LAMMPS will simply
remap them into the triclinic box.

Steve

Steve and Alex:

Thanks a lot for replying to my query.

I did make a mistake in defining the triclinic box. By mistake I used the xlo and xhi parameters based on the read data file. With the correct values the simulation is running fine.

I have one more question, do you know if it is possible to use ewald/n with Morse type potentials? The manual says LJ and BKS type, but with hybrid option I guess I could use Morse + Coulomb with ewald/n for triclinic system.

Again thanks a lot for the response.

Deena

no - the Morse potential has an exponential tail. Ewald/n is for
potentials (like LJ) with a 1/r^n dependence.

Steve

Steve:

BKS also has a similar exponential tail along with 1/r^6.

I don't the details of ewald/n implementation, since BKS works with ewald/n I thought it would be okay to use the Morse with it.

Thanks
Deena

Steve:

I my previous mail I think I was not very specific about what I would like to do with ewald/n. Sorry about that.

I like to use coulomb with ewald/n as the long range interaction along with Morse for short range. For example:

pair_style hybrid/overlay morse 10.0 coul/long 10.0
pair_coeff 1 1 morse 0.042395 1.379316 3.618701
pair_coeff 1 2 morse 0.340554 2.006700 2.100000
pair_coeff 2 2 morse 0.000000 1.000000 1.000000

pair_coeff * * coul/long

kspace_style ewald/n 1.0e-4

When I run lammps it runs fine. Please let me know if there is anything wrong in specifying the pair style as above.

Thanks
Deena

Steve:

I my previous mail I think I was not very specific about what I would like to do with ewald/n. Sorry about that.

I like to use coulomb with ewald/n as the long range interaction along with Morse for short range. For example:

pair_style hybrid/overlay morse 10.0 coul/long 10.0
pair_coeff 1 1 morse 0.042395 1.379316 3.618701
pair_coeff 1 2 morse 0.340554 2.006700 2.100000
pair_coeff 2 2 morse 0.000000 1.000000 1.000000

pair_coeff * * coul/long

kspace_style ewald/n 1.0e-4

When I run lammps it runs fine. Please let me know if there is anything wrong in specifying the pair style as above.

so what you are saying is that you want to use ewald/n because
it supports non-orthogonal boxes since pppm doesn't, right?

depending on the size of your unit cell, the performance penalty
can be massive. have you thought about using a supercell instead?

axel.

Axel:

Yes, I would like to use ewald/n because of non-orthogonal boxes. These are not huge systems so I haven't thought about supercell.

When I tried the alpha/quartz it seems to be running reasonably fast. Here I used bks with the long range coulombic forces with ewald/n.

But for silicate systems BKS has parameters only for Si and O. Because of that I would like to use another set of potentials for which short range interactions are specified by Morse.

If understand correctly I guess it is okay to use

pair_style hybrid/overlay morse 10.0 coul/long 10.0 with ewald/n.

I would really appreciate it if you could comment on it.

Thanks again
Deena

It's the C/r^6 part of BKS that ewald/n will do the long-range for,
not the exponential part. You need to use buck/coul/long as
the pair_style with ewald/n. You can use it as part of pair_style
hybrid with other pair styles if you like.

Steve