[Chimera-users] importing sdf files from PubChem
Eric Pettersen
pett at cgl.ucsf.edu
Mon May 7 11:07:55 PDT 2007
So the problem really is that in the file that doesn't work there is
a blank line following the '$$$$' -- and that line is gone in the cut-
and-paste version of the file which is why that one works. SDF files
can have multiple compounds in them, each ended with a '$$$$', and
the first lines of the compound description can be blank, so when
Chimera sees the blank line following the '$$$$' it assumes that is
the start of another compound description -- and then the file ends.
I have now amended the code so that if it never sees anything but
blank lines following a '$$$$' it doesn't throw an error.
--Eric
On May 4, 2007, at 3:59 PM, Mark Andrake wrote:
> Hey Folks,
>
> It is a relatively new feature to be able to read SDF compound
> structure files in Chimera. (I have release 2350 for Windows -
> I will be upgrading to the new snapshot that I just saw while
> looking around the site)
>
> Anyway - I tried with a compound sdf file that I got from PubChem
> (enclosed) - but seemed to have problems.
> At first it gave an error shown in the first lines below - and then
> seemed to say that it opened the files - but no atoms were
> displayed and no new model ID was generated and put into the Model
> Panel .
>
> Opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs
> \Cy3_CID_16048627.sdf
> Error reading C:\Documents and Settings\andrake\My Documents\WORK f
> \PDBs\Cy3_CID_16048627.sdf:
> Unexpected end of file (parser state: post header 1) in MOL/SDF
> file 'C:\Documents and Settings\andrake\My Documents\WORK f\PDBs
> \Cy3_CID_16048627.sdf'
> Done opening C:\Documents and Settings\andrake\My Documents\WORK f
> \PDBs\Cy3_CID_16048627.sdf
> Opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs
> \Cy3_CID_16048627.sdf
> Error reading C:\Documents and Settings\andrake\My Documents\WORK f
> \PDBs\Cy3_CID_16048627.sdf:
> Unexpected end of file (parser state: post header 1) in MOL/SDF
> file 'C:\Documents and Settings\andrake\My Documents\WORK f\PDBs
> \Cy3_CID_16048627.sdf'
> Done opening C:\Documents and Settings\andrake\My Documents\WORK f
> \PDBs\Cy3_CID_16048627.sdf
>
> I tried various atom selections and displaying all - but it seems
> obvious that it has not read in atoms and bonds.
>
> I have browsed around the documentation and only found a link to
> the sdf file formats.
> (I checked this out and tried editing out two of the header lines - )
>
> It seems the error is unexpected end of file past the header.
> When checking the sdf file format information it seems that the $$$
> $ should be the only end of file mark -
> and there is only one at the end of my file.
> I also tried the whole procedure with a different sdf file from
> PubChem.
> Can anyone recognize what is causing the error in the enclosed file?
>
> Beyond that - are there other instructions on sdf file use in
> chimera that I did not see in searching the documentation?
>
> Thanks in advance,
> Mark
>
> --
> Mark Andrake, Ph.D.
> Research Associate
>
> Fox Chase Cancer Center
> ICR428
> 7701 Burholme Ave.
> Philadelphia, PA 19111
> 215-728-3654
> mark.andrake at fccc.edu
> 16048627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20070507/8f3819bb/attachment.html>
More information about the Chimera-users
mailing list