Adding our customary topology attribute to atom object #4607
-
Hello Everyone i hope you are doing great. I using LAMMPS for the analysis of my system, I have performed voronoi analysis and saved the dump with voronoi attribute with "atom_style='id type x y z c_voro[1] c_voro[2]'," import MDAnalysis as mda
u=mda.Universe('data_all_1800_1ns','dump_all_1800_1ns', topology_format="data", format="lammpsdump",atom_style='id type x y z c_voro[1] c_voro[2]',timeunit='ps',dt=0.0001)
grp1=u.select_atoms('c_voro[1] 0 ') # i want to group all atoms with topology attribute c_voro =0 any comment suggestoin in this regard will be highly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @ullaharslan. From the
Have you tried using the optional |
Beta Was this translation helpful? Give feedback.
Hello @ullaharslan. From the
LAMMPSParser
documentation:Have you tried using the optional
resid
andcharge
attribute instead? If you setid type x y z charge resid
, thencharge
should correspond to your datac_voro[1]
whileresid
would correspond to your datac_voro[2]
and your selection would the becomegrp1=u.select_atoms('charge 0 ')
instead ofgrp1=u.select_atoms('c_voro[1] 0 ')
.