Hi everybody,
Due to a design problem in LAMMPS which does not allow for compute stress command to be invoked unless the stresses are dumped into a text file, I have to generate a dummy dump file to keep these unnecessary numbers every few steps at which I need the stresses. [I am linking the LAMMPS library so I am dealing with these numbers in my own code internally, that’s why I don’t need an output file.] In order to keep the file size in control and save the storage system from crashing, I use the ‘dump_modifyu’ command immediately after the dummy dump so that any new output is not appended into the existing dummy file. But this seems not to be working although I am invoking ‘dump_modify’ RIGHT AFTER invoking the original dump, and the result is the formation of GIGABYTE-size files just in a few hours.
I can reproduce the exact same problem for the following test system even when I am using the LAMMPS binaries- and not the linked library through within my own code. Here you can find a script that I am using, but again, the file butane100.dat keeps growing as new configurations are added to its end despite the dump_modify command.
Regards
Amir
PS, I changed the locations of dump and dump_modify in the script, but I always get the same outcome despite what the LAMMPS documentation asserts.
in.butane:
units real
atom_style full
bond_style harmonic
angle_style harmonic
dihedral_style opls
boundary p p p
timestep 2.0
#pair_style lj/sf 3.5
pair_style lj/cut 2.5
read_data butane-single.txt
replicate 10 10 20
dump myDump all custom 5000 butane100.dat id mol type q x y z
dump_modify myDump append no sort id
velocity all create 90.0 87287
pair_coeff 1 1 0.091411415139202 3.95 9.875
pair_coeff 2 2 0.194746058340039 3.75 9.375
pair_coeff 1 2 0.133424183661151 3.85 9.625
dihedral_coeff 1 0.705517854342035 -0.135507597914496 1.572516093000421 0.0
neighbor 0.3 bin
neigh_modify every 20 delay 0 check no
#fix shakeFixStr all shake 1e-6 2000 0 b 1
fix ensembleFixStr all npt temp 100.0 100.0 200.0 iso 1.0 1.0 2000.0
thermo 1000
run 100000
and here is butane-single.txt
one propane molecule: traPPE-UA model
0.0 10.0 xlo xhi
0.0 10.0 ylo yhi
0.0 10.0 zlo zhi
2 atom types
4 atoms
1 bond types
3 bonds
1 angle types
2 angles
1 dihedral types
1 dihedrals
Masses
1 14.02658
2 15.03452
Atoms
1 1 2 0.0 1.0 1.0 1.0
2 1 1 0.0 1.0 1.0 2.54
3 1 1 0.0 1.406860004769605 1.0 3.166374430336732
4 1 2 0.0 1.406860004769605 1.0 4.706374430336732
Velocities
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
Bond Coeffs
1 1000 1.54
Bonds
1 1 1 2
2 1 2 3
3 1 3 4
Angle Coeffs
1 1242.002923086986 114.0
Angles
1 1 1 2 3
2 1 2 3 4
Dihedrals
1 1 1 2 3 4