|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.metabolizer.Metabolizer
public class Metabolizer
This class can generate metabolic tree. User have to set biotransformation reactions (library), substrate(s), and MetabolizerTemporaryFileStorage instance if temporary products should store on the file system. Otherwise these products will be stored in the memory.
Example:
Molecule molecule = MolImporter.importMol("CNCC");
Molecule[] substrates = new Molecule[]{molecule};
MolImporter importer = new MolImporter("C:\\...");
ArrayList reactionList = new ArrayList();
RxnMolecule tempMolecule;
while ((tempMolecule=((RxnMolecule)importer.read()))!=null) {
reactionList.add(tempMolecule);
}
MolExporter exporter = new MolExporter(new FileOutputStream("C:\\..."), METABOLIZER_SMILES_OUTPUT_FILEFORMAT_WITH_DOMINANCE);
RxnMolecule[] reactions = (RxnMolecule[]) reactionList.toArray(new RxnMolecule[reactionList.size()]);
Metabolizer metabolizer = new Metabolizer(2, reactions, true);
metabolizer.setGeneratingSubstrates(true);
metabolizer.setSubstrates(substrates);
while (metabolizer.hasMoreLevel()) {
while (!metabolizer.isCurrentLevelEnded()) {
Molecule[] molecules = metabolizer.next();
if (molecules!=null) {
for (int i = 0; i < molecules.length; i++) {
exporter.write(molecules[i]);
}
}
}
metabolizer.nextLevel();
}
exporter.close();
storage.close();
MetabolizerProperties| Constructor Summary | |
|---|---|
Metabolizer(boolean runInMemory)
|
|
Metabolizer(boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
boolean runInMemory)
|
|
Metabolizer(int levelCount,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
boolean generatingSubstrates)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
boolean generatingSubstrates,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
MetabolizerTemporaryStorage temporaryStorage)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
MetabolizerTemporaryStorage temporaryStorage,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
boolean runInMemory)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
boolean generatingSubstrates)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
boolean generatingSubstrates,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
|
|
| Method Summary | |
|---|---|
void |
closeTemporaryStorage()
Closes temporary storage |
long |
getCurrentLevelLength()
Rerturns currentLevelLength |
int |
getLevelCount()
Returns levelCount |
int |
getLevelCounter()
Return current level's ordinal number |
float |
getMetabolicPathwayTolerance()
|
java.util.Set<java.lang.String> |
getNeededMetaboliteSmiles()
|
int |
getSubstrateCounter()
Return currentSubstrate's ordinal number |
java.lang.String |
getTermCondition()
Returns termination condition |
boolean |
hasMoreLevel()
Returns true if the iteration has more level |
void |
ignoreSelectivity()
|
boolean |
isCurrentLevelEnded()
Returns true if the current level has more element to process |
boolean |
isGeneratingSubstrates()
Return generatingSubstrates |
boolean |
isLicensed()
|
static void |
main(java.lang.String[] args)
|
Molecule[] |
next()
Returns the next element in the iteration or null if iteration's end reached before correctly calculated results |
void |
nextLevel()
Need to call after current level ended |
void |
setExcludedMetabolites(Molecule[] molecules)
Sets the excluded metabolites. |
void |
setGeneratingSubstrates(boolean generatingSubstrates)
Set generatingSubstrates. |
void |
setLevelCount(int levelCount)
Sets levelCount |
void |
setLicenseEnvironment(java.lang.String env)
|
void |
setMetabolicPathwayTolerance(float metabolicPathwayTolerance)
|
void |
setNeededMetabolites(Molecule[] molecules)
Sets the needed metabolites. |
void |
setProgressMonitor(chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
Sets progress monitor |
void |
setReactions(RxnMolecule[] reactions)
This method sets the biotransformation reactions |
void |
setRunInMemory(boolean runInMemory)
If runInMemory is true class will calculate in memory (can cause memory out of exception) |
void |
setSubstrates(Molecule[] substrates)
This method can set the substrates if it is needed |
void |
setTemporaryStorage(MetabolizerTemporaryStorage temporaryStorage)
Sets temporaryStorage |
void |
setTermCondition(java.lang.String termCondition)
Sets termination condition |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
boolean generatingSubstrates)
throws MetabolizerException
levelCount - reactions - termCondition - temporaryStorage - generatingSubstrates -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
boolean generatingSubstrates,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - termCondition - temporaryStorage - generatingSubstrates - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
boolean generatingSubstrates)
throws MetabolizerException
levelCount - reactions - runInMemory - generatingSubstrates -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
boolean generatingSubstrates,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - runInMemory - generatingSubstrates - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage)
throws MetabolizerException
levelCount - reactions - termCondition - temporaryStorage -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
MetabolizerTemporaryStorage temporaryStorage,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - termCondition - temporaryStorage - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
MetabolizerTemporaryStorage temporaryStorage)
throws MetabolizerException
levelCount - reactions - temporaryStorage -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
MetabolizerTemporaryStorage temporaryStorage,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - temporaryStorage - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
boolean runInMemory)
throws MetabolizerException
levelCount - reactions - termCondition - runInMemory -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
java.lang.String termCondition,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - termCondition - runInMemory - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory)
throws MetabolizerException
levelCount - reactions - runInMemory -
MetabolizerException
public Metabolizer(int levelCount,
RxnMolecule[] reactions,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
throws MetabolizerException
levelCount - reactions - runInMemory - progressMonitor -
MetabolizerException
public Metabolizer(int levelCount,
boolean runInMemory)
levelCount - runInMemory -
public Metabolizer(int levelCount,
boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
levelCount - runInMemory - progressMonitor -
public Metabolizer(boolean runInMemory,
chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
runInMemory - progressMonitor - public Metabolizer(boolean runInMemory)
runInMemory - | Method Detail |
|---|
public void setProgressMonitor(chemaxon.marvin.modelling.util.ProgressMonitor progressMonitor)
progressMonitor - public boolean hasMoreLevel()
public boolean isCurrentLevelEnded()
public Molecule[] next()
throws MetabolizerException
MetabolizerException
public void nextLevel()
throws MetabolizerException
MetabolizerException
public void setReactions(RxnMolecule[] reactions)
throws MetabolizerException
reactions -
MetabolizerException
public void setSubstrates(Molecule[] substrates)
throws MetabolizerException
substrates -
MetabolizerExceptionpublic int getLevelCount()
public int getLevelCounter()
public int getSubstrateCounter()
public void setLevelCount(int levelCount)
levelCount - public java.lang.String getTermCondition()
public void setTermCondition(java.lang.String termCondition)
throws MetabolizerException
termCondition -
MetabolizerExceptionpublic void setRunInMemory(boolean runInMemory)
runInMemory - public boolean isGeneratingSubstrates()
public void setGeneratingSubstrates(boolean generatingSubstrates)
generatingSubstrates -
public void setTemporaryStorage(MetabolizerTemporaryStorage temporaryStorage)
throws MetabolizerException
temporaryStorage -
MetabolizerException
public void closeTemporaryStorage()
throws MetabolizerException
MetabolizerException
public long getCurrentLevelLength()
throws MetabolizerException
MetabolizerExceptionpublic float getMetabolicPathwayTolerance()
public void setMetabolicPathwayTolerance(float metabolicPathwayTolerance)
public void setExcludedMetabolites(Molecule[] molecules)
molecules - the excluded molecule array. If length equals 0 or the arrray is null exclude is denied else allowed.public void setNeededMetabolites(Molecule[] molecules)
molecules - the needed molecule array. If length equals 0 or the arrray is null validating is denied else allowed.public void ignoreSelectivity()
public java.util.Set<java.lang.String> getNeededMetaboliteSmiles()
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exceptionpublic boolean isLicensed()
isLicensed in interface chemaxon.license.Licensablepublic void setLicenseEnvironment(java.lang.String env)
setLicenseEnvironment in interface chemaxon.license.Licensable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||