<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>So the problem really is that in the file that doesn't work there is </DIV><DIV>a blank line following the '$$$$' -- and that line is gone in the cut- </DIV><DIV>and-paste version of the file which is why that one works. SDF files </DIV><DIV>can have multiple compounds in them, each ended with a '$$$$', and </DIV><DIV>the first lines of the compound description can be blank, so when </DIV><DIV>Chimera sees the blank line following the '$$$$' it assumes that is </DIV><DIV>the start of another compound description -- and then the file ends.</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>I have now amended the code so that if it never sees anything but </DIV><DIV>blank lines following a '$$$$' it doesn't throw an error.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--Eric</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><DIV><DIV>On May 4, 2007, at 3:59 PM, Mark Andrake wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> Hey Folks,<BR> <BR> It is a relatively new feature to be able to read SDF compound structure files in Chimera. (I have release 2350 for Windows - <BR> I will be upgrading to the new snapshot that I just saw while looking around the site)<BR> <BR> Anyway - I tried with a compound sdf file that I got from PubChem (enclosed) - but seemed to have problems.<BR> 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 .<BR> <BR> Opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf<BR> Error reading C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf:<BR> 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'<BR> Done opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf<BR> Opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf<BR> Error reading C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf:<BR> 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'<BR> Done opening C:\Documents and Settings\andrake\My Documents\WORK f\PDBs\Cy3_CID_16048627.sdf<BR> <BR> I tried various atom selections and displaying all - but it seems obvious that it has not read in atoms and bonds.<BR> <BR> I have browsed around the documentation and only found a link to the sdf file formats.<BR> (I checked this out and tried editing out two of the header lines - )<BR> <BR> It seems the error is unexpected end of file past the header.<BR> When checking the sdf file format information it seems that the $$$$ should be the only end of file mark - <BR> and there is only one at the end of my file.<BR> I also tried the whole procedure with a different sdf file from PubChem.<BR> Can anyone recognize what is causing the error in the enclosed file?<BR> <BR> Beyond that - are there other instructions on sdf file use in chimera that I did not see in searching the documentation?<BR> <BR> Thanks in advance, <BR> Mark<BR> <BR> <DIV class="moz-signature">-- <BR> <I><B>Mark Andrake, Ph.D.</B></I><BR> Research Associate<BR> <B><BR> Fox Chase Cancer Center<BR> </B>ICR428<BR> 7701 Burholme Ave.<BR> Philadelphia, PA 19111<BR> 215-728-3654<BR> <A class="moz-txt-link-abbreviated" href="mailto:mark.andrake@fccc.edu">mark.andrake@fccc.edu</A> </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">16048627</DIV></BLOCKQUOTE></DIV><BR></BODY></HTML>