On 9 May 2010 21:53, Chris Morley <[email protected]> wrote:
> Noel O'Boyle wrote:
>>
>> Hi Chris,
>>
>> I've just been following up a test failure (testsym.py) on Linux
>> related to CML roundtripping, presumably due to r3708.
>>
>> It seems that a CML file with multiple molecules, when passed through
>> babel -icml myfile.cml -osmi, produces multiple SMIs on Windows or
>> Linux. However, if piped through babel it only works on Windows. In
>> other words...
>>
>> (1) Windows: "type noel.txt | babel -icml -ocan" is fine
>> but
>> (2) Linux: "cat noel.txt | ../bin/babel -icml - -ocan" gives
>>
>> ***************************************************
>> :1: parser error : Extra content at the end of the document
>> a4" order="1"/>   <bond atomRefs2="a2 a5" order="1"/>  </bondArray>
>> </molecule>
>>
>>     ^
>> ==============================
>> *** Open Babel Error  in XML Parser
>>  Extra content at the end of the document
>>
>> C[C@@](F)(Cl)Br
>> 1 molecule converted
>> 1 errors 1 info messages 42 audit log messages
>> ***************************************************
>>
>> Note that the error is actually at the end of </molecule>. noel.txt is
>> attached.
>
> Could this be another problem with line endings?  The file noel.txt has 0D
> 0D 0A at the end of every line. Attached is a version with just 0A instead.
> Maybe that behaves differently? Otherwise, I don't know and with only
> Windows would find it difficult to debug Linux piping.
>
> The change in r3708 was to do with multiple files and I would not expect it
> to be exercised with a single file. But libxml2 is a bit opaque to me, so it
> may be.
>
> Chris

I get the same result with that file. However, with the original file,
if I compress some of the tags onto the same line I can get it to at
least process all of the molecules:
   <bond atomRefs2="a2 a5" order="1"/></bondArray></molecule><molecule>
  <atomArray>

However, then it baulks at the closing </cml>:
*****************************
C[C@@](F)(Cl)Br 
C[C@@](F)(Cl)Br 
:1: parser error : StartTag: invalid element name
</cml>
 ^
==============================
*** Open Babel Error  in XML Parser
  StartTag: invalid element name

C[C@@](F)(Cl)Br 
3 molecules converted
1 errors 1 info messages 121 audit log messages
*****************************

Using "babel -icml myfile.cml -ocan" still works just fine. I realise
you can't debug this, Chris, but I'll file a bug with a description in
any case.

- Noel

------------------------------------------------------------------------------

_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to