-
Notifications
You must be signed in to change notification settings - Fork 667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to make a universe from 2Y2N.pdb #936
Comments
Hi @kaceyreidy, I'd be happy to try help. Are you able to share the |
Ubuntu 14.04. On Monday, August 15, 2016, David Dotson [email protected] wrote:
|
@jdetle , see #810 (comment) : import urllib
downloader = urllib.URLopener()
def fetch_pdb(pdb_id, download_url="http://files.rcsb.org/download"):
filename = "{0}.pdb".format(pdb_id.lower())
downloader.retrieve("/".join([download_url, filename]), filename)
return filename
# get file
pdb = fetch_pdb("2y2n")
# load pdb
u = mda.Universe(pdb) |
So looking into this, there's a CONECT record between atoms and the TER record. As the TER record doesn't represent a real Atom, would a good fix for this be to ignore bonds to the TER location? |
I think so, yes. I don't really know why one would have these pseudo bonds but it won't matter for MDAnalysis if they are there. It might be an issue when writing PDB files but I am willing to wait for someone to raise an issue for the PDBWriter about this…
Oliver Beckstein * [email protected] |
CONECT records to unknown entries (hopefully TER) are now ignored
CONECT records to unknown entries (hopefully TER) are now ignored
When a universe should be created, a KeyError is raised.
KeyError Traceback (most recent call last)
in ()
----> 1 mda.Universe(path + '2Y2N.pdb')
/usr/local/lib/python2.7/dist-packages/MDAnalysis/core/AtomGroup.pyc in init(self, _args, *_kwargs)
4337 try:
4338 with parser(self.filename, universe=self) as p:
-> 4339 self._topology = p.parse()
4340 except IOError as err:
4341 raise IOError("Failed to load from the topology file {0}"
/usr/local/lib/python2.7/dist-packages/MDAnalysis/topology/PDBParser.pyc in parse(self)
88 structure['atoms'] = atoms
89
---> 90 bonds = self._parsebonds(atoms)
91 structure['bonds'] = bonds
92
/usr/local/lib/python2.7/dist-packages/MDAnalysis/topology/PDBParser.pyc in _parsebonds(self, atoms)
181 atom, atoms = _parse_conect(line.strip())
182 for a in atoms:
--> 183 bond = tuple([mapping[atom], mapping[a]])
184 bonds.add(bond)
185
KeyError: 3635
The text was updated successfully, but these errors were encountered: