Class PharmacophorePoint

  • All Implemented Interfaces:
    chemaxon.marvin.space.UsableObject

    @PublicAPI
    public class PharmacophorePoint
    extends GraphicComponent
    implements chemaxon.marvin.space.UsableObject
    Simple spherical representation of a pharmacophoric point/area. Three properties are considered: location, radius and pharmacophore point type. Current implementation provides wired in types: acceptor, donor, anionic, cationic, hydrophobic, aromatic and excluded.
    At present PharmacophorePoint serves mere visualisation purposes. The graphical representation in the MarvinSpace canvas is a translucent sphere.
    Since:
    Marvin 4.0.2
    • Constructor Detail

      • PharmacophorePoint

        public PharmacophorePoint()
        Creates a new instance of PharmacophorePoint. It will be placed at the origo by default, its position can be set by setPosition().
      • PharmacophorePoint

        public PharmacophorePoint​(ComponentElement ce)
        Creates a PharmacophorePoint at the position of the given ComponentElement getting the coordinates by getCoordinates(). Radius is set to by default.
        Parameters:
        ce - a visible component around which the pharmacophore sphere is placed
      • PharmacophorePoint

        public PharmacophorePoint​(double x,
                                  double y,
                                  double z)
        Creates a PharmacophorePoint at the given position. Radius is set to by default.
        Parameters:
        x - first coordinate of the pharmacophore point to create
        y - second coordinate of the pharmacophore point to create
        z - third coordinate of the pharmacophore point to create
    • Method Detail

      • setPosition

        public void setPosition​(double x,
                                double y,
                                double z)
        Sets the position of the PharmacophorePoint. Size is not affected.
      • getCoordinates

        public void getCoordinates​(ComponentElement item,
                                   float[] c)
        Gets the position of the pharmacophore point. The position of the pharmacophore point is the centre of the sphere.
        Overrides:
        getCoordinates in class GraphicComponent
        Parameters:
        item - not used
        c - coordinates of the pharmacophore point are stored in this array, it has to be pre-allocated by the caller of this method
      • getDescription

        public String getDescription()
        Returns textual description.
        Overrides:
        getDescription in class GraphicComponent
        Returns:
        description that contains pharmacophore type name
      • getName

        public String getName()
        Description copied from class: GraphicComponent
        Returns the name of the component.
        Specified by:
        getName in interface chemaxon.marvin.space.UsableObject
        Overrides:
        getName in class GraphicComponent
        Returns:
        name that is getClass.getName() by default.
      • toString

        public String toString()
        Specified by:
        toString in interface chemaxon.marvin.space.UsableObject
        Overrides:
        toString in class GraphicComponent
      • getRadius

        public double getRadius()
        Returns the radius of the PharmacophorePoint in angstroms.
      • setRadius

        public void setRadius​(float r)
        Sets the radius of the PharmaCophorePoint.
        Parameters:
        r - radius in angstroms
      • getColor

        public Color getColor()
        Returns the color of the PharmacophorePoint. The color depends on the type of the PharmacophorePoint, and in case of multiple types, the individual colors are mixed. Note, that current implementation uses wired in colors.
        • Anionic - Dark red
        • Cationic - Dark blue
        • Acceptor - Red
        • Donor - Blue
        • Hydrophobe - Yellow
        • Aromatic - Green
        • Excluded - Gray
        Specified by:
        getColor in interface chemaxon.marvin.space.UsableObject
        Overrides:
        getColor in class GraphicComponent
      • select

        public void select()
        Sets the component to be selected.
        Specified by:
        select in interface chemaxon.marvin.space.UsableObject
        Overrides:
        select in class GraphicComponent
      • unSelect

        public void unSelect()
        Sets the component to be unselected.
        Specified by:
        unSelect in interface chemaxon.marvin.space.UsableObject
        Overrides:
        unSelect in class GraphicComponent
      • isHighlighted

        public boolean isHighlighted()
        Returns true if the component is highlighted.
      • setHighlighted

        public void setHighlighted​(boolean flag)
        Sets the highlighted state of the pharmacophore point. The highlighted component appears brighter.
        Parameters:
        flag - highligth indicator
      • translate

        public void translate​(float[] v)
        Translates the component with the given translation vector.
        Overrides:
        translate in class GraphicComponent
        Parameters:
        v - 3D translation vector
      • resize

        public void resize​(double x,
                           double y,
                           double z)
        Resizes the component according to given factors. Due to spherical representation only one direction is considered. The sphere cannot be resized arbitrarily, the upper limit is 10 Angstrom.
        Overrides:
        resize in class GraphicComponent
        Parameters:
        x - ignored
        y - size increment/decrement
        z - ignored
      • isControllable

        public boolean isControllable​(String type)
        Returns whether controling by the given type of controller is allowed to the component. This component is allowed to be translated and resized.
        Overrides:
        isControllable in class GraphicComponent
        Parameters:
        type - control event type, Shift and Resize are interpreted by this component
        Returns:
        true if type is either Shift or Resize
      • drawTransparentPart

        public void drawTransparentPart()
        Draws transparent parts of the component if there is any. Note, that PharmacophorePoint has no subpart, thus the whole component is either transparent or opaque.
        Overrides:
        drawTransparentPart in class GraphicComponent
      • draw

        public void draw()
        Draws the entire component if it is opaque.
        Overrides:
        draw in class GraphicComponent
      • initDraw

        public void initDraw()
        Initializes all internal data structure needed for drawing the component. It is called prior to draw().
      • setDrawType

        public void setDrawType​(String type)
        Sets current drawing type.
        Parameters:
        type - Solid, Mesh or Transparent
      • getDrawType

        public String getDrawType()
        Returns the name of the drawing type.
        Returns:
        Solid, Mesh or Transparent
      • isAcceptor

        public boolean isAcceptor()
        Checks if actual pharmacophore type includes ACCEPTOR_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types, though certain combinations are senseless (like ANIONIC_TYPE and CATIONIC_TYPE at the same time).
        Returns:
        true if current type includes ACCEPTOR_TYPE
      • setAcceptor

        public void setAcceptor​(boolean flag)
        Sets or clears the acceptor property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include ACCEPTOR_TYPE otherwise it will not be an acceptor
      • isDonor

        public boolean isDonor()
        Checks if actual pharmacophore type includes DONOR_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types.
        Returns:
        true if current type includes ADONOR_TYPE
      • setDonor

        public void setDonor​(boolean flag)
        Sets or clears the donor property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include DONOR_TYPE otherwise it will not be a donor
      • isHydrophobic

        public boolean isHydrophobic()
        Checks if actual pharmacophore type includes HYDROPHOBIC_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types.
        Returns:
        true if current type includes HYDROPHOBIC_TYPE
      • setHydrophobic

        public void setHydrophobic​(boolean flag)
        Sets or clears the hydrophobic property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include HYDROPHOBIC_TYPE otherwise it will not be hydrophobic
      • isAromatic

        public boolean isAromatic()
        Checks if actual pharmacophore type includes AROMATIC_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types.
        Returns:
        true if current type includes AROMATIC_TYPE
      • setAromatic

        public void setAromatic​(boolean flag)
        Sets or clears the aromatic property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include AROMATIC_TYPE otherwise it will not be aromatic
      • isAnionic

        public boolean isAnionic()
        Check if actual pharmacophore type includes ANIONIC_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types.
        Returns:
        true if current type includes ANIONIC_TYPE
      • setAnionic

        public void setAnionic​(boolean flag)
        Sets or clears the anionic property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include ANIONIC_TYPE otherwise it will not be anionic
      • isCationic

        public boolean isCationic()
        Check if actual pharmacophore type includes CATIONIC_TYPE. Types are not exclusive, a PharmacophorePoint can have multiple types.
        Returns:
        true if current type includes CATIONIC_TYPE
      • setCationic

        public void setCationic​(boolean flag)
        Sets or clears the cationic property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will include CATIONIC_TYPE otherwise it will not be cationic
      • isExcluded

        public boolean isExcluded()
        Check if actual pharmacophore type is EXCLUDED_TYPE. This can be used to represent excluded volumes.
        Returns:
        true if current type is EXCLUDED_TYPE
      • setExcluded

        public void setExcluded​(boolean flag)
        Sets or clears the excluded property of the PharmacophorePoint.
        Parameters:
        flag - if true, current pharmacophore type will be set to EXCLUDED_TYPE otherwise it will not be an excluded volume
      • setRenderingQuality

        public void setRenderingQuality​(String quality)
        Sets the rendering quality and calls setRenderingQuality(int).
        Parameters:
        quality - Can be "High", "Medium", "Low".
      • setDrawProperty

        public void setDrawProperty​(String propertyName,
                                    String propertyValue)
        Sets drawing properties specific to PharmacophoreSphere. Generic properties are processed by GraphicComponent.setDrawProperty(String, String).
        Specific properties accepted:
        • "Quality" -- "High", "Medium", "Low"
        • "PharmacophorePoint.DrawType" -- "Mesh", "Solid", "Transparent"
        • "Acceptor" -- Boolean value as String
        • "Donor" -- Boolean value as String
        • "Hydrophobe" -- Boolean value as String
        • "Aromatic" -- Boolean value as String
        • "Anionic" -- Boolean value as String
        • "Cationic" -- Boolean value as String
        • "Excluded" -- Boolean value as String
        Specified by:
        setDrawProperty in interface chemaxon.marvin.space.UsableObject
        Overrides:
        setDrawProperty in class GraphicComponent
        Parameters:
        propertyName - identifier of the draw property
        propertyValue - value of the draw property as a String