Class JPlogPDescriptor.JPlogPCalculator

  • Enclosing class:
    JPlogPDescriptor

    protected class JPlogPDescriptor.JPlogPCalculator
    extends Object
    The class that calculated the logP according to the JPlogP method described in: Journal of Cheminformatics 2018 10:61 https://doi.org/10.1186/s13321-018-0316-5 This is lower level access and should normally be obtained through the descriptor above.
    Author:
    Jeffrey
    • Constructor Detail

      • JPlogPCalculator

        public JPlogPCalculator​(Object[] params)
        Initialises the required coefficients for the trained model from the paper.
      • JPlogPCalculator

        public JPlogPCalculator()
    • Method Detail

      • calcLogP

        protected Double calcLogP​(IAtomContainer struct)
        Given a structure in the correct configuration (explicit H and aromatised) it will return the logP as a Double or if it is out of domain (encounters an unknown atomtype) it will return Double.NaN
        Parameters:
        struct - the structure to calculate it must have explicit H and be aromatised.
        Returns:
        The calculated logP as a Double
      • getMappedHologram

        public Map<Integer,​Integer> getMappedHologram​(IAtomContainer struct)
        Used in Training the model
        Parameters:
        struct -
        Returns:
        Map representing the Hologram of the given structure
      • getHydrogenSpecial

        protected int getHydrogenSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for a Hydrogen Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • getDefaultSpecial

        protected int getDefaultSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for a "Default" ie not C,N,O,H,F Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • getFluorineSpecial

        protected int getFluorineSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for a Fluorine Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • getOxygenSpecial

        protected int getOxygenSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for an Oxygen Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • getNitrogenSpecial

        protected int getNitrogenSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for a Nitrogen Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • getCarbonSpecial

        protected int getCarbonSpecial​(IAtom atom)
        Determines and returns the SS (subsection) portion of the atomtype integer for a Carbon Atom
        Parameters:
        atom -
        Returns:
        the final 2 digits for the given atom
      • checkAlphaCarbonyl

        protected boolean checkAlphaCarbonyl​(IAtom atom,
                                             String symbol)
        Should be called from the carbonyl oxygen
        Parameters:
        atom -
        symbol -
        Returns:
        true if there is an atom of sybmol alpha to the carbonyl
      • boundTo

        protected boolean boundTo​(IAtom atom,
                                  String symbol)
        Parameters:
        atom -
        symbol -
        Returns:
        true if the atom has a bond to an atom of the given symbol
      • getNumMoreElectronegativethanCarbon

        protected double getNumMoreElectronegativethanCarbon​(IAtom atom)
        Parameters:
        atom -
        Returns:
        bond order for electron withdrawing atoms from the given atom ie =O = 2
      • electronWithdrawing

        protected boolean electronWithdrawing​(IAtom atom)
        Parameters:
        atom -
        Returns:
        true if the atom is considered electron withdrawing relative to carbon (N,O,S,F,Cl,Br,I)
      • nonHNeighbours

        protected int nonHNeighbours​(IAtom atom)
        Parameters:
        atom -
        Returns:
        number of heavy atoms bound to the atom
      • getPolarBondArray

        protected int[] getPolarBondArray​(IAtom atom)
        Parameters:
        atom -
        Returns:
        in array of bond information to polar atoms array form is [single, aromatic, double, triple]
      • isPolar

        protected boolean isPolar​(IAtom atom)
        Parameters:
        atom -
        Returns:
        true if atom is a "polar atom" (O,N,S,P)
      • doubleBondHetero

        protected boolean doubleBondHetero​(IAtom atom)
        Parameters:
        atom -
        Returns:
        true if atom is doublebonded to a heteroatom (polar atom)
      • carbonylConjugated

        protected boolean carbonylConjugated​(IAtom atom)
        Parameters:
        atom -
        Returns:
        true if atom is singly bonded to a carbonyl
      • nextToAromatic

        protected boolean nextToAromatic​(IAtom atom)
        Parameters:
        atom -
        Returns:
        true if single bonded to an aromatic atom