@PublicAPI public class PMap extends java.lang.Object
Constructor and Description |
---|
PMap(int natoms,
java.util.BitSet[] features)
Constructor.
|
PMap(int natoms,
int nfeatures)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Sets every feature for every atom to
false |
void |
clearFeatures(int atomIndex)
Clears all features corresponding to the given atom index.
|
java.lang.Object |
clone()
Clones this PMap object.
|
static PMap |
create(java.lang.String plist,
PSymbols symbols)
Creates a PMap object from a pharmacophore point list string.
|
int |
getAtomCount()
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 |
getFeatureCount()
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 . |
java.lang.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.
|
public PMap(int natoms, int nfeatures)
natoms
- is the number of atoms in the target moleculenfeatures
- is the number of pharmacophore featurespublic PMap(int natoms, java.util.BitSet[] features)
natoms
- is the number of atoms in the target moleculefeatures
- is the features arraypublic java.lang.Object clone()
clone
in class java.lang.Object
public void clear()
false
public int getAtomCount()
public int getFeatureCount()
public void setFeature(int atomIndex, int featureIndex)
true
.atomIndex
- the index of the atomfeatureIndex
- the index of the featurepublic boolean hasFeature(int atomIndex, int featureIndex)
atomIndex
- the index of the atomfeatureIndex
- the index of the featuretrue
if the feature is true for the atompublic boolean hasFeature(int atomIndex)
atomIndex
- the index of the atomtrue
if at least one feature is true for the atompublic int getFeatureCount(int atomIndex)
atomIndex
- is the atom indexpublic int[] getFeatures(int atomIndex)
atomIndex
- is the atom indexpublic void clearFeatures(int atomIndex)
atomIndex
- is the atom indexpublic int[] getAtoms(int featureIndex)
featureIndex
- is the feature indexpublic int getAtoms(int featureIndex, int[] atomIndices) throws java.lang.ArrayIndexOutOfBoundsException
featureIndex
- is the feature indexatomIndices
- is the preallocated array that will contain the return valuejava.lang.ArrayIndexOutOfBoundsException
- if the preallocated array is not big enough
to hold the atom indicespublic java.lang.String toString(PSymbols symbols)
symbols
- is the object storing the feature symbolspublic static PMap create(java.lang.String plist, PSymbols symbols)
plist
- is the pharmacophore point list string (e.g. "a;b;d/d;;")symbols
- is the object storing the feature symbols