Issue with easyAlign to align alpha amino acids

User 55ffa2f197

08-06-2016 19:33:55

Hi I am trying to align a collection of a-amino acids which drawn quite differently. To begin with i am adopting the conventional drawing template as attached, and use this as the reference for easyAlign. I notice that in one case where my amino acid is stereo configuration S (attachment  before.mrv) . After it gets aligned by easyAlign it turns into R stereo config (attachment after.mrv). Also in my mind the correct alignment should be flipped horizontally, which is identical with the reference orentation.


Hope someone can help me with this. Or is the easyAlign still recommended pairwised alignment method from CXN API. 


Here is the my method


private void alignAA(String smiles) {


mss = new MolSearch();


final MolSearchOptions msp = new MolSearchOptions(SearchOptions.SUBSTRUCTURE);


msp.isIgnoreTetrahedralStereo();


mss.setSearchOptions(msp);


mss.setQuery(aaReference);


Molecule targetMol;


try {


targetMol = MolImporter.importMol(smiles);


Cleaner.clean(targetMol,2);


mss.setTarget(targetMol);


System.out.println("before="+targetMol.toFormat("mrv"));


easyAlign = new AlignRigidEasy();


try {


int[][] hits=mss.findAll();


if(hits!=null&&hits.length==1){


easyAlign.setReference(aaReference);


easyAlign.setRotatable(targetMol);


int[][] easyMap = new int[6][2];


easyMap[1]=hits[0];


System.out.println(targetMol.getAtom(hits[0][1]).getSymbol()+":"+smiles);


easyMap[0]=new int[]{0,1,2,3,4,5};


try{


easyAlign.align(easyMap);


System.out.println("after="+easyAlign.getRotatedMolecule().toFormat("mrv"));


}catch(Exception e){


e.printStackTrace();


}


}


} catch (SearchException e) {


// TODO Auto-generated catch block


e.printStackTrace();


}


;


} catch (MolFormatException e) {


e.printStackTrace();


}


}


 


 


MolImporter molImporter;


try {


molImporter = new MolImporter("alphaAA.mrv");


aaReference = molImporter.read();


} catch (MolFormatException e) {


e.printStackTrace();


} catch (IOException e) {


e.printStackTrace();


}

User 55ffa2f197

08-06-2016 19:49:31

add attachment where reference and target are together to help debug

ChemAxon abe887c64e

09-06-2016 15:21:59

Hi Dong,


Thank you for the question, we'll answer within a few days.


Best regards,


Krisztina

ChemAxon a9ded07333

17-06-2016 07:57:26

Hi Dong,


The aligner works well only with 3D molecules, so you should give your reference and target molecules in 3D.


The UP and DOWN bonds are only drawing conventions in 2D. When you align your molecule, the aligner changes only its atoms' coordinates, but not the bond styles - as a consequence, you can still see  the DOWN bond in your "after" molecule.


Best regards,
Tamás