Class PMap

java.lang.Object
chemaxon.pharmacophore.PMap

@PublicAPI public class PMap extends Object
Class representing the pharmacophore properties found for the atoms of a target molecule.
Since:
JChem 2.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    PMap(int natoms, int nfeatures)
    Constructor.
    PMap(int natoms, BitSet[] features)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Sets every feature for every atom to false
    void
    clearFeatures(int atomIndex)
    Clears all features corresponding to the given atom index.
    Clones this PMap object.
    static PMap
    create(String plist, PSymbols symbols)
    Creates a PMap object from a pharmacophore point list string.
    int
    Returns the number of atoms.
    int[]
    getAtoms(int featureIndex)
    Returns the atom indices of the atoms having the given feature.
    int
    getAtoms(int featureIndex, int[] atomIndices)
    Returns the atom indices of the atoms having the given feature.
    int
    Returns the number of features.
    int
    getFeatureCount(int atomIndex)
    Returns the number of features corresponding to the given atom index.
    int[]
    getFeatures(int atomIndex)
    Returns the feature indices corresponding to the given atom index.
    boolean
    hasFeature(int atomIndex)
    Tells weather a given atom has any pharmacophore property.
    boolean
    hasFeature(int atomIndex, int featureIndex)
    Tells weather a given atom has a given pharmacophore property.
    void
    setFeature(int atomIndex, int featureIndex)
    Sets a given feature of a given atom to true.
    toString(PSymbols symbols)
    Returns the string representation of the feature map: for each atom the symbols representing the features of the atom are separated by '/' characters and these feature strings are separated by ';' characters.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PMap

      public PMap(int natoms, int nfeatures)
      Constructor. Creates an empty pharmacophore map.
      Parameters:
      natoms - is the number of atoms in the target molecule
      nfeatures - is the number of pharmacophore features
    • PMap

      public PMap(int natoms, BitSet[] features)
      Constructor. Sets the features array.
      Parameters:
      natoms - is the number of atoms in the target molecule
      features - is the features array
  • Method Details

    • clone

      public Object clone()
      Clones this PMap object. Copies the feature array and the number of atoms.
      Overrides:
      clone in class Object
      Returns:
      a clone of this object
    • clear

      public void clear()
      Sets every feature for every atom to false
    • getAtomCount

      public int getAtomCount()
      Returns the number of atoms.
      Returns:
      the number of atoms
    • getFeatureCount

      public int getFeatureCount()
      Returns the number of features.
      Returns:
      the number of features
    • setFeature

      public void setFeature(int atomIndex, int featureIndex)
      Sets a given feature of a given atom to true.
      Parameters:
      atomIndex - the index of the atom
      featureIndex - the index of the feature
    • hasFeature

      public boolean hasFeature(int atomIndex, int featureIndex)
      Tells weather a given atom has a given pharmacophore property.
      Parameters:
      atomIndex - the index of the atom
      featureIndex - the index of the feature
      Returns:
      true if the feature is true for the atom
    • hasFeature

      public boolean hasFeature(int atomIndex)
      Tells weather a given atom has any pharmacophore property.
      Parameters:
      atomIndex - the index of the atom
      Returns:
      true if at least one feature is true for the atom
    • getFeatureCount

      public int getFeatureCount(int atomIndex)
      Returns the number of features corresponding to the given atom index.
      Parameters:
      atomIndex - is the atom index
      Returns:
      the number of features corresponding to the given atom index
    • getFeatures

      public int[] getFeatures(int atomIndex)
      Returns the feature indices corresponding to the given atom index.
      Parameters:
      atomIndex - is the atom index
      Returns:
      the feature indices corresponding to the given atom index
    • clearFeatures

      public void clearFeatures(int atomIndex)
      Clears all features corresponding to the given atom index.
      Parameters:
      atomIndex - is the atom index
    • getAtoms

      public int[] getAtoms(int featureIndex)
      Returns the atom indices of the atoms having the given feature.
      Parameters:
      featureIndex - is the feature index
      Returns:
      the atom indices of the atoms having the given feature
    • getAtoms

      public int getAtoms(int featureIndex, int[] atomIndices) throws ArrayIndexOutOfBoundsException
      Returns the atom indices of the atoms having the given feature. The array holding the return values is preallocated and given as parameter for efficiency. Returns the number of atom indices set in the array.
      Parameters:
      featureIndex - is the feature index
      atomIndices - is the preallocated array that will contain the return value
      Returns:
      the number of atom indices set in the 'atomIndices' array.
      Throws:
      ArrayIndexOutOfBoundsException - if the preallocated array is not big enough to hold the atom indices
    • toString

      public String toString(PSymbols symbols)
      Returns the string representation of the feature map: for each atom the symbols representing the features of the atom are separated by '/' characters and these feature strings are separated by ';' characters. The number of symbols in the given symbols object is supposed to be greater than or equal to the number of features in this PMap object.
      Parameters:
      symbols - is the object storing the feature symbols
      Returns:
      a string representation of the pharmacophore features
    • create

      public static PMap create(String plist, PSymbols symbols)
      Creates a PMap object from a pharmacophore point list string.
      Parameters:
      plist - is the pharmacophore point list string (e.g. "a;b;d/d;;")
      symbols - is the object storing the feature symbols
      Returns:
      the PMap object representing the point list string