Package com.actelion.research.chem
Class AtomTypeList
- java.lang.Object
-
- com.actelion.research.chem.AtomTypeList
-
public class AtomTypeList extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AtomTypeList(int mode)
Creates an empty AtomTypeList, which must be populated by multiply calling processMolecule() and finally calling finalizeProcessMolecules() once.AtomTypeList(java.lang.String filename, int mode)
Creates a new AtomTypeList from a given file using the given mode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateProbabilities()
void
finalizeProcessMolecules()
java.util.TreeMap<java.lang.Long,java.lang.Integer>
getAtomTypeList()
int
getCountFromType(long type)
double
getProbabilityFromType(long type)
float
getRingSizeAdjust(int ringSize)
void
processMolecule(StereoMolecule mol, java.util.TreeSet<java.lang.String> moleculeCache)
void
writeTextFile(java.lang.String textfilename, int mode)
Writes this AtomTypeList into a TAB-delimited text file in human readable form.void
writeTypeFile(java.lang.String filename)
-
-
-
Constructor Detail
-
AtomTypeList
public AtomTypeList(int mode)
Creates an empty AtomTypeList, which must be populated by multiply calling processMolecule() and finally calling finalizeProcessMolecules() once.- Parameters:
mode
-
-
AtomTypeList
public AtomTypeList(java.lang.String filename, int mode) throws java.lang.Exception
Creates a new AtomTypeList from a given file using the given mode. If the the filename references a .typ file, then the mode is checked, whether it matches the file's content. If the the filename references a compound file, then the molecules are parsed and a new AtomTypeList is created reflecting the all contained atom types.- Parameters:
filename
- either .typ file or a .dwar or .sdf compound filemode
-- Throws:
java.lang.Exception
-
-
Method Detail
-
finalizeProcessMolecules
public void finalizeProcessMolecules()
-
calculateProbabilities
public void calculateProbabilities()
-
writeTypeFile
public void writeTypeFile(java.lang.String filename)
-
writeTextFile
public void writeTextFile(java.lang.String textfilename, int mode)
Writes this AtomTypeList into a TAB-delimited text file in human readable form. Atom type frequency and all properties making up an atom type are written into separate columns.- Parameters:
textfilename
-mode
-
-
getAtomTypeList
public java.util.TreeMap<java.lang.Long,java.lang.Integer> getAtomTypeList()
-
processMolecule
public void processMolecule(StereoMolecule mol, java.util.TreeSet<java.lang.String> moleculeCache)
- Parameters:
mol
-moleculeCache
-
-
getCountFromType
public int getCountFromType(long type)
-
getProbabilityFromType
public double getProbabilityFromType(long type)
-
getRingSizeAdjust
public float getRingSizeAdjust(int ringSize)
-
-