chemaxon.fragmenter
Class MoleculeFragmenter

java.lang.Object
  extended by chemaxon.fragmenter.MoleculeFragmenter
All Implemented Interfaces:
chemaxon.license.Licensable

public class MoleculeFragmenter
extends java.lang.Object
implements chemaxon.license.Licensable

MoleculeFragmenter class can create all possible fragments (in SMILES) of a Molecule by cleave CCQ bonds. CCQ means two neighbour carbon atoms and one of them connects to a hetero (non-carbon) atom. Molecule fragmenter will cleave between the carbon atoms.

 Usage:
                Molecule molecule = MolImporter.impotMol("CCNC(CCO)(CCO)");
                MoleculeFragmenter fragmenter = new MoleculeFragmenter();
                fragmenter.setMolecule(molecule);
                String[] fragments = fragmenter.calculateFragmentsArray();
 

Since:
JChem 5.1
Author:
Attila Szabo
See Also:
Licensable

Constructor Summary
MoleculeFragmenter()
          Constructs a MoleculeFragmenter instance
 
Method Summary
 java.util.Collection<java.lang.String> calculateFragments()
          Calculate the fragments from the setted molecule
 java.lang.String[] calculateFragments(Molecule molecule)
          Sets the molecule.
 java.lang.String[] calculateFragmentsArray()
          Calculate fragments array from the molecule
 boolean isCleaveAliphaticRingBonds()
          Returns true if fragmenter cut CCQ bonds in aliphatic rings, false otherwise
 boolean isCleaveAromaticBonds()
           
 boolean isExplicitizedOutput()
           
 boolean isLicensed()
           
static void main(java.lang.String[] args)
          The main function of the CMD line tool
 void setCleaveAliphaticRingBonds(boolean cleaveAliphaticRingBonds)
          Sets the cleaveAliphaticRingBonds.
 void setCleaveAromaticBonds(boolean cleaveAromaticBonds)
          Sets cleaveAromaticBonds.
 void setExplicitizedOutput(boolean explicitizedOutput)
          Sets explicitizedOutput.
 void setLicenseEnvironment(java.lang.String env)
           
 void setMaxBondCount(int maxBondCount)
          Sets max bond count.
 void setMolecule(Molecule molecule)
          Sets the molecule (all hydrogenes will be implicitized)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoleculeFragmenter

public MoleculeFragmenter()
Constructs a MoleculeFragmenter instance

Method Detail

calculateFragments

public java.util.Collection<java.lang.String> calculateFragments()
                                                          throws chemaxon.license.LicenseException
Calculate the fragments from the setted molecule

Returns:
fragments Collection containing fragments in smiles:q representation
Throws:
chemaxon.license.LicenseException - when licensing problem found

calculateFragmentsArray

public java.lang.String[] calculateFragmentsArray()
                                           throws chemaxon.license.LicenseException
Calculate fragments array from the molecule

Returns:
fragments String array containing fragments in smiles:q representation
Throws:
chemaxon.license.LicenseException - when licensing problem found

calculateFragments

public java.lang.String[] calculateFragments(Molecule molecule)
                                      throws chemaxon.license.LicenseException
Sets the molecule. Calculate fragments array from the molecule

Parameters:
molecule - the Molecule instance
Returns:
fragments String array containing fragments in smiles:q representation
Throws:
chemaxon.license.LicenseException - when licensing problem found

setMolecule

public void setMolecule(Molecule molecule)
Sets the molecule (all hydrogenes will be implicitized)

Parameters:
molecule - the Molecule instance

setMaxBondCount

public void setMaxBondCount(int maxBondCount)
Sets max bond count. Created fragments will contain maximum maxBondCount CCQ bonds.

Parameters:
maxBondCount - the maximal count of CCQ bonds in fragments

isExplicitizedOutput

public boolean isExplicitizedOutput()
Returns:
True if all hydrogen will be explicit on output molecules

setExplicitizedOutput

public void setExplicitizedOutput(boolean explicitizedOutput)
Sets explicitizedOutput. If true output molecules will have all explicit hydrogens.

Parameters:
explicitizedOutput - is a boolean value

isCleaveAromaticBonds

public boolean isCleaveAromaticBonds()
Returns:
True if fragmenter cut aromatic CCQ bonds

setCleaveAromaticBonds

public void setCleaveAromaticBonds(boolean cleaveAromaticBonds)
Sets cleaveAromaticBonds. If true fragmenter will cut aromatic CCQ bonds too.

Parameters:
cleaveAromaticBonds - is a boolean value

isCleaveAliphaticRingBonds

public boolean isCleaveAliphaticRingBonds()
Returns true if fragmenter cut CCQ bonds in aliphatic rings, false otherwise

Returns:
true if fragmenter cut CCQ bonds in aliphatic rings, false otherwise

setCleaveAliphaticRingBonds

public void setCleaveAliphaticRingBonds(boolean cleaveAliphaticRingBonds)
Sets the cleaveAliphaticRingBonds. If true fragmenter will cut CCQ bonds in aliphatic rings

Parameters:
cleaveAliphaticRingBonds - the boolean value to set

isLicensed

public boolean isLicensed()
Specified by:
isLicensed in interface chemaxon.license.Licensable

setLicenseEnvironment

public void setLicenseEnvironment(java.lang.String env)
Specified by:
setLicenseEnvironment in interface chemaxon.license.Licensable

main

public static void main(java.lang.String[] args)
The main function of the CMD line tool

Parameters:
args - the CMD line arguments