User 37df300f74
27-08-2012 14:55:43
Hi there,
I am using alignment plugin (5.10) but encountered the weird illegalStateException when I deal with some specific molecules. Could you please take a quick look?
Thanks
Hongzhou
Here is the rough codes.
public static String aLignMolecule(String refSdf, String smiles)
{
try
{
chemaxon.struc.Molecule mRef = MolImporter.importMol(refSdf);
chemaxon.struc.Molecule m2 = MolImporter.importMol(smiles);
m2.aromatize();
chemaxon.calculations.hydrogenize.Hydrogenize.addHAtoms(m2, null, chemaxon.struc.MolAtom.ALL_H);
m2.clean(3, null);
Alignment aa = new Alignment();
aa.addMolecule(mRef, false, false);
aa.addMolecule(m2, true, true);
aa.setAromatize(true);
aa.setMode(AlignmentAccuracyMode.ACCURATE);
aa.setOrientationType(OrientationType.MCS);
//aa.addUserConstraint(0, 3, 1, 4); // optional: add user constraint between atoms of two different molecules. Any constraint can be added
aa.align();
Molecule result = aa.getMoleculeWithAlignedCoordinates(1);
return result.exportToFormat("sdf");
}
catch(Exception ex)
{
ex.printStackTrace();
return "";
}
Exception happens when I do aa.addMolecule(mRef, false, false).
java.lang.IllegalStateException
at chemaxon.marvin.alignment.GaussianSum.createSimple(GaussianSum.java:119)
at chemaxon.marvin.alignment.GaussianSum.create(GaussianSum.java:59)
at chemaxon.marvin.alignment.AlignmentMoleculeFactory.generate(AlignmentMoleculeFactory.java:187)
Here is the m2; CC1=C2C(F)=C(N3CCOCC3)C(F)=C(C)C2=NC=C1
mRef
rx_001
-MTS- 08271210153D 0 0.00000 0.00000 0
33 35 0 0 0 0 0 0 0 0999 V2000
-13.6136 10.2056 40.4403 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.0105 9.8098 40.9408 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.7800 10.6434 41.7677 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.2560 11.7710 42.4163 C 0 0 0 0 0 0 0 0 0 0 0 0
-13.9656 12.0738 42.3258 F 0 0 0 0 0 0 0 0 0 0 0 0
-16.0720 12.5957 43.1976 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.5218 13.6329 43.8778 N 0 0 0 0 0 0 0 0 0 0 0 0
-14.7273 14.6457 43.1901 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.1073 16.0554 43.7072 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.0719 16.1017 45.1460 O 0 0 0 0 0 0 0 0 0 0 0 0
-16.0112 15.1890 45.7402 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.6773 13.7389 45.3238 C 0 0 0 0 0 0 0 0 0 0 0 0
-17.4419 12.3311 43.2819 C 0 0 0 0 0 0 0 0 0 0 0 0
-18.2467 13.1595 43.9439 F 0 0 0 0 0 0 0 0 0 0 0 0
-17.9681 11.1897 42.6725 C 0 0 0 0 0 0 0 0 0 0 0 0
-17.1307 10.3243 41.9633 C 0 0 0 0 0 0 0 0 0 0 0 0
-17.6478 9.1761 41.4786 N 0 0 0 0 0 0 0 0 0 0 0 0
-16.8696 8.2676 40.8583 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.5425 8.5745 40.5556 C 0 0 0 0 0 0 0 0 0 0 0 0
-13.2526 9.5406 39.6421 H 0 0 0 0 0 0 0 0 0 0 0 0
-13.6376 11.2313 40.0435 H 0 0 0 0 0 0 0 0 0 0 0 0
-12.8986 10.1505 41.2690 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.8650 14.6066 42.0964 H 0 0 0 0 0 0 0 0 0 0 0 0
-13.6670 14.4520 43.4188 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.1098 16.3328 43.3428 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.3886 16.7975 43.3241 H 0 0 0 0 0 0 0 0 0 0 0 0
-17.0397 15.4450 45.4366 H 0 0 0 0 0 0 0 0 0 0 0 0
-15.9434 15.2848 46.8360 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.7183 13.4321 45.7678 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.4618 13.0811 45.7139 H 0 0 0 0 0 0 0 0 0 0 0 0
-19.0281 10.9733 42.7558 H 0 0 0 0 0 0 0 0 0 0 0 0
-17.2742 7.2989 40.5920 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.9363 7.8496 40.0240 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
2 3 1 0 0 0 0
3 4 2 0 0 0 0
4 5 1 0 0 0 0
4 6 1 0 0 0 0
6 7 1 0 0 0 0
7 8 1 0 0 0 0
8 9 1 0 0 0 0
9 10 1 0 0 0 0
10 11 1 0 0 0 0
11 12 1 0 0 0 0
7 12 1 0 0 0 0
6 13 2 0 0 0 0
13 14 1 0 0 0 0
13 15 1 0 0 0 0
15 16 2 0 0 0 0
3 16 1 0 0 0 0
16 17 1 0 0 0 0
17 18 2 0 0 0 0
18 19 1 0 0 0 0
2 19 2 0 0 0 0
1 20 1 0 0 0 0
1 21 1 0 0 0 0
1 22 1 0 0 0 0
8 23 1 0 0 0 0
8 24 1 0 0 0 0
9 25 1 0 0 0 0
9 26 1 0 0 0 0
11 27 1 0 0 0 0
11 28 1 0 0 0 0
12 29 1 0 0 0 0
12 30 1 0 0 0 0
15 31 1 0 0 0 0
18 32 1 0 0 0 0
19 33 1 0 0 0 0
M END