Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

joelib.molecule
Class JOEMol  view JOEMol download JOEMol.java

java.lang.Object
  extended byjoelib.molecule.JOEMol
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class JOEMol
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Molecule representation.

There are different possibilities to build a molecule.

  1. Using SMILES notation 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());
     
  2. Using plain atoms and bonds to build a molecule.
     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();
     
  3. 2D coordinates can be generated using joelib.util.cdk.CDKTools which uses the structure layout module from the CDK.
    3D coordinates can be generated using an external processing module (joelib.ext.External), if available, for 3D generation programs, like Corina.

    For speed optimization of loading descriptor molecule files have a look at the joelib.desc.ResultFactory.


    Field Summary
    protected  int _access
              Description of the Field
    protected  java.util.Vector _atom
              Atoms of this molecule.
    protected  boolean _autoFormalCharge
              Automatic formal charge calculation.
    protected  boolean _autoPartialCharge
              Automatic partial charge calculation.
    protected  java.util.Vector _bond
              Bonds of this molecule.
    protected  double[] _c
              Coordinate array of the atom positions.
    protected  int _cur_pose_idx
              Description of the Field
    protected  double _energy
              Energy of this molecule.
    protected  int _flags
              Molecule flags.
    protected  joelib.io.IOType _itype
              Molecule input type.
    protected  int _mod
              Modification counter.
    protected  int _natoms
              Number of atoms in this molecule.
    protected  int _nbonds
              Number of bonds in this molecule.
    protected  joelib.io.IOType _otype
              Molecule output type.
    protected  java.util.Vector _pose
              Description of the Field
    protected  java.util.Vector _residue
              Residues for this molecule.
    protected  java.lang.String _title
              Title for this molecule.
    protected  java.util.Vector _vconf
              Of type double[].
    protected  double[] _xyz_pose
              Description of the Field
    private static joelib.io.IOType DEFAULT_IO_TYPE
               
    protected  GenericDataHolder genericData
              Holds additional molecule data, e.g.
    private  int hash
               
    static int JOE_AROM_CORRECTED_MOL
              Molecule flag: aromaticity corrected molecule.
    static int JOE_AROMATIC_MOL
              Molecule flag: aromaticity calculated.
    private static int JOE_ATOM_INCREMENT
               
    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.
    private static org.apache.log4j.Category logger
              Obtain a suitable logger.
     
    Constructor Summary
    JOEMol()
              Constructor for the JOEMol.
    JOEMol(joelib.io.IOType itype, joelib.io.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, java.lang.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(joelib.data.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(joelib.data.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, joelib.math.XYZVector p1, joelib.math.XYZVector p2)
              Aligns atom a1 on p1 and atom a2 along p1->p2 vector.
     joelib.util.iterator.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.
     joelib.util.iterator.BondIterator bondIterator()
              Gets an iterator over all bonds.
     void center()
              Centers molecule.
     joelib.math.XYZVector center(int nconf)
              Centers conformer.
     boolean clear()
              Clears molecule.
     java.lang.Object clone()
              Clones molecule without additional data (e.g.
     java.lang.Object clone(boolean cloneDesc)
              Clones this molecule.
     java.lang.Object clone(boolean cloneDesc, java.lang.String[] descriptors)
              Clones this molecule.
     joelib.util.iterator.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(java.util.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(joelib.data.JOEDataType dt)
              Deletes all data elements os the given JOEDataType .
     void deleteData(joelib.data.JOEGenericData gd)
              Delete all data elements which are equal to the given JOEGenericData element.
     boolean deleteData(java.lang.String s)
              Description of the Method
     void deleteData(java.util.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(java.lang.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(java.util.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(java.util.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(joelib.util.JOEBitVec lf)
              each vector contains the atom numbers of a contig fragment the vectors are sorted by size from largest to smallest
     void findRingAtomsAndBonds()
              Description of the Method
     void findSSSR()
              Finds the Smallest Set of Smallest Rings (SSSR).
     joelib.util.iterator.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
     java.util.Vector getConformers()
              Returns a java.util.Vector of all conformer coordinates (double[] values).
     double[] getCoordinates()
              Gets the coordinate array of this molecule.
     joelib.data.JOEGenericData getData(joelib.data.JOEDataType dt)
              Returns the first data entry of the given data type.
     joelib.data.JOEGenericData getData(java.lang.String s)
              Returns the data entry with the given name, if multiple data entries exists only the first one is taken.
     joelib.data.JOEGenericData getData(java.lang.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
     joelib.io.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.
     joelib.io.IOType getOutputType()
              Gets the outputType attribute of the JOEMol object
     JOEResidue getResidue(int idx)
              Gets the residue attribute of the JOEMol object
     joelib.util.iterator.RingIterator getRingIterator()
              Gets iterator for the Smallest Set of Smallest Rings (SSSR).
     java.util.Vector getSSSR()
              Gets the Smallest Set of Smallest Rings (SSSR).
    protected  joelib.util.iterator.RingIterator getSSSRIterator(java.util.Vector rv)
              Gets iterator for the Smallest Set of Smallest Rings (SSSR).
     java.lang.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(joelib.data.JOEDataType dt)
              Returns true if one ore more entries of the given JOEDataType exists.
     boolean hasData(java.lang.String s)
              Description of the Method
    protected  boolean hasFlag(int flag)
              Has this molecules set flags.
     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.
     joelib.util.iterator.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(java.util.Vector v)
               
     void reserveAtoms(int natoms)
              Reserves a initial capacity of atoms.
     joelib.util.iterator.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, java.lang.String[] descriptors)
              Clones molecule.
     JOEMol set(JOEMol source, boolean cloneDesc, java.lang.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(java.util.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
    protected  void setFlag(int flag)
              Sets a molecule flag for this 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(joelib.io.IOType type)
              Sets the inputType attribute of the JOEMol object
     void setKekulePerceived()
              Sets the kekulePerceived attribute of the JOEMol object
     void setOutputType(joelib.io.IOType type)
              Sets the outputType attribute of the JOEMol object
     void setPartialChargesPerceived()
              Sets the partialChargesPerceived attribute of the JOEMol object
     void setRingAtomsAndBondsPerceived()
              Sets the ringAtomsAndBondsPerceived attribute of the JOEMol object
     void setSSSRPerceived()
              Sets the sSSRPerceived attribute of the JOEMol object
     void setTitle(java.lang.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
    private  boolean sortAtomZ(joelib.util.types.AtomZPos a, joelib.util.types.AtomZPos b)
              Description of the Method
     void sortBonds()
              Description of the Method
    private  boolean sortVVInt(java.util.Vector a, java.util.Vector b)
              Description of the Method Description of the Method Description of the Method Description of the Method 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
     java.lang.String toString()
              Description of the Method
     java.lang.String toString(boolean writeDescriptors)
              Description of the Method
     java.lang.String toString(joelib.io.IOType type)
              Description of the Method
     java.lang.String toString(joelib.io.IOType type, boolean writeDescriptors)
              Description of the Method
     void translate(joelib.math.XYZVector v)
              Description of the Method
     void translate(joelib.math.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

    logger

    private static org.apache.log4j.Category logger
    Obtain a suitable logger.


    JOE_SSSR_MOL

    public static final int JOE_SSSR_MOL
    Molecule flag: SSSR calculated.

    See Also:
    Constant Field Values

    JOE_RINGFLAGS_MOL

    public static final int JOE_RINGFLAGS_MOL
    Molecule flag: rings perceived.

    See Also:
    Constant Field Values

    JOE_AROMATIC_MOL

    public static final int JOE_AROMATIC_MOL
    Molecule flag: aromaticity calculated.

    See Also:
    Constant Field Values

    JOE_ATOMTYPES_MOL

    public static final int JOE_ATOMTYPES_MOL
    Molecule flag: atom types perceived.

    See Also:
    Constant Field Values

    JOE_CHIRALITY_MOL

    public static final int JOE_CHIRALITY_MOL
    Molecule flag: atom chirality flags perceived.

    See Also:
    Constant Field Values

    JOE_PCHARGE_MOL

    public static final int JOE_PCHARGE_MOL
    Molecule flag: partitial charges perceived.

    See Also:
    Constant Field Values

    JOE_HYBRID_MOL

    public static final int JOE_HYBRID_MOL
    Molecule flag: atom hybridisation perceived.

    See Also:
    Constant Field Values

    JOE_IMPVAL_MOL

    public static final int JOE_IMPVAL_MOL
    Molecule flag: implicit valences perceived.

    See Also:
    Constant Field Values

    JOE_KEKULE_MOL

    public static final int JOE_KEKULE_MOL
    Molecule flag: kekulization perceived.

    See Also:
    Constant Field Values

    JOE_CLOSURE_MOL

    public static final int JOE_CLOSURE_MOL
    Molecule flag: closure bonds perceived.

    See Also:
    Constant Field Values

    JOE_H_ADDED_MOL

    public static final int JOE_H_ADDED_MOL
    Molecule flag: H atoms added molecule.

    See Also:
    Constant Field Values

    JOE_PH_CORRECTED_MOL

    public static final int JOE_PH_CORRECTED_MOL
    Molecule flag: PH value perceived.

    See Also:
    Constant Field Values

    JOE_AROM_CORRECTED_MOL

    public static final int JOE_AROM_CORRECTED_MOL
    Molecule flag: aromaticity corrected molecule.

    See Also:
    Constant Field Values

    JOE_CHAINS_MOL

    public static final int JOE_CHAINS_MOL
    Molecule flag: chain molecule.

    See Also:
    Constant Field Values

    JOE_CURRENT_CONFORMER

    public static final int JOE_CURRENT_CONFORMER
    Molecule flag: current conformer.

    See Also:
    Constant Field Values

    JOE_ATOM_INCREMENT

    private static final int JOE_ATOM_INCREMENT
    See Also:
    Constant Field Values

    DEFAULT_IO_TYPE

    private static final joelib.io.IOType DEFAULT_IO_TYPE

    genericData

    protected GenericDataHolder genericData
    Holds additional molecule data, e.g. atom, bond or moelcule properties.


    _itype

    protected joelib.io.IOType _itype
    Molecule input type.


    _otype

    protected joelib.io.IOType _otype
    Molecule output type.


    _title

    protected java.lang.String _title
    Title for this molecule.


    _atom

    protected java.util.Vector _atom
    Atoms of this molecule.

    See Also:
    JOEAtom

    _bond

    protected java.util.Vector _bond
    Bonds of this molecule.

    See Also:
    JOEBond

    _pose

    protected java.util.Vector _pose
    Description of the Field


    _residue

    protected java.util.Vector _residue
    Residues for this molecule.


    _vconf

    protected java.util.Vector _vconf
    Of type double[].


    _c

    protected double[] _c
    Coordinate array of the atom positions.


    _xyz_pose

    protected double[] _xyz_pose
    Description of the Field


    _autoFormalCharge

    protected boolean _autoFormalCharge
    Automatic formal charge calculation.


    _autoPartialCharge

    protected boolean _autoPartialCharge
    Automatic partial charge calculation.


    _energy

    protected double _energy
    Energy of this molecule.


    _access

    protected int _access
    Description of the Field


    _cur_pose_idx

    protected int _cur_pose_idx
    Description of the Field


    _flags

    protected int _flags
    Molecule flags.

    See Also:
    JOE_SSSR_MOL 55 , JOE_RINGFLAGS_MOL 55 , JOE_AROMATIC_MOL 55 , JOE_ATOMTYPES_MOL 55 , JOE_CHIRALITY_MOL 55 , JOE_PCHARGE_MOL 55 , JOE_HYBRID_MOL 55 , JOE_IMPVAL_MOL 55 , JOE_KEKULE_MOL 55 , JOE_CLOSURE_MOL 55 , JOE_H_ADDED_MOL 55 , JOE_PH_CORRECTED_MOL 55 , JOE_AROM_CORRECTED_MOL 55 , JOE_CHAINS_MOL 55 , JOE_CURRENT_CONFORMER 55

    _mod

    protected int _mod
    Modification counter.

    See Also:
    getMod() 55

    _natoms

    protected int _natoms
    Number of atoms in this molecule.


    _nbonds

    protected int _nbonds
    Number of bonds in this molecule.


    hash

    private int hash
    Constructor Detail

    JOEMol

    public JOEMol()
    Constructor for the JOEMol. The 'Structured Data File' (SDF) molecule data format is used for default.


    JOEMol

    public JOEMol(joelib.io.IOType itype,
                  joelib.io.IOType otype)
    Constructor for the JOEMol.


    JOEMol

    public JOEMol(JOEMol source,
                  boolean cloneDesc,
                  java.lang.String[] descriptors)
    Constructor for the JOEMol.


    JOEMol

    public JOEMol(JOEMol source,
                  boolean cloneDesc)
    Constructor for the JOEMol.


    JOEMol

    public JOEMol(JOEMol source)
    Clones the molecule without data elements.

    Method Detail

    setAdd

    public JOEMol setAdd(JOEMol source)
    Sets the add attribute of the JOEMol object


    setAromaticCorrected

    public void setAromaticCorrected()
    Sets the aromaticCorrected attribute of the JOEMol object


    setAromaticPerceived

    public void setAromaticPerceived()
    Sets the aromaticPerceived attribute of the JOEMol object


    getAtom

    public JOEAtom getAtom(int idx)
    Gets an atom of the JOEMol object Atom index must be between 1 to numAtoms() .


    setAtomTypesPerceived

    public void setAtomTypesPerceived()
    Sets the atomTypesPerceived attribute of the JOEMol object


    setAutomaticFormalCharge

    public void setAutomaticFormalCharge(boolean val)
    Sets the flag if the automatic calculation of the formal charge of the atoms is allowed. This is for example used in the PH value correction method.


    setAutomaticPartialCharge

    public void setAutomaticPartialCharge(boolean val)
    Sets the automaticPartialCharge attribute of the JOEMol object


    getBond

    public JOEBond getBond(int idx)
    Gets a bond of the JOEMol object. Bond index must be between 0 to (numBonds()-1) .


    getBond

    public JOEBond getBond(int bgn,
                           int end)
    Gets the bond attribute of the JOEMol object Atom index must be between 1 to numAtoms() .


    getBond

    public JOEBond getBond(JOEAtom bgn,
                           JOEAtom end)
    Gets the bond attribute of the JOEMol object


    setChainsPerceived

    public void setChainsPerceived()
    Sets the chainsPerceived attribute of the JOEMol object


    isChiral

    public boolean isChiral()
    Gets the chiral attribute of the JOEMol object


    setChiralityPerceived

    public void setChiralityPerceived()
    Sets the chiralityPerceived attribute of the JOEMol object


    setClosureBondsPerceived

    public void setClosureBondsPerceived()
    Sets the closureBondsPerceived attribute of the JOEMol object


    setConformer

    public void setConformer(int i)
    Sets the conformer attribute of the JOEMol object


    getConformer

    public double[] getConformer(int i)
    Gets the conformer attribute of the JOEMol object


    setConformers

    public void setConformers(java.util.Vector v)
    Sets the conformers attribute of the JOEMol object


    getConformers

    public java.util.Vector getConformers()
    Returns a java.util.Vector of all conformer coordinates (double[] values).


    getCoordinates

    public double[] getCoordinates()
    Gets the coordinate array of this molecule.


    setCorrectedForPH

    public void setCorrectedForPH()
    Sets the correctedForPH attribute of the JOEMol object


    isCorrectedForPH

    public boolean isCorrectedForPH()
    Gets the correctedForPH attribute of the JOEMol object


    getData

    public joelib.data.JOEGenericData getData(joelib.data.JOEDataType dt)
    Returns the first data entry of the given data type. If this data type don't exists in this molecule, null is returned.

    There exist a lot of default data types which where defined in joelib.data.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 joelib.data.JOEPairData for storing descriptor values. Read the joelib.data.JOEDataType description for details.


    getData

    public joelib.data.JOEGenericData getData(java.lang.String s)
    Returns the data entry with the given name, if multiple data entries exists only the first one is taken. If the data element is a joelib.data.JOEPairData element with a unparsed String value, the descriptor value will be automatically parsed from a String value to the representing result (joelib.desc.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 joelib.data.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 joelib.data.JOEPairData for storing descriptor values. Read the joelib.data.JOEDataType description for details.

    Missing descriptor values can be calculated by using DescriptorHelper.descFromMol(JOEMol, String)>DescriptorHelper.descFromMol(JOEMol, String) 55 .
    Example:

     DescResult result=null;
     try
     {
             result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
     }
     catch (DescriptorException ex)
     {
             // descriptor can not be calculated
     }
     
    Notice the difference between joelib.data.JOEGenericData and joelib.desc.DescResult. joelib.desc.DescResult values can be added to molecules by using joelib.data.JOEPairData
     JOEPairData dp = new JOEPairData();
     dp.setAttribute(descriptorName);
     dp.setValue(result);
     mol.addData(dp);
     


    getData

    public joelib.data.JOEGenericData getData(java.lang.String s,
                                              boolean parse)
    Returns the data entry with the given name, if multiple data entries exists only the first one is taken. If the data element is a joelib.data.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 joelib.data.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 joelib.data.JOEPairData for storing descriptor values. Read the joelib.data.JOEDataType description for details.

    Missing descriptor values can be calculated by using DescriptorHelper.descFromMol(JOEMol, String)>DescriptorHelper.descFromMol(JOEMol, String) 55 .
    Example:

     DescResult result=null;
     try
     {
             result=DescriptorHelper.instance().descFromMol(mol, descriptorName);
     }
     catch (DescriptorException ex)
     {
             // descriptor can not be calculated
     }
     
    Notice the difference between joelib.data.JOEGenericData and joelib.desc.DescResult. joelib.desc.DescResult values can be added to molecules by using joelib.data.JOEPairData
     JOEPairData dp = new JOEPairData();
     dp.setAttribute(descriptorName);
     dp.setValue(result);
     mol.addData(dp);
     


    setEnergy

    public void setEnergy(double energy)
    Sets the energy attribute of the JOEMol object


    getEnergy

    public double getEnergy()
    Gets the energy attribute of the JOEMol object


    getExactMass

    public double getExactMass()
    Gets mass given by isotopes (or most abundant isotope as necessary).


    getFirstAtom

    public JOEAtom getFirstAtom()
    Gets the firstAtom attribute of the JOEMol object


    getFlags

    public int getFlags()
    Gets the flags attribute of the JOEMol object


    getGTDVector

    public boolean getGTDVector(int[] gtd)
    Gets the gTDVector attribute of the JOEMol object


    setHybridizationPerceived

    public void setHybridizationPerceived()
    Sets the hybridizationPerceived attribute of the JOEMol object


    setHydrogensAdded

    public void setHydrogensAdded()
    Sets the hydrogensAdded attribute of the JOEMol object


    setImplicitValencePerceived

    public void setImplicitValencePerceived()
    Sets the implicitValencePerceived attribute of the JOEMol object