Dump_modify for specifc group does not work

Hello,

I have been trying to make the dump_modify command to work for a specific group, but to no avail: error: dump modify element names do not match atom types

For example, the dump_modify for the dump all ... works, but gives an error for dump group-ID. My input script:

# Simulation box 

units           real
atom_style      full
boundary        p p p

# interactions/FF 

bond_style      harmonic
angle_style     hybrid fourier cosine/periodic harmonic
dihedral_style  harmonic
improper_style  fourier

pair_style      lj/cut/coul/long 12.5
pair_modify     tail yes mix arithmetic

special_bonds   lj 0.0 0.0 0.0 

# Read data file 

box tilt        large
read_data       ./config.data nocoeff

mass    1    63.546
mass    2     1.00794
mass    3    12.0107
mass    4    12.0107
mass    5    15.9994
mass            6   28.0855                         
mass            7   15.999                          
mass            8   15.0342                          

bond_coeff    1      185.539128        1.933501  
...

angle_coeff    1     fourier      148.822143        0.343737        0.374972        0.281246 
...

dihedral_coeff    1        1.250000              -1               2 
...

pair_coeff		1    1        0.005000        3.113691 
...

kspace_style 	ewald 1.0e-6

# Atom Groupings

group           surrounding type 1:5
group           diffuse type 6:8

set 			group diffuse charge 0.0

# Neighbour list 

neighbor        2.0 bin
neigh_modify    every 1 delay 0 check yes
neigh_modify    exclude molecule/inter diffuse

# Simulation 

variable        T equal 435
variable        S equal 12345

velocity        all create $T $S rot yes mom yes dist gaussian units box

run_style       verlet

# Output system properties 

thermo          1000
thermo_style    custom step temp press etotal pe ke evdwl ecoul epair enthalpy vol cella cellb cellc cellalpha cellbeta cellgamma density 
log             thermo.dat

restart         2000000 rst

print			"================================================="
print           "------> EQUILIBRATION "
print			"================================================="


fix             RIGID surrounding npt temp $T $T 100 tri 0.1 0.1 100
fix             FLEX diffuse nvt temp $T $T 100 
fix             TETHER1 all momentum 1 linear 1 1 1 angular rescale
fix             RECENTER surrounding recenter INIT INIT INIT units box

dump            Surroundtraj surrounding xyz 50000 traj_surround_equil.xyz 
# I get an error if the line below is included
dump_modify     Surroundtraj element Cu H C C O

dump            Trajectory all xyz 50000 traj_equil.xyz       
dump_modify     Trajectory element Cu H C C O  Si N P 

timestep        0.5
run             10000000

undump			Trajectory
undump			Surroundtraj

# script continues...

unfix 			TETHER1
unfix			RECENTER
unfix           RIGID
unfix           FLEX

A snippet of the xyz file generated without dump_modify Surroundtraj element Cu H C C O is attached below. I can only see 5 numeric labels. Have I missed something here?

3402
 Atoms. Timestep: 0
1 13.4497 4.03958 7.69237
1 9.28749 10.5696 7.64015
1 13.5566 8.45614 1.17331
2 15.4721 5.49815 7.8657
2 14.0039 4.80157 7.56856
2 11.705 9.91234 7.88983
2 10.2512 10.6481 7.96584
2 13.8437 9.39909 3.43218
2 14.1934 8.61301 1.98208
2 13.4263 4.96152 3.56898
2 10.1368 6.43971 7.85744
2 10.4397 9.71299 3.5803
3 12.6183 2.95618 5.17471
3 12.3512 3.19286 3.72225
3 11.4784 2.30699 3.06143
3 7.95067 8.01782 7.80334
3 8.00789 6.5294 7.99424
3 6.83866 5.77602 8.21823
3 10.7971 8.7643 0.972188
3 9.50653 9.24464 1.603
3 8.29532 9.13921 0.899805
3 8.219 10.2362 5.09561
3 8.30445 10.0613 3.58592
3 7.14178 9.89577 2.7711
3 10.6314 3.8592 8.07327
3 9.30202 4.42316 8.11626
3 8.06908 3.67155 8.21929
3 12.6369 5.86728 1.03065
3 12.3245 4.54189 1.65093
3 11.4044 3.62134 1.06921
3 12.7528 4.33574 3.0128
3 11.1022 2.45961 1.7099
4 10.1075 1.53064 1.19155
5 13.4547 3.45697 9.53733
3 9.22072 5.82593 7.94085
3 6.83761 4.36369 8.35793
4 5.63597 3.58182 7.99836
5 14.5206 5.5567 7.77201
3 9.45777 9.64427 2.95482
3 7.13365 9.25218 1.55168
4 5.94798 8.65727 1.03079
5 14.9401 2.83573 7.47443
4 4.63286 2.96356 7.72943
5 14.488 9.00435 2.85492
5 11.1721 10.6727 8.17272
5 13.0314 3.94123 5.82933
5 9.04976 8.68866 7.84735
5 11.8083 8.75821 1.71436
5 9.27929 10.4833 5.76115
5 11.6893 4.58086 7.99093
5 13.2923 6.70373 1.70441
5 8.81941 12.4303 7.54224
2 6.13482 10.3214 3.1293
5 8.67523 10.687 9.45257
4 9.19411 0.887162 0.774428
4 4.89587 8.28365 0.612362
5 15.0245 7.72356 0.200856
5 7.06014 10.0609 5.61268
5 13.6399 10.0724 0.286422
2 11.1292 1.44189 3.5378
1 19.5526 12.216 13.9782
3 20.8562 16.2039 13.5433
2 15.4406 13.0211 15.0749
2 18.3823 8.36314 15.2341
5 20.4283 8.50788 20.9221
2 18.5269 12.6526 11.7303
2 19.1484 11.9246 13.0819
3 20.468 14.8773 14.0719
3 22.5021 12.1764 14.0686
5 20.0067 13.9859 13.3213
5 18.0781 13.0751 14.8871
5 19.2861 10.7285 15.03
...

Thank you,
Jean

Yes! The dump_modify command has no way to know that your dump file will contain only a subset of elements. The dump_modify command must always provide element mapping for all atom types.

So you need to use:

dump_modify     Surroundtraj element Cu H C C O  Si N P 

Please see the documentation and look at the error message.

1 Like

Ah sorry, another blunder. Thank you Axel!