RGroup Decomposition using API - chiral query problem

User c2ffbfa8f8

25-08-2010 10:45:47

Hi,


 


I am trying to do an RGroup Decomposition using the attached query.  I have included a code snippet whereby I would expect the decomposition to yield 4 Ligands, however it brings back 3 ligands - (and it seems one of the ligands is attached to the scaffold instead.  This is the target "CC[C@H]1O[C@@H](Br)[C@H](O)[C@@H]1O".


 


SCAFFOLD: CC*.C1CCOC1


LIGANDS: 5, O*


LIGANDS: 7, O*


LIGANDS: 8, Br*


 


I have found that if I remove an atom in the target (corresponding to the missing R1 Ligand) ie: "C[C@H]1O[C@@H](Br)[C@H](O)[C@@H]1O" I get back more expected results:


 


SCAFFOLD: C1CCOC1


LIGANDS: 0, C*


LIGANDS: 5, O*


LIGANDS: 7, O*


LIGANDS: 8, Br*


 


Any ideas, or am I doing something silly?  I have played with the SearchConstants etc but can't see why this is happening.


 


I am using JChem 5.3.2.


 


Much thanks 

ChemAxon fb166edcbd

25-08-2010 13:50:44

One problem is that you set the undefined R-atom matching to SearchConstants.UNDEF_R_MATCHING_ALL when calling


    rgd.setQuery(query, SearchConstants.UNDEF_R_MATCHING_ALL);

 


RGroupDecomposition is not prepared for this setting, as it will match R-atoms to atom groups and not individual atoms ("ALL" here means all atoms but individual atoms only).


The solution is to simply set the query by RGroupDecomposition.setQuery(chemaxon.struc.Molecule) without modifying the R-atom matching behavior. (For other valid options refer to the apidoc: RGroupDecomposition.setQuery(chemaxon.struc.Molecule, int).)


However, there is another problem with tetrahedral stereo: RGroupDecomposition is not prepared to handle stereo around undefined R-atoms. Therefore I removed the stereo from your query.


Also removed JUnit references from your code and added a static main() instead.


Now you can have the four ligands:


java ChemaxonForumPostMod
SCAFFOLD: C1CCOC1
LIGANDS: 0, Br*
LIGANDS: 5, O*
LIGANDS: 7, O*
LIGANDS: 8, CC*
SCAFFOLD: C1CCOC1
LIGANDS: 0, CC*
LIGANDS: 5, O*
LIGANDS: 7, O*
LIGANDS: 8, Br*

ChemAxon fb166edcbd

25-08-2010 14:04:54

Note, that there will be a change in R-group attachment point representation in the 5.4 release: R-group attachments will be denoted by specific attachment atoms while the current *, *" representation will be used for S-group attachments only.

User c2ffbfa8f8

25-08-2010 15:38:14

Thanks Nora,


Is there a way I can still maintain the chiral meaning of the query structure and do a decomposition?  Are there plans to include this in the API in future or are there reasons why RGroupDecomposition is not prepared to handle stereo around undefined R-atoms?


All the best


 

ChemAxon fb166edcbd

25-08-2010 22:11:02

The reason is technical: RGroupDecomposition (and also MolSearch with the option of undefined R-atom matching an atom group) invokes substructure search with a query without R-atoms and after the hit is returned, it finds the atom groups matched by the R-atoms. This mechanism is not prepared to handle the stereo data.


Therefore I cannot think of any nice ways to handle the stereo here. However, we can find some workaround to solve this by double searching. First run MolSearch setting undefined R-atom matching to any single atom (UNDEF_R_MATCHING_ALL), this checks the stereo, store the hits and then run RGroupDecomposition with parity cleared around R-atoms in query, finally keep only the decompositions corresponding to a stored hit. I attach the modified example code with all these workarounds:


java ChemaxonForumPostStereo 
Target: CC[C@H]1O[C@@H](Br)[C@H](O)[C@@H]1O
SCAFFOLD: C1CCOC1
LIGANDS: 0, CC*
LIGANDS: 5, O*
LIGANDS: 7, O*
LIGANDS: 8, Br*

Target: CC[C@@H]1O[C@@H](Br)[C@H](O)[C@@H]1O
No decomposition found.

Anyway, I will ask my colleagues if we can add the stereo support around undefined R-atoms in RGroupDecomposition in the future.

User c2ffbfa8f8

27-08-2010 13:56:18

Hi Nora, thanks for your replies, its really helpful.

ChemAxon fb166edcbd

05-06-2012 12:07:12

Now I have found a problem in the code when setting the parity to zero around R-atoms. It works only after cloning the query molecule. I attach the new code, with the additional cloning. I have saved the query in mrv.


Sample run:


java RGDecompWithStereo
Target: CC[C@H]1O[C@@H](Br)[C@H](O)[C@@H]1O
SCAFFOLD: C1CCOC1
LIGANDS: 0, CC*
LIGANDS: 5, O*
LIGANDS: 7, O*
LIGANDS: 8, Br*

Target: CC[C@@H]1O[C@@H](Br)[C@H](O)[C@@H]1O
No decomposition found.

About the code:



  1. First the search is run with undefined R-atom matching set to UNDEF_R_MATCHING_ALL and in stereo specific mode.

  2. Then R-group decomposition is run with parity set to 0 in the query with default undefined R-atom matching.

  3. Finally, the hits returned by R-group decomposition is checked against the
    hits found in the first run with stereo. Decompositions which have no correspondent
    among the search hits found with stereo are filtered out.

  4. The remaining decompositions are returned as result.