Hi Greg, I would expect to have:
SMILES Name c1ccccc1 0 instead of SMILES Name c1ccccc1 Note, that for SMILES there is also no place to specify a name but if I create a mol object from SMILES I will get the desired output. On Tue, Apr 21, 2015 at 4:20 PM, Greg Landrum <greg.land...@gmail.com> wrote: > Michal, > > What do you expect to get for the molecule from the CTAB? In the example > below, it does not have anything in the first line, which is the one that's > used to populate the _Name attribute. > > -greg > > > On Tue, Apr 21, 2015 at 4:32 PM, Michał Nowotka <mmm...@gmail.com> wrote: >> >> Hi, >> >> Imagine I have two rdkit mol objects, one from SD and one from SMILES: >> >> import os >> import StringIO >> from rdkit.Chem import SDMolSupplier >> from rdkit.Chem import SmilesMolSupplier >> from rdkit.Chem import SmilesWriter >> >> mol = ''' >> MJ150413 >> >> 6 6 0 0 0 0 0 0 0 0999 V2000 >> 0.7144 1.2375 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 1.4289 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 1.4289 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.7144 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 0.0000 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> 1 2 2 0 0 0 0 >> 2 3 1 0 0 0 0 >> 3 4 2 0 0 0 0 >> 4 5 1 0 0 0 0 >> 5 6 2 0 0 0 0 >> 1 6 1 0 0 0 0 >> M END >> ''' >> >> suppl = SDMolSupplier() >> suppl.SetData(mol) >> fromSD = suppl.next() >> >> suppl = SmilesMolSupplier() >> suppl.SetData('C', titleLine=False) >> fromSMILES = suppl.next() >> >> >> Now I want to convert them to SMILES. For the mol from SD, the >> identifier is missing: >> >> sio = StringIO.StringIO() >> w = SmilesWriter(sio, delimiter=' ', nameHeader='Name', >> includeHeader=True, isomericSmiles=False, kekuleSmiles=False) >> w.write(fromSD) >> w.flush() >> print sio.getvalue() >> >> >>> SMILES Name >> >>> c1ccccc1 >> >> but for mol from SMILES it's fine: >> >> w.write(fromSMILES) >> w.flush() >> print sio.getvalue() >> >> >>> SMILES Name >> >>> c1ccccc1 >> >>> C 1 >> >> >> Is that a bug or an expected behavior? Is it possible to get >> identifiers for both mols? >> >> >> Kind regards, >> >> Michał Nowotka >> >> >> ------------------------------------------------------------------------------ >> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT >> Develop your own process in accordance with the BPMN 2 standard >> Learn Process modeling best practices with Bonita BPM through live >> exercises >> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- >> event?utm_ >> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF >> _______________________________________________ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > ------------------------------------------------------------------------------ BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss