On 12/10/2013 11:47 AM, Geoffrey Hutchison wrote:
>> OpenBabel crash more nicely with an error message rather than
>> entering an infinite loop…
> 
> Right. Infinite loops are a clear bug, and "crash" certainly is too. 
> I think what you really mean is that it'll refuse to translate the
> CIF because there's nothing in it.

Unfortunately it's not quite that simple. You have to define "nothing"
and you should to also error out on mmCIFs that have "too much" in them. :(

Long story:

CIF may have a chem. comp. section: chemical component (aka ligand or
residue) definition, with all the atoms and bonds and R/S & E/Z
stereochemistry and a bunch of other goodies. You can make an OBMol from
that.

It may have an entity/chain section: a chain of linked chem. comps, and
for any that aren't the "standard 28" there should be chem. comp
section(s) elsewhere in the file. I forget exactly how they model
homo-n-mers and other interesting stuff -- but anyway, you could make an
OBMol from that.

Then there's coordinates: the atom_site section. I believe OpenBabel
currently makes OBMols from that.

Off the top of my head and I won't vouch for most of this, but

1. Ligand Expo CIFs have only the chem. comp section (unless you ask for
coordinates) -- if you treat them as "there's nothing in it", you'd be
wrong.

2. Solution NMR structures may not have the coordinates for e.g.
terminal residues because they're flapping around and don't produce
stable peaks -- but I think the entity/chain section should have the
complete residue sequence. So if you're making the molecule from
atom_site alone, without looking at the entity, your molecule can be
incomplete.

3. Solution NMR structures have multiple models (usually 20 for some
reason) -- _atom_site.ndb_model or _atom_site.pdbx_PDB_model_num dep. on
the CIF version. So now you have to look at
_pdbx_nmr_ensemble.representative_conformer to figure out which set of
coordinates to use for building your molecule, and its value may be like
"1, 3, 7". Because they had a mix of 3 conformers in the sample.

On top of which there are a few tentacles hiding just under the surface
when it comes to parsing STAR formats like CIF. Keywords inside values
being one.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to