You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the new release of MDAnalysis 2.0.0 the OpenCADD fetch of PDB structures by PDB codes will not have elements assigned in the mda.Universe. So by default this will not be written to a PDB file. However openbabel requires this information. I found a workaround to add the element information to the mda.Universe in case it is not present:
# retrieve structure from the Protein Data Bank
pdb_id = "2ito"
structure = Structure.from_pdbid(pdb_id)
# element information maybe missing, but important for subsequent PDBQT conversion
if not hasattr(structure.atoms, "elements"):
structure.add_TopologyAttr('elements', structure.atoms.types)
structure
The text was updated successfully, but these errors were encountered:
ATOM 1 N ALA A 702 5.243 11.333 -39.231 1.00 0.00 A N
ATOM 2 CA ALA A 702 3.878 11.924 -39.337 1.00 0.00 A C
ATOM 3 C ALA A 702 3.882 13.125 -40.277 1.00 0.00 A C
With 2.0.0
ATOM 1 N ALA X 702 5.243 11.333 -39.231 1.00 48.95 A
ATOM 2 CA ALA X 702 3.878 11.924 -39.337 1.00 48.46 A
ATOM 3 C ALA X 702 3.882 13.125 -40.277 1.00 48.29 A
https://github.com/MDAnalysis/mdanalysis/releases/tag/release-2.0.0
From @schallerdavid volkamerlab/teachopencadd#106 (comment)
The text was updated successfully, but these errors were encountered: