Adding Resnames to the Universe #4493
Unanswered
rszukalo
asked this question in
MDAKit Q&A
Replies: 1 comment 1 reply
-
I can't think of a simple way to split one residue (=all your waters) into multiple residues (although perhaps someone else knows a trick). It might be easier to create an alternative universe with I'd do something along the lines of
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to adapt MDAnalysis to my workflow and have run into an issue I was hoping for some assistance with. I run simulations with potentials that don't explicitly define any topology in LAMMPS, thus they have no molecule information. Thus far, I have been able to add a data file to my universe and manipulate it:
When I get information about this universe it reads as expected:
Atoms: 1296
Residues: 1
Segments: 1
At this point however, I would like to add in topology information manually that is missing in my data file, but is important for my analysis. I have been able to do things like add names/resnames at the atom level:
Atom Names: ['O' 'H1' 'H2' ... 'O' 'H1' 'H2']
Atom Resnames: ['H2O' 'H2O' 'H2O' ... 'H2O' 'H2O' 'H2O']
However, I have been unsuccessful in trying to edit anything at the residue level. In this case, every 3 atoms (O H1 H2) is a water molecule, and I'd like to be able to identify each water as such. Currently there is only 1 resid:
But in this case I'd like to add more in. I only have water molecules in the system, so adding u.add_TopologyAttr('resnames', ['H2O']) is correct in associating each atom with a water residue, however I need to be able to refer to each water molecule individually. Eventually, I will need to do this dynamically on a per-frame basis by identifying via distance and angles which 2 hydrogens are associated with each oxygen, but at this point static analysis based on the input data file is enough.
Any help is appreciated, and please let me know if I need to provide more context/information.
Beta Was this translation helpful? Give feedback.
All reactions