User a9d76a1173
21-11-2011 20:56:04
How do I do a 3D cleaning with Gradient Optimization using API..I can't see an option for this??
molecule.clean(3,"S{fast}");
I can see options like fast, fine, nofault and conformers
Nothing ralated to Gradient Optimization..
Thanks.
Lochana
ChemAxon 1b9e90b2e7
22-11-2011 12:44:11
lochana wrote: |
How do I do a 3D cleaning with Gradient Optimization using API..I can't see an option for this??
molecule.clean(3,"S{fast}");
I can see options like fast, fine, nofault and conformers
Nothing ralated to Gradient Optimization..
Thanks.
Lochana
|
Hi Lochana,
below you can find a sample api for optimizing coordinates of a 3D molecule with our modified Dreiding force field.
/**
* optimizes molecule with Dreiding ff
* @param m
* @param optimization limit eg: 1e-3
* @throws chemaxon.marvin.modelling.linalg.GradientOptimization.GradientOptimizationException
*/
public static Molecule dreidingOptimize(Molecule m, double limit) throws GradientOptimizationException {
Dreiding d = new Dreiding();
d.init(m);
GradientOptimization g = new GradientOptimization(d);
g.setGradientRMSLimit(limit);
g.run();
if (!g.isOptimizationConverged()) {
throw new IllegalStateException("Optimization was not converged");
}
return d.getMoleculeWithLastUsedCoordinates();
}
Regards,
Adrian
User a9d76a1173
22-11-2011 13:52:57
adrian wrote: |
lochana wrote: |
How do I do a 3D cleaning with Gradient Optimization using API..I can't see an option for this??
molecule.clean(3,"S{fast}");
I can see options like fast, fine, nofault and conformers
Nothing ralated to Gradient Optimization..
Thanks.
Lochana
|
Hi Lochana,
below you can find a sample api for optimizing coordinates of a 3D molecule with our modified Dreiding force field.
/** * optimizes molecule with Dreiding ff * @param m * @param optimization limit eg: 1e-3 * @throws chemaxon.marvin.modelling.linalg.GradientOptimization.GradientOptimizationException */ public static Molecule dreidingOptimize(Molecule m, double limit) throws GradientOptimizationException { Dreiding d = new Dreiding(); d.init(m); GradientOptimization g = new GradientOptimization(d); g.setGradientRMSLimit(limit); g.run(); if (!g.isOptimizationConverged()) { throw new IllegalStateException("Optimization was not converged"); } return d.getMoleculeWithLastUsedCoordinates(); }
Regards, Adrian
|
Thanks Adrian..
The reason why I want to do a gradient optimization is to get a reasonable starting structure for generating a set of conformers for a molecule. The clean 3D tend to fail for some molecules. Then I will pick the lowest energy conformer from the bunch.
However when I used following option, (which forces no clean 3D) it allowed me to generate conformers.
molecule.clean(3, "[c]{2}[o]{1}{0}");
I wonder which one is better.. a gradient optimization or this..Or is it the same??
Thanks.
Lochana
ChemAxon 8b644e6bf4
15-12-2011 01:24:18
Dear Lochana,
Sorry for the late answer.
The reason why I want to do a gradient
optimization is to get a reasonable starting structure for generating a
set of conformers for a molecule.
Gradient optimization should be called on structures already having 3D initial geometries. To generate a single 3D geometry use default Clean3D, to generate multiple conformers use conformers plugin.
A brief introduction to Generate3D: https://docs.google.com/document/pub?id=1AA4EXyJupwxRvZ5-9f9sKB4O9PsrZX95QHMQVI4JyDw
A brief introduction to entry points (API/GUI/Command line) with links to documentations: https://docs.google.com/document/pub?id=1dgaNFWpBNqexlTRMmWF48II9qkL9e8ALdyFpoIlJfUY
The clean 3D tend to fail for some molecules.
Could you please provide examples? This might help us to improve this product in the future.
Then I will pick the lowest energy conformer from the bunch.
When generating multiple conformers they are ordered according to energy. (In case Generate3D does not fail on the input structure)
However when I used following option, (which forces no clean 3D) it allowed me to generate conformers.
Breaking out from 2D/0D is not guaranteed when using only gradient optimization. Also chemically invalid situations can occur (typically intersecting rings, invalid stereo configuration), so extra care must be taken when using this approach.
I wonder which one is better.. a gradient optimization or this..Or is it the same??
These should be different entry points to the same functionality.
Regards,
Gabor