Class AsaCalculator

java.lang.Object
org.biojava.nbio.structure.asa.AsaCalculator

public class AsaCalculator extends Object
Class to calculate Accessible Surface Areas based on the rolling ball algorithm by Shrake and Rupley. The code is adapted from a python implementation at http://boscoh.com/protein/asapy (now source is available at https://github.com/boscoh/asa). Thanks to Bosco K. Ho for a great piece of code and for his fantastic blog. See Shrake, A., and J. A. Rupley. "Environment and Exposure to Solvent of Protein Atoms. Lysozyme and Insulin." JMB (1973) 79:351-371. Lee, B., and Richards, F.M. "The interpretation of Protein Structures: Estimation of Static Accessibility" JMB (1971) 55:379-400
Author:
duarte_j
  • Field Details

  • Constructor Details

    • AsaCalculator

      public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms)
      Constructs a new AsaCalculator. Subsequently call calculateAsas() or getGroupAsas() to calculate the ASAs Only non-Hydrogen atoms are considered in the calculation.
      Parameters:
      structure -
      probe -
      nSpherePoints -
      nThreads -
      hetAtoms - if true HET residues are considered, if false they aren't, equivalent to NACCESS' -h option
      See Also:
      • StructureTools.getAllNonHAtomArray
    • AsaCalculator

      public AsaCalculator(Atom[] atoms, double probe, int nSpherePoints, int nThreads)
      Constructs a new AsaCalculator. Subsequently call calculateAsas() or getGroupAsas() to calculate the ASAs.
      Parameters:
      atoms - an array of atoms not containing Hydrogen atoms
      probe - the probe size
      nSpherePoints - the number of points to be used in generating the spherical dot-density, the more points the more accurate (and slower) calculation
      nThreads - the number of parallel threads to use for the calculation
      Throws:
      IllegalArgumentException - if any atom in the array is a Hydrogen atom
  • Method Details

    • getGroupAsas

      public GroupAsa[] getGroupAsas()
      Calculates ASA for all atoms and return them as a GroupAsa array (one element per residue in structure) containing ASAs per residue and per atom. The sorting of Groups in returned array is as specified by ResidueNumber
      Returns:
    • calculateAsas

      public double[] calculateAsas()
      Calculates the Accessible Surface Areas for the atoms given in constructor and with parameters given. Beware that the parallel implementation is quite memory hungry. It scales well as long as there is enough memory available.
      Returns:
      an array with asa values corresponding to each atom of the input array
    • getRadius

      public static double getRadius(Atom atom)
      Gets the van der Waals radius of the given atom following the values defined by Chothia (1976) J.Mol.Biol.105,1-14 NOTE: the vdw values defined by the paper assume no Hydrogens and thus "inflates" slightly the heavy atoms to account for Hydrogens. Thus this method cannot be used in a structure that contains Hydrogens! If atom is neither part of a nucleotide nor of a standard aminoacid, the default vdw radius for the element is returned. If atom is of unknown type (element) the vdw radius of {@link #Element().N} is returned
      Parameters:
      atom -
      Returns: