[lammps-users] multiple read_data files with different atom_styles

Hello

I have 2 data files and have to use multiple read_data commands, one with full atom style and the other in charge. but got errors when try to reading data as they have different atom style formats. I write the ways I tried and the Errors I got.
#Case 1
as mentioned in doc page I used more general style which is full:

atom_style full
read_data atom_in_full_style_data.data
read_data atom_in_charge_style_data.data add append
[ERROR]
Incorrect atom format in data line
last line : read_data atom_in_charge_style_data.data add append

#Case 2

atom_style hybrid full charge

read_data atom_in_full_style_data.data
read_data atom_in_charge_style_data.data add append

[ERROR]

Incorrect atom format in data line
last line: read_data atom_in_full_style_data.data

any good suggestions?
thanks

you have to reformat the data files to have the same format. there is no other way. the atom style is locked in when the box is created which is when the header of the first data file is processed and it cannot be changed after that and all data files have to conform to the required format.

with atom style hybrid, you have a “merged” format as explained in the read data documentation.

it should be trivial to promote the “charge” format to a “full” style format. again, see the read_data documentation.

axel.