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, will output a MOL file with atoms
ordered as per the article.

The downside is it only works on 3D MOLs.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


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 "_smilesAtomOutputOrder"

We should probably make a helper function for this.


Brian Kelley

> On Jun 15, 2017, at 6:27 PM, Dimitri Maziuk  wrote:
> 
>> 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 canonical order of atoms for
>> you: Chem.CanonicalRankAtoms() As I remember correctly the order may differ
>> from the canonical smiles, although that might have changed.
> 
> https://www.nature.com/articles/sdata201773
> 
> Unfortunately we got flooded day before yesterday and the servers doing
> the crunching are currently down.
> 
> -- 
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


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 canonical order of atoms for
> you: Chem.CanonicalRankAtoms() As I remember correctly the order may differ
> from the canonical smiles, although that might have changed.

https://www.nature.com/articles/sdata201773

Unfortunately we got flooded day before yesterday and the servers doing
the crunching are currently down.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


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 remember correctly the order may differ
from the canonical smiles, although that might have changed.


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2017-06-15 9:03 GMT+02:00 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 <
> beren...@bioreg.kyushu-u.ac.jp> wrote:
> >
> > 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.
> >
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


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 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.
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[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.

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss