Re: [Rdkit-discuss] how to append conformer number to molecule name in SDF output file?

2017-06-15 Thread Greg Landrum
Sure you can do this by setting the molecule's "_Name" property before each call to SDWriter.write(). Here's a short example: In [15]: sio = StringIO() In [16]: w = Chem.SDWriter(sio) In [17]: basen = m.GetProp('_Name') In [18]: for conf in m.GetConformers(): ...: cid = conf.GetId()

Re: [Rdkit-discuss] AllChem.GetConformerRMSD: this is not RMSD between two conformers but an upper bound of it

2017-06-15 Thread Brian Kelley
The function you want is GetBestRMS, note that you can set the conformer idx for the probe and ref. http://www.rdkit.org/Python_Docs/rdkit.Chem.AllChem-module.html#GetBestRMS Brian Kelley > On Jun 15, 2017, at 5:30 AM, Francois BERENGER > wrote: > >

Re: [Rdkit-discuss] a 2D to 3D (smi to sdf) conformer generator python script using rdkit

2017-06-15 Thread Greg Landrum
Thanks for letting people know about this. If we can get a consensus form that people agree makes sense, this might be a nice addition to either the RDKit/Scripts directory or the cookbook. A couple of smallish comments after a quick skim: - I would really strongly encourage you to use the ETKDG

Re: [Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Brian Kelley
Yes, atoms are always added in file order. It would take a major change in rdkit to change/violate this. Brian Kelley > On Jun 15, 2017, at 7:52 AM, Francois BERENGER > wrote: > > Hello, > > If I read a molecule from a .sdf file, will the atom indexes

Re: [Rdkit-discuss] AllChem.GetConformerRMSD: this is not RMSD between two conformers but an upper bound of it

2017-06-15 Thread Greg Landrum
On Thu, Jun 15, 2017 at 6:30 AM, Francois BERENGER < beren...@bioreg.kyushu-u.ac.jp> wrote: > > I am afraid that in AllChem.GetConfomerRMSD: one doesn't get the RMSD > between the two conformers but an upper bound of it. > The documentation to this function is misleading: In [21]:

Re: [Rdkit-discuss] a 2D to 3D (smi to sdf) conformer generator python script using rdkit

2017-06-15 Thread Francois BERENGER
On 06/15/2017 03:50 PM, Greg Landrum wrote: Thanks for letting people know about this. If we can get a consensus form that people agree makes sense, this might be a nice addition to either the RDKit/Scripts directory or the cookbook. A couple of smallish comments after a quick skim: - I would

[Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Francois BERENGER
Hello, If I read a molecule from a .sdf file, will the atom indexes be conserved/preserved? 1st atom in the file will have index 0, 2nd index 1, etc. And, will this always hold in the future? Is this an invariant of rdkit? Thanks, F.

Re: [Rdkit-discuss] AllChem.GetConformerRMSD: this is not RMSD between two conformers but an upper bound of it

2017-06-15 Thread Brian Kelley
Thanks for the documentation fix, I had read the same as Francois. Brian Kelley > On Jun 15, 2017, at 8:02 AM, Greg Landrum wrote: > > > >> On Thu, Jun 15, 2017 at 6:30 AM, Francois BERENGER >> wrote: >> >> I am afraid that in

Re: [Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Dimitri Maziuk
On 06/15/2017 01:14 PM, Brian Kelley wrote: > Sorry to hear about the flooding. >> Unfortunately we got flooded day before yesterday and the servers doing >> the crunching are currently down. I should have mentioned that the server (URL is in the article), which I'll hopefully get back up today,

Re: [Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Brian Kelley
Sorry to hear about the flooding. As an aside if you want to get they smiles atom output order, it is saved as a property on the molecule after a call to MolToSmiles, To get to the property, use mol.GetPropsAsDict(True,True) and it will be there with the key named something like

Re: [Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Dimitri Maziuk
On 06/15/2017 10:13 AM, Maciek Wójcikowski wrote: > Hi, > > If you really want to rely on the order of atom you can renumber them > anyhow you like with Chem.RenumberAtoms() > http://rdkit.org/Python_Docs/rdkit.Chem.rdmolops-module.html#RenumberAtoms > There is also a function which returns

Re: [Rdkit-discuss] atom indexes and order of atoms in the input file

2017-06-15 Thread Maciek Wójcikowski
Hi, If you really want to rely on the order of atom you can renumber them anyhow you like with Chem.RenumberAtoms() http://rdkit.org/Python_Docs/rdkit.Chem.rdmolops-module.html#RenumberAtoms There is also a function which returns canonical order of atoms for you: Chem.CanonicalRankAtoms() As I