Hello,
I would like to calculate the RDF (Radial Distribution Function) of some structure of two kinds of ions. The information of charge and particle positions are stored in a separate file (data.txt). The pair potential that I used is the BMH potential (the values of the potential parameters may be not right, but my work is to test how good they are). I met some problems that I don’t know how to fix, they may or may not be related to each other, I am not sure. Just need some help, thanks a lot for any hint !
As shown in my input file below, I used this two lines.
compute myRDF all rdf 500 // line 1
fix 1 all ave/time 2 5000 10000 c_myRDF file tmp.rdf mode vector // line 2
to output the rdf numbers to the file named “tmp.rdf”.
I also want to run fix NVT by using this line:
fix 1 all nvt temp 300.0 300.0 10.0 // line 3
(1) When I activate all lines 1, 2 and 3, I got a complain saying
“ERROR: Replacing a fix, but new style != old style”.
How can I run fix NVT, and output the RDF at same time (either using the fix command of line 2 or should I go other way around) ?
(2) If I forget about the RDF, taking out line 1 and 2, leaving only line 3 active, there is the error saying
“ERROR on proc 0: Out of range atoms - cannot compute PPPM” (I am running everything serial)
Is this related to my data.txt ? how should I fix this ?
(3) When I take out line 3, leaving line 1 and 2 active, it runs and I can get a tmp.rdf with data in there.
But the energies (PotEng, KinEng, TotEng), as popped up on screen, are not changing at all.
I am expecting the total energy changes at the beginning, then reaches some constant value at later time steps.
It very likely I made other stupid mistakes in the input file since I started using LAMMPS just one week ago.
Again, thanks a lot for any help!
----------------------------------- input file -------------------------------------------
units metal
dimension 3
boundary p p p
atom_style charge
read_data data.txt // containing ~1350 atoms
mass 1 180.95 // Ta
group type1 type 1
mass 2 16.00 // O
group type2 type 2
pair_style born/coul/long 6 // Born - Mayer - Huggins
pair_coeff 1 2 15000.00 0.30 2.67 150.00 120.00 // Ta - O pair
pair_coeff 1 1 5000.00 0.70 2.00 600.00 300.00 // Ta - Ta pair
pair_coeff 2 2 1388.00 0.30 3.10 175.00 150.00 // O - O pair
kspace_style pppm 1.0e-5
neighbor 0.5 bin
neigh_modify every 10 delay 10 check yes
timestep 0.001
#fix 1 all nvt temp 300.0 300.0 10.0 // line 3
compute myRDF all rdf 120 // line 1
fix 1 all ave/time 2 500 1000 c_myRDF file tmp.rdf mode vector // line 2
thermo 500
thermo_style custom step temp press vol pe ke etotal
thermo_modify norm yes
velocity all create 300 2398378
run 10000
----------------------------------- input file ------------------------------------------
----------------------------------- part of data.txt ---------------------------------
Comment line
1356 atoms
0 bonds
0 angles
0 dihedrals
0 impropers
2 atom types
0 bond types
0 angle types
0 dihedral types
0 improper types
0.0000000E+00 26.2865082736442 xlo xhi
0.0000000E+00 25.7600552719318 ylo yhi
0.0000000E+00 23.8345737601784 zlo zhi
Atoms
1 1 3.6 4.896193 9.690304 1.066391
2 1 3.6 18.039447 9.690304 1.066391
3 1 3.6 4.896193 22.570332 1.066391
4 1 3.6 4.896193 9.690304 12.983678
5 1 3.6 18.039447 22.570332 1.066391
6 1 3.6 18.039447 9.690304 12.983678
7 1 3.6 4.896193 22.570332 12.983678
8 1 3.6 18.039447 22.570332 12.983678
----------------------------------- part of data.txt ---------------------------------
Best,
Liu