Tags

, , ,

Today with the help of Egon the SMSD was successfully integrated with the CDK. The nightly build is available via nightly build. If you are interested in the source code then please visit GIT SMSD.

Q: How can I compute Substructure search between a query and target molecule?

A: An example for Substructure search:

//Turbo mode search
//Bond Sensitive is set true
SMSD comparison = new SMSD(Algorithm.SubStructure, true);
// set molecules and remove hydrogens
comparison.init(queryMol, targetMol, true, true);
// set chemical filter true
comparison.setChemFilters(true, true, true);
if (comparison.isSubgraph()) {
//Get similarity score
System.out.println(“Tanimoto coefficient:  ” + comparison.getTanimotoSimilarity());
}

Q: How can I compute MCS search between a query and target molecule?

A: An example for MCS search:

//{ 0: Default SMSD Algorithm, 1: MCSPlus Algorithm, 2: VFLibMCS Algorithm, 3: CDKMCS Algorithm}
//Bond Sensitive is set true
SMSD comparison = new SMSD(Algorithm.DEFAULT, true);
// set molecules and remove hydrogens
comparison.init(queryMol, targetMol, true, true);
// set chemical filter true
comparison.setChemFilters(true, true, true);
//Get similarity score
System.out.println(“Tanimoto coefficient:  ” + comparison.getTanimotoSimilarity());

—————————————————————-

If you interested in the complete java code please refer to:

  1. MCS Search code
  2. Substructure search code