Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For confidential or other support please email.
The time now is Tue Feb 09, 2010 12:41 pm
 <b>Register</b> (required to post and download)Register (required to post and download)
 Username:    Password:   Remember login       
 FAQFAQ   SearchSearch   DigestsDigests 
dreiding energy calculation
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic    Home -> Forums -> Support -> Library profiling: Structure based prediction & Chemical Terms -> dreiding energy calculation

Display posts from previous:        View previous topic :: View next topic    
Author Message
bobgr
Joined: 15 Jun 2004
Posts: 1288


View user's profile

Visit poster's website

Back to top
Post subject: dreiding energy calculation
Link to postPosted: Mon Sep 17, 2007 5:54 pm  Reply with quote

Hello,

The code:

Code:
        GeometryPlugin plugin = new GeometryPlugin();
        plugin.setCalculateForLEConformer("always");
        plugin.setCalculateEnergy(true);
        int start = stereoisomers.size() - 1;
        System.out.println("specifyUnspecifiedConfigs: before energy check, "
                + "stereoisomers are " + Utils.printMolArrayList(stereoisomers));
        for (int isomerNum = start; isomerNum >= 0; isomerNum--) {
            try {
                plugin.setMolecule(stereoisomers.get(isomerNum));
                plugin.run();
                double energy = plugin.getDreidingEnergy();
                if (energy > MAX_DREIDING_ENERGY)
                    System.out.println("specifyUnspecifiedConfigs: removing "
                            + stereoisomers.remove(isomerNum).toFormat("smiles")
                            + " from list of stereoisomers due to strain of "
                            + energy + ".");
                else System.out.println("specifyUnspecifiedConfigs: "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + " has insufficient strain energy, " + energy
                        + ", to be removed.");
            } catch (PluginException e) {
                System.out.println("MolFunctions.specifyUnspecifiedConfigs: "
                        + "caught PluginException calculating energy of "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + "; continuing.");
            } // try
        } // for each stereoisomer


The output:

Code:
specifyUnspecifiedConfigs: [H]C1C[C@@H]2C[C@H]1c3ccccc3C2 has insufficient strain energy, 42.62, to be removed.
specifyUnspecifiedConfigs: [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2 has insufficient strain energy, 42.62, to be removed.
specifyUnspecifiedConfigs: Cl[H] has insufficient strain energy, 0.0, to be removed.


I am concerned that [H]C1C[C@@H]2C[C@H]1c3ccccc3C2 and [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2 are calculated to have the same Dreiding energy.
Zsolt
Joined: 11 Jan 2006
Posts: 525
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject: Re: dreiding energy calculation
Link to postPosted: Fri Sep 21, 2007 10:51 am  Reply with quote

Hi,
bobgr wrote:
I am concerned that [H]C1C[C@@H]2C[C@H]1c3ccccc3C2 and [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2 are calculated to have the same Dreiding energy.
In fact their lowest energy conformers have the same Dreiding energy.

Code:
plugin.setCalculateForLEConformer("always");

This line means: take the lowest energy conformer of the input molecule (and then calculate its Dreiding energy).

Zsolt
bobgr
Joined: 15 Jun 2004
Posts: 1288


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Fri Sep 21, 2007 1:50 pm  Reply with quote

They cannot possibly have the same Dreiding energy. They are diastereomers, and one of them is impossibly strained (i.e., cannot exist).
TobiasKind
Joined: 26 Jan 2005
Posts: 457


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Fri Sep 21, 2007 7:33 pm  Reply with quote

Hi,
you could use the conformer API option to distinguish between them. However I wonder why the nonexistent (?) (R,S) has the lower energy in this example and the (S,S) with the more favorable strain energy has the high energy. I suspect an artefact. How could the (S,S) molecule not flip into the favorable position? I think the pure 2D view is misleading and if you view the molecule in Marvin as 3D view its better to understand, but I don't have time to include these right now.


Now the interesting part, if you change in MArvin view to 3D view it and calculate the name it will generate a different name (because it switched to the more favorable position (bug or feature, actually the tool should inform the user that the conformation changed). So actually on can use the stereoisomer generator to generate all 4 possible positions (R/S,R/R,S/S,S/R).

R/R switches to S/R - 134 kcal/mol ( different to last)
R/S switches to R/S - 40 kcal/mol
S/R switches to S/R - 40 kcal/mol
S/S switches to S/R - 140 kcal/mol (different to first)

The Dreiding and conformer energies for the lowest energy conformers in Marvin always(?) give different results. So its obvious that the Dreiding model can not handle that.

Tobias



 Filename: stereoisomers.png    Filesize: 47.07 KB    Viewed: 3575 Time(s)
 Description:  
stereoisomers.png

 Filename: dreiding-vs-conformers.png    Filesize: 134.41 KB    Viewed: 3575 Time(s)
 Description:  
dreiding-vs-conformers.png
bobgr
Joined: 15 Jun 2004
Posts: 1288


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Fri Sep 21, 2007 7:55 pm  Reply with quote

TobiasKind wrote:
Hi,
you could use the conformer API option to distinguish between them.
According to Zsolt, the hasValidConformer() method uses dreidingEnergy. So your suggestion won't work.
Quote:
However I wonder why the nonexistent (?) (R,S) has the lower energy in this example and the (S,S) with the more favorable strain energy has the high energy. I suspect an artefact.
I suspect a bug. Configurations should not change when calculating conformational energies.
Quote:
How could the (S,S) molecule not flip into the favorable position? I think the pure 2D view is misleading and if you view the molecule in Marvin as 3D view its better to understand, but I don't have time to include these right now.
I have generated these diastereomers in a Java method, not in Marvin. I am trying to rule out the ones that are unreasonably strained. The method that calculates their energy in their lowest energy conformation should not be changing the configurations to make a more reasonable, unstrained compound. If it cannot arrive at a minimum-energy conformation without changing configurations, it should return the largest value for energy allowed.
TobiasKind
Joined: 26 Jan 2005
Posts: 457


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Fri Sep 21, 2007 11:52 pm  Reply with quote

bobgr wrote:
TobiasKind wrote:
Hi,
you could use the conformer API option to distinguish between them.
According to Zsolt, the hasValidConformer() method uses dreidingEnergy. So your suggestion won't work.

Hi,
why not? You compared the (S,R) and (R,R).
So they show a different energy. This is the output:

Code:

4 stereoisomers found from SMILES: [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
(1R,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2
(1R,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@H]2C[C@@H]1c3ccccc3C2
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
(1S,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@H]2C[C@H]1c3ccccc3C2
Diversity: 0.1 Time: 5.09246305 sec. *******************
(1R,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 0: 134.18 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@]3([H])C([H])([H])C([H])([H])C2([H])C3([H])[H]
Diversity: 0.1 Time: 7.208662522 sec. *******************
(1R,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 1: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@@]3([H])C([H])([H])C([H])([H])[C@]2([H])C3([H])[H]
Diversity: 0.1 Time: 5.928611871 sec. *******************
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 2: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@]3([H])C([H])([H])C([H])([H])[C@@]2([H])C3([H])[H]
Diversity: 0.1 Time: 6.706793282 sec. *******************
(1S,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 3: 140.2 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])C3([H])C([H])([H])C([H])([H])[C@@]2([H])C3([H])[H]


if you change the StereoisomerPlugin to plugin.setIn3D(true)
you get this (the name swapper) 3 times (S,R)

Code:

4 stereoisomers found from SMILES: [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
(1R,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@H]2C[C@@H]1c3ccccc3C2
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene   [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
Diversity: 0.1 Time: 6.042378394 sec. *******************
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 0: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@]3([H])C([H])([H])C([H])([H])[C@@]2([H])C3([H])[H]
Diversity: 0.1 Time: 8.151239342 sec. *******************
(1R,9S)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 1: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@@]3([H])C([H])([H])C([H])([H])[C@]2([H])C3([H])[H]
Diversity: 0.1 Time: 5.962294214 sec. *******************
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 2: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@]3([H])C([H])([H])C([H])([H])[C@@]2([H])C3([H])[H]
Diversity: 0.1 Time: 5.766351052 sec. *******************
(1S,9R)-tricyclo[7.2.1.0^{2,7}]dodeca-2(7),3,5-triene
Lowest energy of stereoisomer 3: 40.47 kcal/mol
[H]c1c([H])c([H])c2c(c1[H])C([H])([H])[C@]3([H])C([H])([H])C([H])([H])[C@@]2([H])C3([H])[H]



This is the code:
Code:

package examples;

import java.io.*;
import chemaxon.struc.Molecule;
import chemaxon.util.MolHandler;
import chemaxon.formats.MolFormatException;
import chemaxon.formats.MolImporter;
import chemaxon.marvin.calculations.ConformerPlugin;
import chemaxon.marvin.calculations.StereoisomerPlugin;
import chemaxon.marvin.plugin.PluginException;

public class createAllStereoIsomerLowEnergyConformers {


   public static void main(String[] args) {
      try {
         // read input molecule - example [H]C1C[C@@H]2C[C@H]1c3ccccc3C2
         String filename = "z:strain-energy-mol.smi";
         MolImporter mi = new MolImporter(filename);
         Molecule mol = mi.read();
         mi.close();

         //**** !!! important remove this if you read from a file
         MolHandler mh = new MolHandler("[H]C1C[C@@H]2C[C@H]1c3ccccc3C2");
         mol = mh.getMolecule();
         //**** !!! end

         // create plugin
         StereoisomerPlugin plugin = new StereoisomerPlugin();
         // set target molecule
         plugin.setMolecule(mol);
         //who knows ??
         plugin.standardize(mol);


         // set parameters for calculation
         /* Sets which type of stereoiseomers should be generated. Available values:
          * TETRAHEDRAL : tetrahedral stereoisomers are generated
          * DOUBLE_BOND : double bond stereoisomers are generated
          * BOTH : tetrahedral and double bond stereoisomers are generated (in fact tetrahedral stereoisomers of double bond stereoisomers are generated)
             you need to create your own const as the parameter expects int
          */

         plugin.setStereoisomerismType(1);   
         // if not set all stereoisomers are generated
         plugin.setMaxNumberOfStereoisomers(2048);    
         //filter invalid stereos
         plugin.setCheck3DStereo(true);        // default: false
         //  Sets to display the molecule in 3D. false is default (if true  currently wrong results)
         plugin.setIn3D(false);           // default: false

         // run the calculation
         plugin.run();

         // get results
         Molecule[] stereoisomers = plugin.getStereoisomers();
         Molecule m;
         int stereoisomerCount = plugin.getStereoisomerCount();
         System.out.println(stereoisomerCount+" stereoisomers found from SMILES: "+mol.toFormat("smiles"));


         // print all names first for comparison
         for (int i = 0; i < stereoisomerCount; ++i)
         {
            m = stereoisomers[i];
            System.out.println(m.toFormat("name")+"\t"+m.toFormat("cxsmiles"));
         }
         // do something with all the stereoisomers
         for (int i = 0; i < stereoisomerCount; ++i)
         {
            //    same as m = plugin.getStereoisomer(i);
            m = stereoisomers[i];   
            String myName = m.toFormat("name");

            //   ***************** now start our big monolithic FORTRESS style conformer block
            Molecule[] confs = null;
            ConformerPlugin CPlugin = new ConformerPlugin();
            CPlugin.setMolecule(m);
            //number of conformers to be calculated
            final int MAX_CONFORMERS = 1;
            CPlugin.setMaxNumberOfConformers(MAX_CONFORMERS);
            CPlugin.setPrehydrogenize(true);
            CPlugin.setHyperfine(true);
            //CPlugin.setOptimization(ConformerPlugin.OPTIMIZATION_STRICT);
            CPlugin.setOptimization(ConformerPlugin.OPTIMIZATION_VERY_STRICT);

            // we want the low energy conformers (set false if you want more)
            CPlugin.setLowestEnergyConformerCalculation(true);
            CPlugin.setTimelimit(3600);

            for ( int j = 1; j < MAX_CONFORMERS+1;j++) {
               CPlugin.setDiversity(0.1*j);
               long startT = System.nanoTime();

               CPlugin.run();
               confs = CPlugin.getConformers();
               long endT = System.nanoTime();
               System.out.println("Diversity: "+0.1*j+" Time: "+(endT-startT)/1E9+" sec. *******************");

               for (int k = 0; k < CPlugin.getConformerCount() ; k++) {
                  System.out.println(myName);
                  System.out.println("Lowest energy of stereoisomer " + i + ": " + confs[k].getProperty("Energy")+" kcal/mol");

                  // to check the SDfile property fields comment out the line below
                  // System.err.println(confs[k].toFormat("sdf"));
                  System.out.println(confs[k].toFormat("smiles"));
               }   
               // *****************  END of our big monolithic FORTRESS style conformer block
            }
         }
      } catch (MolFormatException e) {
         e.printStackTrace();
      } catch (IOException e) {
         e.printStackTrace();
      } catch (PluginException e) {
         e.printStackTrace();
      }
   }
}



Tobias
TobiasKind
Joined: 26 Jan 2005
Posts: 457


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Sat Sep 22, 2007 5:50 am  Reply with quote

Hi,
I think the conformer generation works pretty well,
here are some results with PM6 from Mopac2007 (this link also contains datasets for comparisons) other
stuff can be downloaded from the CCCBDB from NIST:

134.18 kcal/mol PM6 431.86883 KJ (431.86883 kilojoules = 103.219128 kilocalories)
40.47 kcal/mol PM6 27.25763 KJ (27.25763 kilojoules = 6.51472992 kilocalories)
40.47 kcal/mol PM6 27.25761 KJ (27.25763 kilojoules = 6.51472992 kilocalories)
140.2 kcal/mol PM6 428.75878 KJ (428.75878 kilojoules = 102.475808 kilocalories)

which is in accordance with the energies from the lowest conformer.
I attached the source an outputs were the last file had problems with PM6 (bond broken) so I had to do an PM3 computation first. Actually the PM6 computation
is quite fast, so it would be easy to do a quick Marvin conformer calculation and send then everything to PM6 (at least for small molecules)

Tobias



 Filename: stereo.zip    Filesize: 27.91 KB    Downloaded: 179 Time(s)
 Description:  
ofarkas
Joined: 03 Jun 2004
Posts: 87
ChemAxon personnel

View user's profile

Visit poster's website

Back to top
Post subject: Re: dreiding energy calculation
Link to postPosted: Sun Sep 23, 2007 9:56 am  Reply with quote

Hi,

This seems to be a bug, thank you for reporting. We are going to fix it ASAP. The reason is that the second structure is invalid but the buildup process does not detect that correctly.

Best wishes,

Ödön
bobgr wrote:
Hello,

The code:

Code:
        GeometryPlugin plugin = new GeometryPlugin();
        plugin.setCalculateForLEConformer("always");
        plugin.setCalculateEnergy(true);
        int start = stereoisomers.size() - 1;
        System.out.println("specifyUnspecifiedConfigs: before energy check, "
                + "stereoisomers are " + Utils.printMolArrayList(stereoisomers));
        for (int isomerNum = start; isomerNum >= 0; isomerNum--) {
            try {
                plugin.setMolecule(stereoisomers.get(isomerNum));
                plugin.run();
                double energy = plugin.getDreidingEnergy();
                if (energy > MAX_DREIDING_ENERGY)
                    System.out.println("specifyUnspecifiedConfigs: removing "
                            + stereoisomers.remove(isomerNum).toFormat("smiles")
                            + " from list of stereoisomers due to strain of "
                            + energy + ".");
                else System.out.println("specifyUnspecifiedConfigs: "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + " has insufficient strain energy, " + energy
                        + ", to be removed.");
            } catch (PluginException e) {
                System.out.println("MolFunctions.specifyUnspecifiedConfigs: "
                        + "caught PluginException calculating energy of "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + "; continuing.");
            } // try
        } // for each stereoisomer


The output:

Code:
specifyUnspecifiedConfigs: [H]C1C[C@@H]2C[C@H]1c3ccccc3C2 has insufficient strain energy, 42.62, to be removed.
specifyUnspecifiedConfigs: [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2 has insufficient strain energy, 42.62, to be removed.
specifyUnspecifiedConfigs: Cl[H] has insufficient strain energy, 0.0, to be removed.


I am concerned that [H]C1C[C@@H]2C[C@H]1c3ccccc3C2 and [H]C1C[C@@H]2C[C@@H]1c3ccccc3C2 are calculated to have the same Dreiding energy.
bobgr
Joined: 15 Jun 2004
Posts: 1288


View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Sun Sep 23, 2007 5:54 pm  Reply with quote

TobiasKind wrote:
bobgr wrote:
TobiasKind wrote:
Hi,
you could use the conformer API option to distinguish between them.
According to Zsolt, the hasValidConformer() method uses dreidingEnergy. So your suggestion won't work.

Hi,
why not? You compared the (S,R) and (R,R).
So they show a different energy.
Ah, I see you are using the StereoisomerPlugin, and you are using setCheck3DStereo to rule out impossibly strained isomers. But I don't want to use the StereoisomerPlugin in my method, because I only want to operate on stereocenters with unspecified configurations.

I tried using the ConformerPlugin.hasValidConformer(), and I got this result:
Quote:
specifyUnspecifiedConfigs: before reasonableness check, stereoisomers are {C1C[C@H]2CC[C@H]1C2.C3C[C@@H]4CC[C@H]3C4}
specifyUnspecifiedConfigs: C1C[C@@H]2CC[C@H]1C2 has a reasonable conformation.
No regular build due to fallback.
Clean failed.
C1C[C@H]2CC[C@H]1C2
specifyUnspecifiedConfigs: C1C[C@H]2CC[C@H]1C2 has a reasonable conformation.
The relevant code:

Code:
        ConformerPlugin plugin = new ConformerPlugin();
        System.out.println("specifyUnspecifiedConfigs: before reasonableness check, "
                + "stereoisomers are " + Utils.printMolArrayList(stereoisomers));
        int start = stereoisomers.size() - 1;
        for (isomerNum = start; isomerNum >= 0; isomerNum--) {
            try {
                plugin.setMolecule(stereoisomers.get(isomerNum));
                plugin.run();
                if (plugin.hasValidConformer())
                    System.out.println("specifyUnspecifiedConfigs: removing "
                            + stereoisomers.remove(isomerNum).toFormat("smiles")
                            + " from list of stereoisomers due to absence of "
                            + "reasonable conformer.");
                else System.out.println("specifyUnspecifiedConfigs: "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + " has a reasonable conformation.");
            } catch (PluginException e) {
                System.out.println("MolFunctions.specifyUnspecifiedConfigs: "
                        + "caught PluginException calculating conformers of "
                        + stereoisomers.get(isomerNum).toFormat("smiles")
                        + "; continuing.");
            } // try   
        } // for each stereoisomer


So it appears that Ödön's comment applies as well to ConformerPlugin.hasValidConformer() as it does to GeometryPlugin.getDreidingEnergy(). But it evidently does *not* apply to StereoisomerPlugin.run() when preceded by setCheck3DStereo(true).
Display posts from previous:   
Reply to topic    Home -> Forums -> Library profiling: Structure based prediction & Chemical Terms -> dreiding energy calculation All times are GMT + 1 Hour
Page 1 of 1
To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum