> Begin forwarded message:
>
> From: John May <j...@nextmovesoftware.com>
> Subject: Re: [Cdk-user] Double bond stereochemistry
> Date: 28 November 2014 09:34:27 GMT
> To: Santiago Fraga <santi...@mestrec.com>
>
> Hi Santiago,
>
> Please use the most recent CDK substructure/isomorphism matchers (Pattern
> <http://cdk.github.io/cdk/1.5/docs/api/index.html?org/openscience/cdk/isomorphism/Pattern.html>).
> The classes you are using are from an old version of SMSD and do not match
> stereochemistry using the IDoubleBondStereochemistry. Also note the
> IDoubleBondStereochemistry is local and not global like E/Z labelling.
>
>> boolean matched = Pattern.findIdentical(mol1).matches(mol2);
>
>
> Many thanks,
> John
>
>> On 1 Oct 2014, at 13:51, Santiago Fraga <santi...@mestrec.com
>> <mailto:santi...@mestrec.com>> wrote:
>>
>>
>> Good morning!
>>
>> I have a problem with some molfiles, trying to compare
>> the stereochemistry in double bonds.
>>
>> These are the molfiles:
>> 873-66-5_trans.mol: trans-beta-Methylstyrene
>> 873-66-5_cis.mol and 873-66-5_cis_b.mol: two versions
>> of cis-beta-Methylstyrene, both contain the same molecule, but with different
>> coordinates and a different order in the rows of the
>> connection table. The graphical represetantion is the same, checked with
>> different tools.
>> E_isomer.mol and E_isomer_b.mol: again two versions of
>> (E)-4-phenylhex-3-en-3-ol, in the same conditions.
>>
>> And the results are not the expected: in some cases
>> the double bond conformation is detected correctly, but the global stereo
>> match
>> is not the corresponding result; and in one case, the
>> double bond conformation fails.
>> I don't know if I am doing something wrong.
>>
>> I am using this code to check double bond
>> stereochemistry:
>> public void compareDoubleBondStereochemistry(String molPath1, String
>> molPath2) {
>> try {
>> String molfile = this.readMolfile(molPath1);
>> MDLV2000Reader reader = new MDLV2000Reader(new
>> ByteArrayInputStream(molfile.getBytes()), Mode.RELAXED);
>> IAtomContainer mol1 = reader.read(new AtomContainer());
>> reader.close();
>>
>> molfile = this.readMolfile(molPath2);
>> reader = new MDLV2000Reader(new
>> ByteArrayInputStream(molfile.getBytes()), Mode.RELAXED);
>> IAtomContainer mol2 = reader.read(new AtomContainer());
>> reader.close();
>>
>> FixBondOrdersTool fbot = new FixBondOrdersTool();
>>
>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol1);
>> mol1 = (AtomContainer) fbot.kekuliseAromaticRings(mol1);
>>
>> AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol2);
>> mol2 = (AtomContainer) fbot.kekuliseAromaticRings(mol2);
>>
>> Isomorphism comparison = new Isomorphism(Algorithm.SubStructure,
>> true);
>> comparison.init(mol1, mol2, false, false);
>> comparison.setChemFilters(true, true, true);
>> if (comparison.isSubgraph() &&
>> comparison.getTanimotoSimilarity() == 1.0F) {
>> System.out.println("Stereo mismatch? " +
>> comparison.isStereoMisMatch());
>> }
>>
>> for(IStereoElement stereo : mol1.stereoElements()) {
>> if(stereo instanceof IDoubleBondStereochemistry) {
>> IDoubleBondStereochemistry doublebond =
>> (IDoubleBondStereochemistry) stereo;
>> System.out.println("Conformation mol1: " +
>> doublebond.getStereo());
>> }
>> }
>> for(IStereoElement stereo : mol2.stereoElements()) {
>> if(stereo instanceof IDoubleBondStereochemistry) {
>> IDoubleBondStereochemistry doublebond =
>> (IDoubleBondStereochemistry) stereo;
>> System.out.println("Conformation mol2: " +
>> doublebond.getStereo());
>> }
>> }
>> }
>> catch (Exception e) {
>> e.printStackTrace();
>> }
>> }
>> public static void main(String[] args) {
>> DoubleBondTest test = new DoubleBondTest();
>> try {
>>
>> test.compareDoubleBondStereochemistry("D:\\MestreLab\\MolFiles\\873-66-5.mol
>> <smb://MestreLab//MolFiles//873-66-5.mol>",
>> "D:\\MestreLab\\MolFiles\\873-66-5_cis.mol");
>>
>> test.compareDoubleBondStereochemistry("D:\\MestreLab\\MolFiles\\873-66-5.mol
>> <smb://MestreLab//MolFiles//873-66-5.mol>",
>> "D:\\MestreLab\\MolFiles\\873-66-5_cis_b.mol");
>>
>> test.compareDoubleBondStereochemistry("D:\\MestreLab\\MolFiles\\873-66-5_cis.mol
>> <smb://MestreLab//MolFiles//873-66-5_cis.mol>",
>> "D:\\MestreLab\\MolFiles\\873-66-5_cis_b.mol");
>>
>> test.compareDoubleBondStereochemistry("D:\\MestreLab\\MolFiles\\E_isomer.mol
>> <smb://MestreLab//MolFiles//E_isomer.mol>",
>> "D:\\MestreLab\\MolFiles\\E_isomer_b.mol");
>> }
>> catch (Exception e) {
>> e.printStackTrace();
>> }
>> }
>> And finally the results:
>> Mol1: D:\MestreLab\MolFiles\873-66-5.mol
>> Mol2: D:\MestreLab\MolFiles\873-66-5_cis.mol
>> Stereo mismatch? true
>> Conformation mol1: OPPOSITE
>> Conformation mol2: TOGETHER
>>
>> Mol1: D:\MestreLab\MolFiles\873-66-5.mol
>> Mol2: D:\MestreLab\MolFiles\873-66-5_cis_b.mol
>> Stereo mismatch? false
>> Conformation mol1: OPPOSITE
>> Conformation mol2: TOGETHER
>>
>> Mol1: D:\MestreLab\MolFiles\873-66-5_cis.mol
>> Mol2: D:\MestreLab\MolFiles\873-66-5_cis_b.mol
>> Stereo mismatch? true
>> Conformation mol1: TOGETHER
>> Conformation mol2: TOGETHER
>>
>> Mol1: D:\MestreLab\MolFiles\E_isomer.mol
>> Mol2: D:\MestreLab\MolFiles\E_isomer_b.mol
>> Stereo mismatch? true
>> Conformation mol1: OPPOSITE
>> Conformation mol2: TOGETHER
>> I include also a zip file that contains the Java code
>> to run the examples, and the corresponding molfiles.
>>
>> Best regards
>> Santiago
>> <DoubleBondStereochemistry.zip>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user