Re: [Rdkit-discuss] 64 bit Morgan Fingerpronts

2021-04-21 Thread Wojtek Plonka
Hi Gareth,

Thank you. I do exactly as you wrote. That's not the issue.
Please note, that all the keys in elements are in range of 2**32 - the main
hash function used is definitely 32 bit

According to
https://www.rdkit.org/docs/source/rdkit.Chem.rdFingerprintGenerator.html
both *class *rdkit.Chem.rdFingerprintGenerator.FingerprintGenerator32
and *class *rdkit.Chem.rdFingerprintGenerator.FingerprintGenerator64
exist.

However with my limited knowledge I don't know how to access the 64 bit
version and that is my problem.
Kindest regards,

Wojtek

Wojtek Plonka
+48885756652
wojtekplonka.com 
fb.com/wojtek.plonka



On Thu, Apr 22, 2021 at 1:27 AM Gareth Jones  wrote:

> Wojtek,
>
> You can use GetNonzeroelements() to convert the sparse fingerprint to a
> Python Dict of hash to count.
>
> Cheers,
> Gareth
>
>
> In [7]: mol = Chem.MolFromSmiles('Cn1cnc2n(C)c(=O)n(C)c(=O)c12')
>
> In [8]: fp = AllChem.GetMorganFingerprint(mol, 2)
>
> In [9]: elements = fp.GetNonzeroElements();
>
> In [10]: elements
> Out[10]:
> {10565946: 2,
>  348155210: 1,
>  476388586: 1,
>  540046244: 1,
>  553412256: 1,
>  864942730: 2,
>  909857231: 1,
>  1100037548: 1,
>  1333761024: 1,
>  1512818157: 1,
>  1981181107: 1,
>  2030573601: 1,
>  2041434490: 1,
>  2092489639: 3,
>  2246728737: 3,
>  2370996728: 1,
>  2877515035: 1,
>  2971716993: 1,
>  2975126068: 2,
>  3140581776: 1,
>  3217380708: 4,
>  3218693969: 1,
>  3462333187: 1,
>  3657471097: 3,
>  3796970912: 1}
>
> In [11]:
> On 4/21/2021 5:44 AM, Wojtek Plonka wrote:
>
> Dear All
>
> Do any of you have a working example of getting Morgan Fingerprints, as
> sparse bit vector (non-hashed) in the 64 bit version using Python?
> I'm looking into the issue of collisions on the "main hash" on large (100+
> million molecules) data
> Thank you very much!
> Kindest regards,
>
> Wojtek Plonka
> +48885756652
> wojtekplonka.com 
> fb.com/wojtek.plonka
>
>
>
> ___
> Rdkit-discuss mailing 
> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] compute canonical transform of a conformer fails

2021-04-21 Thread Rafael L via Rdkit-discuss
I tested your code on several structures and noticed that it failed on
molecules with only one element (NH3, OH2...).
Then I checked
https://www.rdkit.org/docs/source/rdkit.Chem.rdMolTransforms.html and saw
that the default ignores hydrogens. So try
Chem.rdMolTransforms.ComputeCanonicalTransform(conf, ignoreHs=False) in the
last line and see if it fixes your problem.
Regards

Em qua., 21 de abr. de 2021 às 07:21, Pablo Ramos 
escreveu:

> Dear community,
>
>
>
> I want to pick a fragment from a molecule, and canonicalize its conformer
> in order to align its principal moments of inertia. However, this does not
> seem to work. Any idea why this could be happening?
>
>
>
> mol1 = Chem.MolFromSmiles('[H]C([H])=O.[H]N([H])[H]')
>
> mol1 = Chem.AddHs(mol1)
>
> for fragment in Chem.GetMolFrags(mol1, asMols=True):
>
> AllChem.EmbedMolecule(fragment, useRandomCoords=False)
>
> conf = fragment.GetConformer()
>
> Chem.rdMolTransforms.ComputeCanonicalTransform(conf)
>
>
>
> RuntimeError: Invariant Violation
>
>
>
> Violation occurred on line 298 in file
> Code/GraphMol/MolTransforms/MolTransforms.cpp
>
> Failed Expression: dim >= 1
>
> RDKIT: 2021.03.1
>
> BOOST: 1_74
>
>
>
>
>
> Best regards,
>
>
>
> *Pablo Ramos*
> Ph.D. at Covestro Deutschland AG
>
>
>
>
>
> covestro.com 
>
> *Telephone*
>
> +49 214 6009 7356
>
>
>
> Covestro Deutschland AG
>
> COVDEAG-Chief Commer-PUR-R&D-EMEA-PMD
>
> B103, R164
>
> 51365 Leverkusen, Germany
>
> *pablo.ra...@covestro.com *
>
>
>
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>


-- 
Rafael da Fonseca Lameiro
[image: orcid logo 16px] https://orcid.org/-0003-4466-2682
PhD Student - Medicinal and Biological Chemistry Group (NEQUIMED)
São Carlos Institute of Chemistry - University of São Paulo - Brazil
Av. Trabalhador Sancarlense, 400 - ZIP code: 13566-590 - São Carlos/SP
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] 64 bit Morgan Fingerpronts

2021-04-21 Thread Gareth Jones

Wojtek,

You can use GetNonzeroelements() to convert the sparse fingerprint to a 
Python Dict of hash to count.


Cheers,
Gareth


In [7]: mol = Chem.MolFromSmiles('Cn1cnc2n(C)c(=O)n(C)c(=O)c12')

In [8]: fp = AllChem.GetMorganFingerprint(mol, 2)

In [9]: elements = fp.GetNonzeroElements();

In [10]: elements
Out[10]:
{10565946: 2,
 348155210: 1,
 476388586: 1,
 540046244: 1,
 553412256: 1,
 864942730: 2,
 909857231: 1,
 1100037548: 1,
 1333761024: 1,
 1512818157: 1,
 1981181107: 1,
 2030573601: 1,
 2041434490: 1,
 2092489639: 3,
 2246728737: 3,
 2370996728: 1,
 2877515035: 1,
 2971716993: 1,
 2975126068: 2,
 3140581776: 1,
 3217380708: 4,
 3218693969: 1,
 3462333187: 1,
 3657471097: 3,
 3796970912: 1}

In [11]:

On 4/21/2021 5:44 AM, Wojtek Plonka wrote:

Dear All

Do any of you have a working example of getting Morgan Fingerprints, 
as sparse bit vector (non-hashed) in the 64 bit version using Python?
I'm looking into the issue of collisions on the "main hash" on large 
(100+ million molecules) data

Thank you very much!
Kindest regards,

Wojtek Plonka
+48885756652
wojtekplonka.com 
fb.com/wojtek.plonka 



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Availability of new command line Psi4 scripts powered by RDKit

2021-04-21 Thread Manish Sud
Hi JW,

 

Yes, I do. It’s on the list of things to do. It would be similar to the current 
script RDKitPerformTorsionScan.py 
 , but 
use Psi4 on the backend.

 

Thanks,

Manish

 

From: JW Feng  
Sent: Wednesday, April 21, 2021 10:04 AM
To: Manish Sud 
Cc: RDKit Discuss 
Subject: Re: [Rdkit-discuss] Availability of new command line Psi4 scripts 
powered by RDKit

 

Hi Manish,

 

This is great. I used Psi4 extensively for torsional scans while at Denali. Do 
you plan to include scripts for torsional scans? 

 

Best,

 

JW

 

On Wed, Apr 21, 2021 at 9:11 AM Manish Sud mailto:m...@san.rr.com> > wrote:

Hi All,

 

I'll like to share with you the availability of the following new command line 
Python scripts based on Psi4:

 

o Psi4CalculateEnergy.py

o Psi4CalculatePartialCharges.py

o Psi4CalculateProperties.py

o Psi4GenerateConformers.py

o Psi4PerformMinimization.py

o Psi4VisualizeDualDescriptors.py

o Psi4VisualizeElectrostaticPotential.py

o Psi4VisualizeFrontierOrbitals.py

 

These scripts rely on the availability of Psi4 and RDKit in your environment. 
The RDKit is used for a variety of tasks including reading and writing 
molecules, generating initial 3D coordinates and conformers of molecules, and 
removing similar conformers. In addition, multiprocessing functionality is 
available across all the scripts.

 

Some of you might find these scripts useful. Please visit  
www.MayaChemTools.org   for further details.

 

Your feedback is welcome.

 

Thanks,

Manish

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net 
 
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Availability of new command line Psi4 scripts powered by RDKit

2021-04-21 Thread JW Feng
Hi Manish,

This is great. I used Psi4 extensively for torsional scans while at Denali.
Do you plan to include scripts for torsional scans?

Best,

JW

On Wed, Apr 21, 2021 at 9:11 AM Manish Sud  wrote:

> Hi All,
>
>
>
> I'll like to share with you the availability of the following new command
> line Python scripts based on Psi4:
>
>
>
> o Psi4CalculateEnergy.py
>
> o Psi4CalculatePartialCharges.py
>
> o Psi4CalculateProperties.py
>
> o Psi4GenerateConformers.py
>
> o Psi4PerformMinimization.py
>
> o Psi4VisualizeDualDescriptors.py
>
> o Psi4VisualizeElectrostaticPotential.py
>
> o Psi4VisualizeFrontierOrbitals.py
>
>
>
> These scripts rely on the availability of Psi4 and RDKit in your
> environment. The RDKit is used for a variety of tasks including reading and
> writing molecules, generating initial 3D coordinates and conformers of
> molecules, and removing similar conformers. In addition, multiprocessing
> functionality is available across all the scripts.
>
>
>
> Some of you might find these scripts useful. Please visit
> www.MayaChemTools.org for further details.
>
>
>
> Your feedback is welcome.
>
>
>
> Thanks,
>
> Manish
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Availability of new command line Psi4 scripts powered by RDKit

2021-04-21 Thread Manish Sud
Hi All,

 

I'll like to share with you the availability of the following new command
line Python scripts based on Psi4:

 

o Psi4CalculateEnergy.py

o Psi4CalculatePartialCharges.py

o Psi4CalculateProperties.py

o Psi4GenerateConformers.py

o Psi4PerformMinimization.py

o Psi4VisualizeDualDescriptors.py

o Psi4VisualizeElectrostaticPotential.py

o Psi4VisualizeFrontierOrbitals.py

 

These scripts rely on the availability of Psi4 and RDKit in your
environment. The RDKit is used for a variety of tasks including reading and
writing molecules, generating initial 3D coordinates and conformers of
molecules, and removing similar conformers. In addition, multiprocessing
functionality is available across all the scripts.

 

Some of you might find these scripts useful. Please visit
www.MayaChemTools.org   for further details.

 

Your feedback is welcome.

 

Thanks,

Manish

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] 64 bit Morgan Fingerpronts

2021-04-21 Thread Wojtek Plonka
Dear All

Do any of you have a working example of getting Morgan Fingerprints, as
sparse bit vector (non-hashed) in the 64 bit version using Python?
I'm looking into the issue of collisions on the "main hash" on large (100+
million molecules) data
Thank you very much!
Kindest regards,

Wojtek Plonka
+48885756652
wojtekplonka.com 
fb.com/wojtek.plonka
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] compute canonical transform of a conformer fails

2021-04-21 Thread Pablo Ramos
Dear community,

I want to pick a fragment from a molecule, and canonicalize its conformer in 
order to align its principal moments of inertia. However, this does not seem to 
work. Any idea why this could be happening?

mol1 = Chem.MolFromSmiles('[H]C([H])=O.[H]N([H])[H]')
mol1 = Chem.AddHs(mol1)
for fragment in Chem.GetMolFrags(mol1, asMols=True):
AllChem.EmbedMolecule(fragment, useRandomCoords=False)
conf = fragment.GetConformer()
Chem.rdMolTransforms.ComputeCanonicalTransform(conf)

RuntimeError: Invariant Violation

Violation occurred on line 298 in file 
Code/GraphMol/MolTransforms/MolTransforms.cpp
Failed Expression: dim >= 1
RDKIT: 2021.03.1
BOOST: 1_74


Best regards,

Pablo Ramos
Ph.D. at Covestro Deutschland AG

[cid:image001.png@01D736A7.2701D9B0]

covestro.com
Telephone
+49 214 6009 7356

Covestro Deutschland AG
COVDEAG-Chief Commer-PUR-R&D-EMEA-PMD
B103, R164
51365 Leverkusen, Germany
pablo.ra...@covestro.com


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss