Re: [Rdkit-discuss] Coordgen library questions

2018-10-10 Thread MARIA BRANDL via Rdkit-discuss
 Hi Lukas,
according to the source 
code:https://github.com/rdkit/rdkit/blob/master/External/CoordGen/CoordGen.h
double coordgenScaling = 50.0; 

the default scaling factor, actually more like a "shrinking factor" seems to be 
50, producing bond lengths of 1A.

For 1.5A bond lengths, you would need to enter a scaling factor of 50.0/1.5, 
maybe this should be changed internally to make it more intuitive ?

The code snippet below may save you the trouble going into pymol for 
measurements. When getting the 50A bond lengths, depiction showed all single 
bonds and did not take bond orders into account, wonder whether that is 
intended.
Best wishes,Maria

from rdkit import Chemfrom rdkit.Chem import rdCoordGenfrom rdkit.Chem import 
rdmolopsmol = Chem.MolFromSmiles('Cc1c1', sanitize=True)mol1 = 
Chem.MolFromSmiles('Cc1c1', sanitize=True)
p = rdCoordGen.CoordGenParams()p.coordgenScaling = 
50.0/1.5rdCoordGen.AddCoords(mol1,p)
print(Chem.MolToMolBlock(mol))print(Chem.MolToMolBlock(mol1))print(rdmolops.Get3DDistanceMatrix(mol1))
Chem.MolToMolFile(mol, 'default.sdf') # bond length 1Chem.MolToMolFile(mol1, 
'scale.mol') # bond length 33.3from rdkit.Chem import rdDepictorfrom 
rdkit.Chem.Draw import IPythonConsole




On Tuesday, 9 October 2018, 14:08:05 BST, Lukas Pravda  
wrote:  
 
 
Hi all,

 

I’m playing with the Coordgen library inside rdkit and I have a couple of 
questions I could not figure out by myself. Hopefully someone more experienced 
will know.

 
   
   - [comment] The way one can pass a scaling factor to the bond size is very 
unintuitive. If I don’t provide any parameter a single bond length is 1.0. If I 
pass 1.5 as a scaling factor, I’d expect to get single bond of a length 1.5. 
But instead I get 33.3. (measured in pymol) 

 

Snippet:

from rdkit import Chem

from rdkit.Chem import rdCoordGen

 

mol = Chem.MolFromSmiles('Cc1c1', sanitize=True)

mol1 = Chem.MolFromSmiles('Cc1c1', sanitize=True)

 

p = rdCoordGen.CoordGenParams()

p.coordgenScaling = 1.5

 

rdCoordGen.AddCoords(mol)

rdCoordGen.AddCoords(mol1, p)

 

Chem.MolToMolFile(mol, 'default.sdf') # bond length 1

Chem.MolToMolFile(mol1, '1.5_scale.sdf') # bond length 33.3

 

 

    Is that intended?

 
   
   - Is there any way to modify templates, which can be passed as the 
‘templateFileDir’ parameter to match general groups and bonds as described 
here: http://rdkit.blogspot.com/2016/07/tuning-substructure-queries-ii.html? 
   - By default, rdCoordGen module writes to stderr by putting ‘TEMPLATES: 
/path/to/templates’ line for each depiction generated. Is there any simple way 
of muting that piece of information without manually hijacking the stderr 
(rdkit.rdBase.DisableLog('rdApp.*') does not work)?

 

Thanks for possible suggestions.

  

  

Cheers, 

Lukas

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

|  | Virus-free. www.avast.com  |

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


[Rdkit-discuss] Coordgen library questions

2018-10-09 Thread Lukas Pravda
Hi all,

 

I’m playing with the Coordgen library inside rdkit and I have a couple of 
questions I could not figure out by myself. Hopefully someone more experienced 
will know.

 
[comment] The way one can pass a scaling factor to the bond size is very 
unintuitive. If I don’t provide any parameter a single bond length is 1.0. If I 
pass 1.5 as a scaling factor, I’d expect to get single bond of a length 1.5. 
But instead I get 33.3. (measured in pymol) 
 

Snippet:

from rdkit import Chem

from rdkit.Chem import rdCoordGen

 

mol = Chem.MolFromSmiles('Cc1c1', sanitize=True)

mol1 = Chem.MolFromSmiles('Cc1c1', sanitize=True)

 

p = rdCoordGen.CoordGenParams()

p.coordgenScaling = 1.5

 

rdCoordGen.AddCoords(mol)

rdCoordGen.AddCoords(mol1, p)

 

Chem.MolToMolFile(mol, 'default.sdf') # bond length 1

Chem.MolToMolFile(mol1, '1.5_scale.sdf') # bond length 33.3

 

 

Is that intended?

 
Is there any way to modify templates, which can be passed as the 
‘templateFileDir’ parameter to match general groups and bonds as described 
here: http://rdkit.blogspot.com/2016/07/tuning-substructure-queries-ii.html? 
By default, rdCoordGen module writes to stderr by putting ‘TEMPLATES: 
/path/to/templates’ line for each depiction generated. Is there any simple way 
of muting that piece of information without manually hijacking the stderr 
(rdkit.rdBase.DisableLog('rdApp.*') does not work)?
 

Thanks for possible suggestions.

 

 

Cheers, 

Lukas

 

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