Re: [Rdkit-discuss] MMFF tunning

2015-05-20 Thread Paolo Tosco

Dear Guillaume,

I am afraid I can't reproduce what you describe. Please look at the 
enclosed Python script, which generates a molecule from your SMILES 
string, then it attempts to embed it multiple times, and for each 
embedding it carries out multiple minimizations.

If you run it with:

./mmffTuning.py -e 100 -m 10

you'll see that for each run the E column is different, which reflects 
the fact that the embedded coordinates are randomly generated, and hence 
give rise to a different energy, while the columns which follow (minE) 
all have the same value, regardless of the min # and even of the run # 
(which means that the molecule only has one stable minimum, 
independently of the starting coordinates).


Kind regards,
Paolo

On 05/20/15 06:28, Guillaume GODIN wrote:

Dear All,

Can you explain me why MMFF optimization do not return the same result 
if you run it multiple times ?


Is there a way to tune it to be able to converge ?

My moleucle example was :  C=C1CC[C@@H]2C[C@H]1C2(C)C

best regards,

*Dr. Guillaume GODIN***

Project Manager

Innovation

CORPORATERD DIVISION

DIRECTLINE +41 (0)22 780 3645

MOBILE   +41 (0)79 536 1039




*Firmenich SA***

RUEDESJEUNES1 | CASEPOSTALE239 | CH-1211 GENEVE8


**
DISCLAIMER
This email and any files transmitted with it, including replies and 
forwarded copies (which may contain alterations) subsequently 
transmitted from Firmenich, are confidential and solely for the use of 
the intended recipient. The contents do not represent the opinion of 
Firmenich except to the extent that it relates to their official 
business.

**


--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


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


#!/usr/bin/env python


import sys
import copy
import argparse
import rdkit
from rdkit import Chem
from rdkit.Chem import AllChem

DEFAULT_SMILES = 'C=C1CC[C@@H]2C[C@H]1C2(C)C'
parser = argparse.ArgumentParser()
parser.add_argument(-e, --embed, type = int,
  help = number of times mol should be embedded)
parser.add_argument(-m, --min, type = int,
  help = number of times mol should be minimized)
parser.add_argument(-s, --seed, type = int,
  help = random seed)
parser.add_argument(-l, --smiles, type = str,
  help = SMILES string)
args = parser.parse_args()
seed = args.seed
if (not seed):
  seed = -1
smiles = args.smiles
if (not smiles):
  smiles = DEFAULT_SMILES
maxEmbed = args.embed
if (not maxEmbed):
  maxEmbed = 1
maxMin = args.min
if (not maxMin):
  maxMin = 1
mol = Chem.MolFromSmiles(smiles)
mol = Chem.AddHs(mol)
energyStr = '{0:10s}'.format('E')
for i in range(maxMin):
  energyStr += '{0:10s}'.format('minE')
sys.stdout.write(energyStr + '\n')
for nEmbed in range(maxEmbed):
  mol3d = copy.copy(mol)
  AllChem.EmbedMolecule(mol3d, randomSeed = seed, useRandomCoords = True)
  mp = AllChem.MMFFGetMoleculeProperties(mol3d)
  ff = AllChem.MMFFGetMoleculeForceField(mol3d, mp)
  energy = ff.CalcEnergy()
  minEnergyList = []
  for nMin in range(maxMin):
molMin = copy.copy(mol3d)
ff = AllChem.MMFFGetMoleculeForceField(molMin, mp)
if (ff.Minimize()):
  sys.exit('need more iterations')
minEnergyList.append(ff.CalcEnergy())
  energyStr = '{0:10.3f}'.format(energy)
  for minEnergy in minEnergyList:
energyStr += '{0:10.3f}'.format(minEnergy)
  sys.stdout.write(energyStr + '\n')
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] MMFF tunning

2015-05-19 Thread Guillaume GODIN
Dear All,

Can you explain me why MMFF optimization do not return the same result if you 
run it multiple times ?

Is there a way to tune it to be able to converge ?

My moleucle example was :  C=C1CC[C@@H]2C[C@H]1C2(C)C

best regards,

Dr. Guillaume GODIN
Project Manager
Innovation
CORPORATE RD DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE   +41 (0)79 536 1039

Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8


**  
DISCLAIMER  
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.  
**--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss