|
JOELib Computational Chemistry Package |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjoelib.molecule.JOEMol
Molecule representation.
There are different possibilities to build a molecule.
JOEMol mol=new JOEMol();
String smiles="c1cc(OH)cc1";
if (!JOESmilesParser.smiToMol(mol, smiles, setTitle.toString()))
{
System.err.println("SMILES entry \"" + smiles + "\" could not be loaded.");
}
System.out.println(mol.toString());
JOEMol mol = new JOEMol();
// start molecule modification
mol.beginModify();
mol.reserveAtoms(2);
// build carbon atom
JOEAtom C = new JOEAtom();
atomC.setAtomicNum(6);
// build molecule
for (int i=0; i<2; i++) {
mol.addAtom(atom);
}
// add double bond
mol.addBond(1,2, 2);
//end molecule modification and store all
//coordinates in coordinate array
mol.endModify();
CDKTools which uses
the structure layout module from the CDK.External), if available,
for 3D generation programs, like
Corina.
For speed optimization of loading descriptor molecule files have a
look at the ResultFactory.
JOESmilesParser,
CDKTools,
External,
Title2Data,
Serialized Form| Field Summary | |
static int |
JOE_AROM_CORRECTED_MOL
Molecule flag: aromaticity corrected molecule. |
static int |
JOE_AROMATIC_MOL
Molecule flag: aromaticity calculated. |
static int |
JOE_ATOMTYPES_MOL
Molecule flag: atom types perceived. |
static int |
JOE_CHAINS_MOL
Molecule flag: chain molecule. |
static int |
JOE_CHIRALITY_MOL
Molecule flag: atom chirality flags perceived. |
static int |
JOE_CLOSURE_MOL
Molecule flag: closure bonds perceived. |
static int |
JOE_CURRENT_CONFORMER
Molecule flag: current conformer. |
static int |
JOE_H_ADDED_MOL
Molecule flag: H atoms added molecule. |
static int |
JOE_HYBRID_MOL
Molecule flag: atom hybridisation perceived. |
static int |
JOE_IMPVAL_MOL
Molecule flag: implicit valences perceived. |
static int |
JOE_KEKULE_MOL
Molecule flag: kekulization perceived. |
static int |
JOE_PCHARGE_MOL
Molecule flag: partitial charges perceived. |
static int |
JOE_PH_CORRECTED_MOL
Molecule flag: PH value perceived. |
static int |
JOE_RINGFLAGS_MOL
Molecule flag: rings perceived. |
static int |
JOE_SSSR_MOL
Molecule flag: SSSR calculated. |
| Constructor Summary | |
JOEMol()
Constructor for the JOEMol. |
|
JOEMol(IOType itype,
IOType otype)
Constructor for the JOEMol. |
|
JOEMol(JOEMol source)
Clones the molecule without data elements. |
|
JOEMol(JOEMol source,
boolean cloneDesc)
Constructor for the JOEMol. |
|
JOEMol(JOEMol source,
boolean cloneDesc,
String[] descriptors)
Constructor for the JOEMol. |
|
| Method Summary | |
boolean |
addAtom(JOEAtom atom)
Adds (cloned) atom to the JOEMol. |
boolean |
addBond(int first,
int second,
int order)
Adds a bond to the JOEMol. |
boolean |
addBond(int first,
int second,
int order,
int flags)
Adds a bond to the JOEMol. |
boolean |
addBond(int first,
int second,
int order,
int stereo,
int insertpos)
Adds a bond to the JOEMol. |
boolean |
addBond(JOEBond bond)
Adds (cloned) bond to the JOEMol. |
void |
addConformer(double[] f)
Adds conformer coordinates to this molecule. |
void |
addData(JOEGenericData d)
Adds a JOEGenericData object to this molecule but don't overwrite existing data elements with the same name, if they exists already. |
void |
addData(JOEGenericData d,
boolean overwrite)
Adds a JOEGenericData object to this molecule. |
boolean |
addHydrogens()
Adds hydrogens atoms to this molecule. |
boolean |
addHydrogens(boolean polaronly)
Adds hydrogens atoms to this molecule. |
boolean |
addHydrogens(boolean polaronly,
boolean correctForPH)
Adds hydrogens atoms to this molecule. |
boolean |
addHydrogens(boolean polaronly,
boolean correctForPH,
boolean useCoordV)
Adds hydrogens atoms to this molecule. |
boolean |
addHydrogens(JOEAtom atom)
Adds hydrogens atoms to the given atom. |
boolean |
addPolarHydrogens()
Add polar hydrogens to molecule. |
boolean |
addResidue(JOEResidue residue)
Adds residue information to this molecule. |
void |
align(JOEAtom a1,
JOEAtom a2,
XYZVector p1,
XYZVector p2)
Aligns atom a1 on p1 and atom a2 along p1->p2 vector. |
AtomIterator |
atomIterator()
Gets an iterator over all atoms in this molecule. |
boolean |
automaticFormalCharge()
Gets the flag if the automatic calculation of the formal charge of the atoms is allowed. |
boolean |
automaticPartialCharge()
Gets the flag if the automatic calculation of the partial charge of the atoms is allowed. |
void |
beginModify()
Begins modification of atoms and increase modification counter. |
BondIterator |
bondIterator()
Gets an iterator over all bonds. |
void |
center()
Centers molecule. |
XYZVector |
center(int nconf)
Centers conformer. |
boolean |
clear()
Clears molecule. |
Object |
clone()
Clones molecule without additional data (e.g. |
Object |
clone(boolean cloneDesc)
Clones this molecule. |
Object |
clone(boolean cloneDesc,
String[] descriptors)
Clones this molecule. |
ConformerIterator |
conformerIterator()
Gets an iterator over all conformers. |
int |
conformerNum()
Returns the number of conformers. |
void |
connectTheDots()
Use inter-atomic distances to identify bonds. |
void |
contiguousFragments(Vector cfl)
Each Vector contains the atom numbers of a contiguous fragment. |
void |
copyConformer(double[] src,
int idx)
Copies given conformer to this molecule. |
void |
copyConformer(float[] src,
int idx)
Copies given conformer to this molecule. |
boolean |
correctForPH()
Corrects pH value of the molecule. |
JOEAtom |
createAtom()
Creates only a new atom. |
JOEBond |
createBond()
Creates only a new bond. |
int |
dataSize()
Returns the number of data elements in this molecule. |
void |
decrementMod()
Decrease modification counter. |
boolean |
deleteAtom(JOEAtom atom)
Delete atom from molecule. |
boolean |
deleteBond(JOEBond bond)
Delete the given JOEBond from this molecule. |
void |
deleteConformer(int idx)
Delete conformer from molecule. |
void |
deleteData(JOEDataType dt)
Deletes all data elements os the given JOEDataType . |
void |
deleteData(JOEGenericData gd)
Delete all data elements which are equal to the given JOEGenericData element. |
boolean |
deleteData(String s)
Description of the Method |
void |
deleteData(Vector vg)
Description of the Method |
boolean |
deleteHydrogen(JOEAtom atom)
Deletes hydrogen atom. |
boolean |
deleteHydrogens()
Delete all hydrogen atoms from molecule. |
boolean |
deleteHydrogens(JOEAtom atom)
Delete all hydrogen atoms from given atom. |
boolean |
deleteNonPolarHydrogens()
Delete all non polar hydrogens from molecule. |
boolean |
deleteResidue(JOEResidue residue)
Description of the Method |
void |
destroyAtom(JOEAtom atom)
Destroys atom. |
void |
destroyBond(JOEBond bond)
Destroys all bond. |
boolean |
empty()
Returns true if this molecule contains no atoms. |
void |
endModify()
Ends modification of atoms and decrease modification counter. |
void |
endModify(boolean nukePerceivedData)
Ends modification of atoms and decrease modification counter. |
boolean |
equals(JOEMol type)
Checks if two molecules are equal, ignoring descriptor values. |
boolean |
equals(Object obj)
Checks if two molecules are equal, ignoring descriptor values. |
boolean |
existsBond(int bgn,
int end)
Returns true if this bond exists. |
void |
finalize()
Destructor for this molecule. |
void |
findChildren(Vector children,
int first,
int second)
Locates all atoms for which there exists a path to second without going through first children does not include second . |
void |
findChildren(Vector children,
JOEAtom bgn,
JOEAtom end)
locates all atoms for which there exists a path to 'second' without going through 'first' children does not include 'second' |
void |
findChiralCenters()
Description of the Method |
void |
findLargestFragment(JOEBitVec lf)
each vector |
void |
findRingAtomsAndBonds()
Description of the Method |
void |
findSSSR()
Finds the Smallest Set of Smallest Rings (SSSR). |
GenericDataIterator |
genericDataIterator()
Gets an iterator over the generic data elements of this molecule. |
JOEAtom |
getAtom(int idx)
Gets an atom of the JOEMol object Atom index must be between 1 to numAtoms() . |
JOEBond |
getBond(int idx)
Gets a bond of the JOEMol object. |
JOEBond |
getBond(int bgn,
int end)
Gets the bond attribute of the JOEMol object Atom index must be between 1 to numAtoms() . |
JOEBond |
getBond(JOEAtom bgn,
JOEAtom end)
Gets the bond attribute of the JOEMol object |
double[] |
getConformer(int i)
Gets the conformer attribute of the JOEMol object |
Vector |
getConformers()
Returns a Vector of all conformer coordinates (double[] values). |
double[] |
getCoordinates()
Gets the coordinate array of this molecule. |
JOEGenericData |
getData(JOEDataType dt)
Returns the first data entry of the given data type. |
JOEGenericData |
getData(String s)
Returns the data entry with the given name, if multiple data entries exists only the first one is taken. |
JOEGenericData |
getData(String s,
boolean parse)
Returns the data entry with the given name, if multiple data entries exists only the first one is taken. |
double |
getEnergy()
Gets the energy attribute of the JOEMol object |
double |
getExactMass()
Gets mass given by isotopes (or most abundant isotope as necessary). |
JOEAtom |
getFirstAtom()
Gets the firstAtom attribute of the JOEMol object |
int |
getFlags()
Gets the flags attribute of the JOEMol object |
boolean |
getGTDVector(int[] gtd)
Gets the gTDVector attribute of the JOEMol object |
IOType |
getInputType()
Gets the inputType attribute of the JOEMol object |
int |
getMod()
Gets the mod attribute of the JOEMol object |
double |
getMolWt()
Gets standard molar mass given by IUPAC atomic masses. |
IOType |
getOutputType()
Gets the outputType attribute of the JOEMol object |
String |
getPartialChargeVendor()
|
JOEResidue |
getResidue(int idx)
Gets the residue attribute of the JOEMol object |
RingIterator |
getRingIterator()
Gets iterator for the Smallest Set of Smallest Rings (SSSR). |
Vector |
getSSSR()
Gets the Smallest Set of Smallest Rings (SSSR). |
String |
getTitle()
Gets the title attribute of the JOEMol object. |
double |
getTorsion(int a,
int b,
int c,
int d)
Gets the torsion attribute of the JOEMol object |
double |
getTorsion(JOEAtom a,
JOEAtom b,
JOEAtom c,
JOEAtom d)
Gets the torsion attribute of the JOEMol object |
boolean |
has2D()
Description of the Method |
boolean |
has3D()
Description of the Method |
boolean |
hasAromaticCorrected()
Description of the Method |
boolean |
hasAromaticPerceived()
Description of the Method |
boolean |
hasAtomTypesPerceived()
Description of the Method |
boolean |
hasChainsPerceived()
Description of the Method |
boolean |
hasChiralityPerceived()
Description of the Method |
boolean |
hasClosureBondsPerceived()
Description of the Method |
boolean |
hasData(JOEDataType dt)
Returns true if one ore more entries of the given JOEDataType exists. |
boolean |
hasData(String s)
Description of the Method |
int |
hashCode()
Calculates the hashcode of a molecule using the methods AbstractDatabase.getHashcode and AbstractDatabase.getSMILESHashcode. |
boolean |
hasHybridizationPerceived()
Description of the Method |
boolean |
hasHydrogensAdded()
Description of the Method |
boolean |
hasImplicitValencePerceived()
Description of the Method |
boolean |
hasKekulePerceived()
Description of the Method |
boolean |
hasNonZeroCoords()
Description of the Method |
boolean |
hasPartialChargesPerceived()
Description of the Method |
boolean |
hasRingAtomsAndBondsPerceived()
Description of the Method |
boolean |
hasSSSRPerceived()
Description of the Method |
void |
incrementMod()
Increase modification counter. |
boolean |
insertAtom(JOEAtom atom)
Description of the Method |
boolean |
isChiral()
Gets the chiral attribute of the JOEMol object |
boolean |
isCorrectedForPH()
Gets the correctedForPH attribute of the JOEMol object |
boolean |
kekulize()
Kekulizes the molecule. |
NativeValueIterator |
nativeValueIterator()
Gets an iterator over native descriptor values (int or double) of this molecule. |
JOEAtom |
newAtom()
Creates a new atom and adds it to molecule. |
JOEResidue |
newResidue()
Returns and adds new residue informations for this molecule. |
int |
numAtoms()
Returns the number of atoms. |
int |
numBonds()
Returns the number of bonds. |
int |
numConformers()
Returns the number of conformers of this molecule. |
int |
numHvyAtoms()
Returns the number of heavy atoms. |
int |
numResidues()
Returns the number of residues. |
int |
numRotors()
Returns the number of rotatable bonds. |
boolean |
perceiveKekuleBonds()
Description of the Method |
int |
reHash()
|
void |
renumberAtoms(Vector v)
|
void |
reserveAtoms(int natoms)
Reserves a initial capacity of atoms. |
ResidueIterator |
residueIterator()
Description of the Method |
void |
rotate(double[] m)
|
void |
rotate(double[][] u)
|
void |
rotate(double[] m,
int nconf)
|
JOEMol |
set(JOEMol source)
Clones molecule without additional data (e.g. |
JOEMol |
set(JOEMol source,
boolean cloneDesc,
String[] descriptors)
Clones molecule. |
JOEMol |
set(JOEMol source,
boolean cloneDesc,
String[] descriptors,
boolean addDescIfNotExist)
Clones molecule. |
JOEMol |
setAdd(JOEMol source)
Sets the add attribute of the JOEMol object |
void |
setAromaticCorrected()
Sets the aromaticCorrected attribute of the JOEMol object |
void |
setAromaticPerceived()
Sets the aromaticPerceived attribute of the JOEMol object |
void |
setAtomTypesPerceived()
Sets the atomTypesPerceived attribute of the JOEMol object |
void |
setAutomaticFormalCharge(boolean val)
Sets the flag if the automatic calculation of the formal charge of the atoms is allowed. |
void |
setAutomaticPartialCharge(boolean val)
Sets the automaticPartialCharge attribute of the JOEMol object |
void |
setChainsPerceived()
Sets the chainsPerceived attribute of the JOEMol object |
void |
setChiralityPerceived()
Sets the chiralityPerceived attribute of the JOEMol object |
void |
setClosureBondsPerceived()
Sets the closureBondsPerceived attribute of the JOEMol object |
void |
setConformer(int i)
Sets the conformer attribute of the JOEMol object |
void |
setConformers(Vector v)
Sets the conformers attribute of the JOEMol object |
void |
setCorrectedForPH()
Sets the correctedForPH attribute of the JOEMol object |
void |
setEnergy(double energy)
Sets the energy attribute of the JOEMol object |
void |
setHybridizationPerceived()
Sets the hybridizationPerceived attribute of the JOEMol object |
void |
setHydrogensAdded()
Sets the hydrogensAdded attribute of the JOEMol object |
void |
setImplicitValencePerceived()
Sets the implicitValencePerceived attribute of the JOEMol object |
void |
setInputType(IOType type)
Sets the inputType attribute of the JOEMol object |
void |
setKekulePerceived()
Sets the kekulePerceived attribute of the JOEMol object |
void |
setOutputType(IOType type)
Sets the outputType attribute of the JOEMol object |
void |
setPartialChargesPerceived()
Sets the partialChargesPerceived attribute of the JOEMol object |
void |
setPartialChargeVendor(String vendor)
|
void |
setRingAtomsAndBondsPerceived()
Sets the ringAtomsAndBondsPerceived attribute of the JOEMol object |
void |
setSSSRPerceived()
Sets the sSSRPerceived attribute of the JOEMol object |
void |
setTitle(String title)
Sets the title attribute of the JOEMol object |
void |
setTorsion(JOEAtom a,
JOEAtom b,
JOEAtom c,
JOEAtom d,
double ang)
Sets the torsion attribute of the JOEMol object |
void |
sortBonds()
Description of the Method |
boolean |
stripSalts()
Deletes all atoms except for the largest contiguous fragment. |
void |
toInertialFrame()
Description of the Method |
void |
toInertialFrame(int conf,
double[] rmat)
Description of the Method |
String |
toString()
Description of the Method |
String |
toString(boolean writeDescriptors)
Description of the Method |
String |
toString(IOType type)
Description of the Method |
String |
toString(IOType type,
boolean writeDescriptors)
Description of the Method |
void |
translate(XYZVector v)
Description of the Method |
void |
translate(XYZVector v,
int nconf)
Description of the Method |
void |
unsetAromaticPerceived()
Description of the Method |
void |
unsetImplicitValencePerceived()
Description of the Method |
void |
unsetPartialChargesPerceived()
Description of the Method |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int JOE_SSSR_MOL
public static final int JOE_RINGFLAGS_MOL
public static final int JOE_AROMATIC_MOL
public static final int JOE_ATOMTYPES_MOL
public static final int JOE_CHIRALITY_MOL
public static final int JOE_PCHARGE_MOL
public static final int JOE_HYBRID_MOL
public static final int JOE_IMPVAL_MOL
public static final int JOE_KEKULE_MOL
public static final int JOE_CLOSURE_MOL
public static final int JOE_H_ADDED_MOL
public static final int JOE_PH_CORRECTED_MOL
public static final int JOE_AROM_CORRECTED_MOL
public static final int JOE_CHAINS_MOL
public static final int JOE_CURRENT_CONFORMER
| Constructor Detail |
public JOEMol()
JOEMol(IOType, IOType),
JOEMol(JOEMol),
JOEMol(JOEMol, boolean),
JOEMol(JOEMol, boolean, String[])
public JOEMol(IOType itype,
IOType otype)
itype - input type for this moleculeotype - output type for this moleculeJOEMol(),
JOEMol(JOEMol),
JOEMol(JOEMol, boolean),
JOEMol(JOEMol, boolean, String[])
public JOEMol(JOEMol source,
boolean cloneDesc,
String[] descriptors)
source - The source moleculecloneDesc - clones the PairData descriptors if truedescriptors - the descriptors to clone. If null all descriptors are clonedJOEMol(),
JOEMol(IOType, IOType),
JOEMol(JOEMol),
JOEMol(JOEMol, boolean)
public JOEMol(JOEMol source,
boolean cloneDesc)
source - The source moleculecloneDesc - clones the PairData descriptors if trueJOEMol(),
JOEMol(IOType, IOType),
JOEMol(JOEMol),
JOEMol(JOEMol, boolean),
JOEMol(JOEMol, boolean, String[])public JOEMol(JOEMol source)
source - The source moleculeJOEMol(),
JOEMol(IOType, IOType),
JOEMol(JOEMol, boolean),
JOEMol(JOEMol, boolean, String[])| Method Detail |
public JOEMol setAdd(JOEMol source)
source - The new add value
public void setAromaticCorrected()
public void setAromaticPerceived()
public JOEAtom getAtom(int idx)
idx - Description of the Parameter
public void setAtomTypesPerceived()
public void setAutomaticFormalCharge(boolean val)
val - true if the calculation of the formal charge is
allowed.public void setAutomaticPartialCharge(boolean val)
val - The new automaticPartialCharge valuepublic JOEBond getBond(int idx)
idx - Description of the Parameter
public JOEBond getBond(int bgn,
int end)
bgn - atom index of the start atomend - atom index of the end atom
public JOEBond getBond(JOEAtom bgn,
JOEAtom end)
bgn - Description of the Parameterend - Description of the Parameter
public void setChainsPerceived()
public boolean isChiral()
public void setChiralityPerceived()
public void setClosureBondsPerceived()
public void setConformer(int i)
i - The new conformer valuepublic double[] getConformer(int i)
i - Description of the Parameter
public void setConformers(Vector v)
v - The new conformers value (v is of type double[])public Vector getConformers()
Vector of all conformer coordinates (double[] values).
public double[] getCoordinates()
public void setCorrectedForPH()
public boolean isCorrectedForPH()
public JOEGenericData getData(JOEDataType dt)
There exist a lot of default data types which where defined in
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
dt - data type
getData(String),
getData(String, boolean),
genericDataIterator(),
addData(JOEGenericData),
addData(JOEGenericData, boolean)public JOEGenericData getData(String s)
JOEPairData element with a unparsed
String value, the descriptor value will be automatically parsed from
a String value to the representing result (DescResult) class.
If no data element with this name exists in this molecule, null
is returned.
There exist a lot of default data types which where defined in
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
Missing descriptor values can be calculated by using
DescriptorHelper.descFromMol(JOEMol, String).
Example:
DescResult result=null;
try
{
result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
}
catch (DescriptorException ex)
{
// descriptor can not be calculated
}
Notice the difference between JOEGenericData and
DescResult. DescResult values can be added to
molecules by using JOEPairData
JOEPairData dp = new JOEPairData(); dp.setAttribute(descriptorName); dp.setValue(result); mol.addData(dp);
s - The data element (descriptor) name
getData(JOEDataType),
getData(String, boolean),
genericDataIterator(),
addData(JOEGenericData),
addData(JOEGenericData, boolean),
JOEDataType,
JOEPairData,
DescResult,
GenericDataHolder.getData(String, boolean),
DescriptorHelper.descFromMol(JOEMol, String),
DescriptorHelper.descFromMol(JOEMol, String, DescResult),
DescriptorHelper.descFromMol(JOEMol, String, DescResult, boolean)
public JOEGenericData getData(String s,
boolean parse)
JOEPairData the parse flag
can be used to parse this data elements.
If no data element with this name exists in this molecule, null
is returned.
There exist a lot of default data types which where defined in
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
Missing descriptor values can be calculated by using
DescriptorHelper.descFromMol(JOEMol, String).
Example:
DescResult result=null;
try
{
result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
}
catch (DescriptorException ex)
{
// descriptor can not be calculated
}
Notice the difference between JOEGenericData and
DescResult. DescResult values can be added to
molecules by using JOEPairData
JOEPairData dp = new JOEPairData(); dp.setAttribute(descriptorName); dp.setValue(result); mol.addData(dp);
s - The data element (descriptor) nameparse - Parse data element
getData(JOEDataType),
getData(String),
genericDataIterator(),
addData(JOEGenericData),
addData(JOEGenericData, boolean),
JOEDataType,
JOEPairData,
DescResult,
GenericDataHolder.getData(String, boolean),
DescriptorHelper.descFromMol(JOEMol, String),
DescriptorHelper.descFromMol(JOEMol, String, DescResult),
DescriptorHelper.descFromMol(JOEMol, String, DescResult, boolean)public void setEnergy(double energy)
energy - The new energy valuepublic double getEnergy()
public double getExactMass()
public JOEAtom getFirstAtom()
public int getFlags()
JOE_SSSR_MOL,
JOE_RINGFLAGS_MOL,
JOE_AROMATIC_MOL,
JOE_ATOMTYPES_MOL,
JOE_CHIRALITY_MOL,
JOE_PCHARGE_MOL,
JOE_HYBRID_MOL,
JOE_IMPVAL_MOL,
JOE_KEKULE_MOL,
JOE_CLOSURE_MOL,
JOE_H_ADDED_MOL,
JOE_PH_CORRECTED_MOL,
JOE_AROM_CORRECTED_MOL,
JOE_CHAINS_MOL,
JOE_CURRENT_CONFORMERpublic boolean getGTDVector(int[] gtd)
gtd - Description of the Parameter
public void setHybridizationPerceived()
public void setHydrogensAdded()
public void setImplicitValencePerceived()
public void setInputType(IOType type)
type - The new inputType valuepublic void setKekulePerceived()
public int getMod()
public final String getTitle()
public IOType getInputType()
public double getMolWt()
public void setOutputType(IOType type)
type - The new outputType valuepublic IOType getOutputType()
public void setPartialChargeVendor(String vendor)
public String getPartialChargeVendor()
public void setPartialChargesPerceived()
public JOEResidue getResidue(int idx)
idx - Description of the Parameter
public void setRingAtomsAndBondsPerceived()
public RingIterator getRingIterator()
RingIterator rit = mol.getRingIterator();
JOERing ring;
while(rit.hasNext())
{
ring = rit.nextRing();
}
getSSSR(),
findSSSR(),
atomIterator(),
bondIterator(),
conformerIterator(),
genericDataIterator(),
nativeValueIterator(),
RingIteratorpublic Vector getSSSR()
Vector of JOERinggetRingIterator(),
findSSSR()public void setSSSRPerceived()
public void setTitle(String title)
title - The new title value
public void setTorsion(JOEAtom a,
JOEAtom b,
JOEAtom c,
JOEAtom d,
double ang)
a - The new torsion valueb - The new torsion valuec - The new torsion valued - The new torsion valueang - The new torsion value
public double getTorsion(int a,
int b,
int c,
int d)
a - Description of the Parameterb - Description of the Parameterc - Description of the Parameterd - Description of the Parameter
public double getTorsion(JOEAtom a,
JOEAtom b,
JOEAtom c,
JOEAtom d)
a - Description of the Parameterb - Description of the Parameterc - Description of the Parameterd - Description of the Parameter
public boolean addAtom(JOEAtom atom)
It's recommended calling the beginModify() method before the first atom will be added and calling the endModify() method after the last atom has been added. This causes, that the coordinates of the atoms will also be stored in a coordinate array in the molecule.
atom - The JOEAtom to add, which will be deep cloned.
addBond(int, int, int),
addBond(int, int, int, int),
addBond(int, int, int, int, int),
addBond(JOEBond),
beginModify(),
endModify(),
endModify(boolean)
public boolean addBond(int first,
int second,
int order)
first - The start atom index (atoms begins with index 1)second - The end atom index (atoms begins with index 1)order - The bond order
addAtom(JOEAtom),
addBond(int, int, int, int),
addBond(int, int, int, int, int),
addBond(JOEBond),
connectTheDots()
public boolean addBond(int first,
int second,
int order,
int flags)
first - The start atom index (atoms begins with index 1)second - The end atom index (atoms begins with index 1)order - The bond orderflags - The stereo flag
addBond(int, int, int),
addBond(int, int, int, int, int),
addBond(JOEBond),
connectTheDots()
public boolean addBond(int first,
int second,
int order,
int stereo,
int insertpos)
first - The start atom index (atoms begins with index 1)second - The end atom index (atoms begins with index 1)order - The bond orderstereo - The stereo flaginsertpos - The position at which the bond should be inserted
addAtom(JOEAtom),
addBond(int, int, int),
addBond(int, int, int, int),
addBond(JOEBond),
connectTheDots()public boolean addBond(JOEBond bond)
bond - The JOEBond to add, which will be deep cloned.
addAtom(JOEAtom),
addBond(int, int, int),
addBond(int, int, int, int),
addBond(int, int, int, int, int),
connectTheDots()public void addConformer(double[] f)
f - The conformer coordinatespublic void addData(JOEGenericData d)
There exist a lot of default data types which where defined in
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
Missing descriptor values can be calculated by using
DescriptorHelper.descFromMol(JOEMol, String).
Example:
DescResult result=null;
try
{
result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
}
catch (DescriptorException ex)
{
// descriptor can not be calculated
}
Notice the difference between JOEGenericData and
DescResult. DescResult values can be added to
molecules by using JOEPairData
JOEPairData dp = new JOEPairData(); dp.setAttribute(descriptorName); dp.setValue(result); mol.addData(dp);
d - The new data valueaddData(JOEGenericData, boolean),
getData(JOEDataType),
getData(String),
getData(String, boolean),
genericDataIterator(),
JOEDataType,
JOEPairData,
DescriptorHelper.descFromMol(JOEMol, String),
DescriptorHelper.descFromMol(JOEMol, String, DescResult),
DescriptorHelper.descFromMol(JOEMol, String, DescResult, boolean)
public void addData(JOEGenericData d,
boolean overwrite)
There exist a lot of default data types which where defined in
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
Missing descriptor values can be calculated by using
DescriptorHelper.descFromMol(JOEMol, String).
Example:
DescResult result=null;
try
{
result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
}
catch (DescriptorException ex)
{
// descriptor can not be calculated
}
Notice the difference between JOEGenericData and
DescResult. DescResult values can be added to
molecules by using JOEPairData
JOEPairData dp = new JOEPairData(); dp.setAttribute(descriptorName); dp.setValue(result); mol.addData(dp);
d - The new data valueoverwrite - Overwrite already existing data element, if trueaddData(JOEGenericData),
getData(JOEDataType),
getData(String),
getData(String, boolean),
genericDataIterator(),
JOEDataType,
JOEPairData,
DescriptorHelper.descFromMol(JOEMol, String),
DescriptorHelper.descFromMol(JOEMol, String, DescResult),
DescriptorHelper.descFromMol(JOEMol, String, DescResult, boolean)public boolean addHydrogens()
JOEPhModelpublic boolean addHydrogens(boolean polaronly)
polaronly - Add only polar hydrogens, if true
JOEPhModel
public boolean addHydrogens(boolean polaronly,
boolean correctForPH)
polaronly - Add only polar hydrogens, if truecorrectForPH - Corrects molecule for pH if true
JOEPhModel
public boolean addHydrogens(boolean polaronly,
boolean correctForPH,
boolean useCoordV)
If useCoordV is true the coordinate vector for added H atoms will be used. This will be slower, because endModify() will be called after every added hydrogen atom. If useCoordV is false the coordinate vector for added H atoms will be ignored, which will be faster.
polaronly - Add only polar hydrogens, if truecorrectForPH - Corrects molecule for pH if trueuseCoordV - The coordinate vector for added hydrogens will be used if true
JOEPhModel,
endModify(),
endModify(boolean)public boolean addHydrogens(JOEAtom atom)
atom - The atom to which the hydogens should be added
public boolean addPolarHydrogens()
JOEPhModelpublic boolean addResidue(JOEResidue residue)
residue - The residue information
public void align(JOEAtom a1,
JOEAtom a2,
XYZVector p1,
XYZVector p2)
a1 - first atoma2 - second atomp1 - start pointp2 - end pointpublic AtomIterator atomIterator()
AtomIterator ait = mol.atomIterator();
JOEAtom atom;
while (ait.hasNext())
{
atom = ait.nextAtom();
}
Atoms starts with the index 1, which is a difference to bonds
which starts with the bond index 0.
Possibility two:
int atoms = mol.numAtoms();
JOEAtom atom;
for (int i=1; i<=atoms; i++)
{
atom=mol.getAtom(i);
}
bondIterator(),
conformerIterator(),
getRingIterator(),
genericDataIterator(),
nativeValueIterator()public boolean automaticFormalCharge()
public boolean automaticPartialCharge()
JOEGastChrgpublic void beginModify()
endModify(),
endModify(boolean),
decrementMod(),
incrementMod(),
getMod()public BondIterator bondIterator()
BondIterator bit = bondIterator();
JOEBond bond;
while (bit.hasNext())
{
bond = bit.nextBond();
}
Bonds starts with the index 0, which is a difference to atoms
which starts with the atom index 1.
Possibility two:
int bonds = mol.numBonds();
JOEBond bond;
for (int i=0; i<bonds; i++)
{
bond=mol.getBond(i);
}
atomIterator(),
conformerIterator(),
getRingIterator(),
genericDataIterator(),
nativeValueIterator()public void center()
center(int)public XYZVector center(int nconf)
nconf - number of the conformer
center()public boolean clear()
public Object clone()
public Object clone(boolean cloneDesc)
cloneDesc - clones the PairData descriptors if true
public Object clone(boolean cloneDesc,
String[] descriptors)
cloneDesc - clones the PairData descriptors if true
public ConformerIterator conformerIterator()
ConformerIterator cit = mol.conformerIterator();
double conformer[];
while (cit.hasNext())
{
conformer = cit.nextConformer();
}
atomIterator(),
bondIterator(),
getRingIterator(),
genericDataIterator(),
nativeValueIterator()public final int conformerNum()
public void connectTheDots()
For assigning atom types using a geometry-based algorithm have a look at ml91 and the
structure based expert rules in JOEAtomTyper.
public void contiguousFragments(Vector cfl)
Vector fragments=new Vector();
mol.contiguousFragments(fragments);
int fragmentAtomIdx[];
System.out.println(""+fragments.size()+" contiguous fragments in molecule '"+
mol.getTitle()+"' (salt ?).");
for (int i = 0; i < fragments.size(); i++)
{
fragmentAtomIdx=(int[])fragments.get(i);
System.out.print("Atoms of fragment "+i+":");
for (int j = 0; j < fragmentAtomIdx.length; j++)
{
System.out.print(fragmentAtomIdx[j]);
System.out.print(' ');
}
System.out.println();
}
cfl - a Vector that stores the integer arrays for the contiguous fragments atom numbersstripSalts()
public void copyConformer(double[] src,
int idx)
src - the conformeridx - the index of the conformer
public void copyConformer(float[] src,
int idx)
src - the conformeridx - the index of the conformerpublic boolean correctForPH()
JOEPhModelpublic JOEAtom createAtom()
createBond(),
addAtom(JOEAtom),
newAtom()public JOEBond createBond()
createAtom()public int dataSize()
public void decrementMod()
incrementMod(),
getMod(),
beginModify(),
endModify(),
endModify(boolean)public boolean deleteAtom(JOEAtom atom)
atom - The atom to delete
public boolean deleteBond(JOEBond bond)
bond - The bond to delete
public void deleteConformer(int idx)
idx - The conformer numberpublic boolean deleteData(String s)
s - Description of the Parameter
public void deleteData(JOEDataType dt)
dt - type of the elements to deletepublic void deleteData(JOEGenericData gd)
gd - the element to deletepublic void deleteData(Vector vg)
vg - Description of the Parameterpublic boolean deleteHydrogen(JOEAtom atom)
mol.beginModify(); deleteHydrogen(atom ); mol.endModify();
atom - Hydrogen atom to delete
public boolean deleteHydrogens()
mol.beginModify(); deleteHydrogens(); mol.endModify();
public boolean deleteHydrogens(JOEAtom atom)
mol.beginModify(); deleteHydrogens(atom); mol.endModify();
atom - Atom from which hydrogen atoms should be deleted
public boolean deleteNonPolarHydrogens()
public boolean deleteResidue(JOEResidue residue)
residue - Description of the Parameter
public void destroyAtom(JOEAtom atom)
atom - the atompublic void destroyBond(JOEBond bond)
bond - the bondpublic boolean empty()
public void endModify()
endModify(boolean),
beginModify(),
decrementMod(),
incrementMod(),
getMod()public void endModify(boolean nukePerceivedData)
nukePerceivedData - if true all flags will be deletedendModify(),
beginModify(),
decrementMod(),
incrementMod(),
getMod()public boolean equals(Object obj)
public boolean equals(JOEMol type)
public boolean existsBond(int bgn,
int end)
bgn - atom index of the start atomend - atom index of the end atom
public void finalize()
public void findChildren(Vector children,
int first,
int second)
children - Description of the Parameterfirst - Description of the Parametersecond - Description of the Parameter
public void findChildren(Vector children,
JOEAtom bgn,
JOEAtom end)
children - Description of the Parameterbgn - Description of the Parameterend - Description of the Parameterpublic void findChiralCenters()
public void findLargestFragment(JOEBitVec lf)
lf - Description of the Parameterpublic void findRingAtomsAndBonds()
public void findSSSR()
getSSSR(),
#getSSSRIterator(Vector)public GenericDataIterator genericDataIterator()
JOEDataType. These data types are used for caching ring
searches and storing special data types like comments or virtual bonds.
Furthermore there exist the most important data type JOEPairData
for storing descriptor values. Read the JOEDataType description
for details.
GenericDataIterator gdit = mol.genericDataIterator();
JOEGenericData genericData;
while(gdit.hasNext())
{
genericData = gdit.nextGenericData();
}
GenericDataIterator gdit = mol.genericDataIterator();
JOEGenericData genericData;
while(gdit.hasNext())
{
genericData = gdit.nextGenericData();
if (genericData.getDataType() == JOEDataType.JOE_PAIR_DATA)
{
JOEPairData pairData = (JOEPairData)genericData;
}
}
nativeValueIterator() would be
the recommended method for getting these values. Though the complex access
will be presented, because it's really instructive for understanding the
data access under JOELib.
GenericDataIterator gdit = mol.genericDataIterator();
JOEGenericData genericData;
while(gdit.hasNext())
{
genericData = gdit.nextGenericData();
if (genericData.getDataType() == JOEDataType.JOE_PAIR_DATA)
{
JOEPairData pairData = (JOEPairData)genericData;
// data must be parsed to check data type
genericData = mol.getData(pairData.getAttribute(), true);
pairData = (JOEPairData)genericData;
if(JOEHelper.hasInterface(pairData, "NativeValue"))
{
double tmpDbl=((NativeValue) pairData).getDoubleNV();
}
}
}
atomIterator(),
bondIterator(),
conformerIterator(),
getRingIterator(),
nativeValueIterator(),
getData(String),
getData(String, boolean),
addData(JOEGenericData),
addData(JOEGenericData, boolean),
DescriptorHelper.molDescriptors(JOEMol),
JOEDataType,
JOEGenericDatapublic boolean has2D()
public boolean has3D()
public boolean hasAromaticCorrected()
public boolean hasAromaticPerceived()
public boolean hasAtomTypesPerceived()
public boolean hasChainsPerceived()
public boolean hasChiralityPerceived()
public boolean hasClosureBondsPerceived()
public boolean hasData(String s)
s - Description of the Parameter
public boolean hasData(JOEDataType dt)
dt - Description of the Parameter
public boolean hasHybridizationPerceived()
public boolean hasHydrogensAdded()
public boolean hasImplicitValencePerceived()
public boolean hasKekulePerceived()
public boolean hasNonZeroCoords()
public boolean hasPartialChargesPerceived()
public boolean hasRingAtomsAndBondsPerceived()
public boolean hasSSSRPerceived()
public int hashCode()
public void incrementMod()
decrementMod(),
getMod(),
beginModify(),
endModify(),
endModify(boolean)public boolean insertAtom(JOEAtom atom)
atom - Description of the Parameter
public boolean kekulize()
public NativeValueIterator nativeValueIterator()
NativeValueIterator nativeIt = mol.nativeValueIterator();
double value;
String descName;
while (nativeIt.hasNext())
{
value = nativeIt.nextDouble();
descName = nativeIt.actualName();
}
atomIterator(),
bondIterator(),
conformerIterator(),
getRingIterator(),
genericDataIterator()public JOEAtom newAtom()
addAtom(JOEAtom),
createAtom()public JOEResidue newResidue()
public int numAtoms()
public int numBonds()
public int numConformers()
public int numHvyAtoms()
public int numResidues()
public int numRotors()
public boolean perceiveKekuleBonds()
public int reHash()
public void renumberAtoms(Vector v)
v - of type JOEAtompublic void reserveAtoms(int natoms)
natoms - The number of atoms to reservepublic ResidueIterator residueIterator()
public void rotate(double[][] u)
u - Description of the Parameterpublic void rotate(double[] m)
m - of size 9.
public void rotate(double[] m,
int nconf)
m - of size 9.nconf - Description of the Parameterpublic JOEMol set(JOEMol source)
source - Description of the Parameter
public JOEMol set(JOEMol source,
boolean cloneDesc,
String[] descriptors)
source - Description of the ParametercloneDesc - clones the PairData descriptors if truedescriptors - descriptors to clone. If null all descriptors are cloned
public JOEMol set(JOEMol source,
boolean cloneDesc,
String[] descriptors,
boolean addDescIfNotExist)
source - Description of the ParametercloneDesc - clones the PairData descriptors if truedescriptors - descriptors to clone. If null all descriptors are clonedaddDescIfNotExist - Missing descriptor entries, defined in descriptors
will be automatically added to the molecule if true
public void sortBonds()
public boolean stripSalts()
contiguousFragments(Vector)
public void toInertialFrame(int conf,
double[] rmat)
conf - Description of the Parameterrmat - Description of the Parameterpublic void toInertialFrame()
public String toString()
public String toString(IOType type)
type - Description of the Parameter
public String toString(boolean writeDescriptors)
writeDescriptors - Description of the Parameter
public String toString(IOType type,
boolean writeDescriptors)
type - Description of the ParameterwriteDescriptors - Description of the Parameter
public void translate(XYZVector v)
v - Description of the Parameter
public void translate(XYZVector v,
int nconf)
v - Description of the Parameternconf - Description of the Parameterpublic void unsetAromaticPerceived()
public void unsetImplicitValencePerceived()
public void unsetPartialChargesPerceived()
|
JOELib Computational Chemistry Package Comments and Questions? mail to J.K.Wegner |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||