Skip to content

Adding our customary topology attribute to atom object #4607

Answered by RMeli
ullaharslan asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ullaharslan. From the LAMMPSParser documentation:

This should be a space separated
string indicating the position of the id, type, resid, charge,
x, y and z fields. The resid and charge fields are optional
and any other specified field will be ignored.

Have you tried using the optional resid and charge attribute instead? If you set id type x y z charge resid, then charge should correspond to your data c_voro[1] while resid would correspond to your data c_voro[2] and your selection would the become grp1=u.select_atoms('charge 0 ') instead of grp1=u.select_atoms('c_voro[1] 0 ').

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@RMeli
Comment options

@orbeckst
Comment options

@ullaharslan
Comment options

@ullaharslan
Comment options

Answer selected by ullaharslan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants