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


Re: [Rdkit-discuss] Line recall/edit non-functional in Python 3.6.5 interpreter from miniconda3 RDKit install?

2018-09-18 Thread MARIA BRANDL via Rdkit-discuss
 Dear Ian,
print(Chem.MolToMolBlock(ps[0][0]))  

produces:
 RDKit  2D

  6  5  0  0  0  0  0  0  0  0999 V2000
6.49520.75000. O   0  0  0  0  0  0  0  0  0  0  0  0
5.1962   -0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
3.89710.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
2.5981   -0.0. S   0  0  0  0  0  0  0  0  0  0  0  0
1.29900.75000. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  2  0
  2  3  1  0
  3  4  1  0
  4  5  1  0
  5  6  1  0
M  END 
so GetSubstructMatch returns the indices in the order provided by the query.I 
think, the re-ordering happens when the molecule is put into a smiles string.
Best wishes,
Maria

On Tuesday, 18 September 2018, 20:46:54 CEST, Ian Tickle 
 wrote:  
 
 Hi all, I'm finding that the line recall/edit function is broken in the Python 
3.6.5 interpreter from miniconda3 installation of RDKit, i.e. the arrow keys 
just type out the escape sequences.
If I use miniconda2 instead it's fine.  Also line recall/edit works in the 
system (Kubuntu 18.04.1) versions of Python 2.7.15 and Python 3.6.5.
Presumably some customisation of the Python version installed by miniconda3 is 
required?
Cheers
-- Ian J. TickleGlobal Phasing Ltd., Cambridge, UK.
___
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