Solvation_analysis subpackage multi-atom solute giving trouble #4471
Unanswered
aksharmaChem
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Tagging original author @orionarcher :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the detailed bug report @aksharmaChem. Nothing stands out to me as to why this shouldn't work. Would you quickly check two things for me:
If both of those evaluate to True, I'll look at this later this week and see if I can identify the issue. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a simulation trajectory from DFTB+ for 1 NaNO3 in 32 H2O molecules. The trajectory is in xyz format and I converted a frame of xyz to pdb using openbabel to serve as topology input.
I am following the instructions from the solvation analysis package documentation. However, I keep getting an assertion error
All residues must have the same length
I don't know how to get past this. My codes are pasted below from my Jupyter notebook.
`import MDAnalysis as mda
u=mda.Universe("./single-frame-1NaNO3-32-H2O.pdb", "./nano3-1-water-32-some-frames.xyz")
import solvation_analysis
nano3Atoms=u.atoms.select_atoms("id 1 or id 2 or id 3 or id 4 or id 5")
oAtomsWater=u.atoms.select_atoms("type O and resname HOH")
hAtomsWater=u.atoms.select_atoms("type H and resname HOH")
solventAtoms=u.atoms - nano3Atoms
from solvation_analysis.solute import Solute
soluteObject=Solute.from_atoms(nano3Atoms,{"Wat":solventAtoms},solute_name="salt")`
All the intermediate steps seem to present reasonable outputs with nano3Atoms showing all atoms that correspond to NaNO3. The last step when soluteObject is defined is when the assertion error is thrown. Any help would be greatly appreciated.
A pdb file and some frames from the simulation output are presented here.
Thank you,
frames.zip
Beta Was this translation helpful? Give feedback.
All reactions