Mol file and special characters

User 7b0ee04e66

01-12-2006 09:49:47

Hello,





I am creating an SD file which needs to be compatible with MDL ISIS applications.





I was using the code below





Code:
 String s = mol.toFormat("mol");






and my SD file was invalid.





By adding the line below





Code:
s = s.replaceAll("\n", System.getProperty("line.separator"));






my SD file is compatible.


Would it be possible to make it the default behaviour of the Molecule.toFormat method?





Thanks


Catherine

ChemAxon 7c2d26e5cf

01-12-2006 14:57:28

Quote:
Would it be possible to make it the default behaviour of the Molecule.toFormat method?
No, it is not possible. It would cause compatibility and other problems (both in our programs and in our users one).


If you would like to use system dependent line separator, use the MolConverter API. In the constructor of MolConverter, you can specify the usage of system dependent line separator.


By the way, the MolConverter application writes system dependent line separators in the output file.

User 7b0ee04e66

04-12-2006 14:19:04

Thanks, I will use MolConverter.


Catherine