Problem in Changing LAMMPS

Hi all,

I am a college student and I am working on LAMMPS.

I modifies read_data.cpp and atom.cpp so that I could read some specified data from data file by read_data command and deal with these data in atom.cpp.

Also, I created a new pair_style which calculates F[i] only by the data added into data file and atoms displacements(no pair coeff or any other factor).

I used make openmpi to make file, however I can’t run my work parallelly (it only runs on one processor). Did I missed something in my pair style file?

This is my input file:

units metal
dimension 3
atom_style atomic
boundary p p p
read_data tay4.data.0

mass 1 28
mass 2 28

#velocity all create 300.0 87287

pair_style taylor

pair_coeff * * 0.0 0.0

#kspace_style none

atom_modify sort 0 0.0

log log.tay4
timestep 0.0005
#run_style verlet

fix 1 all nve
dump 1 all custom 1000 dump.tay4 id x y z fx fy fz

thermo 100
run 10000

unfix 1

fix NVT all nvt temp 300.0 300.0 0.001

thermo 100
run 10000

Best regards,

atom.cpp (54 KB)

atom.h (11.4 KB)

pair_taylor.cpp (16.1 KB)

pair_taylor.h (1.24 KB)

read_data.cpp (51.9 KB)

read_data.h (10.3 KB)

What do you mean, it won’t run in parallel? Do you get an error message?

When you implemented your own style "taylor" in atom.cpp and
read_data.cpp, you did not think about parallelism from the beginning
- so how should it work in parallel?

Take a look at atom.cpp and see how other styles, namely "data_*() ",
handle their own data structures. Your data_taylor() is doing
something that is totally different.

Ray