public class AsaCalculator extends Object
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
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_N_SPHERE_POINTS
The default value for number of sphere points to sample.
|
static int |
DEFAULT_NTHREADS |
static double |
DEFAULT_PROBE_SIZE |
static double |
NUC_CARBON_VDW |
static double |
NUC_NITROGEN_VDW |
static double |
OXIGEN_VDW |
static double |
PHOSPHOROUS_VDW |
static double |
SULFUR_VDW |
static double |
TETRAHEDRAL_CARBON_VDW |
static double |
TETRAHEDRAL_NITROGEN_VDW |
static double |
TRIGONAL_CARBON_VDW |
static double |
TRIGONAL_NITROGEN_VDW |
Constructor and Description |
---|
AsaCalculator(Atom[] atoms,
double probe,
int nSpherePoints,
int nThreads)
Constructs a new AsaCalculator.
|
AsaCalculator(javax.vecmath.Point3d[] atomCoords,
double probe,
int nSpherePoints,
int nThreads,
double radius)
Constructs a new AsaCalculator.
|
AsaCalculator(Structure structure,
double probe,
int nSpherePoints,
int nThreads,
boolean hetAtoms)
Constructs a new AsaCalculator.
|
Modifier and Type | Method and Description |
---|---|
double[] |
calculateAsas()
Calculates the Accessible Surface Areas for the atoms given in constructor and with parameters given.
|
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.
|
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.
|
public static final int DEFAULT_N_SPHERE_POINTS
public static final double DEFAULT_PROBE_SIZE
public static final int DEFAULT_NTHREADS
public static final double TRIGONAL_CARBON_VDW
public static final double TETRAHEDRAL_CARBON_VDW
public static final double TRIGONAL_NITROGEN_VDW
public static final double TETRAHEDRAL_NITROGEN_VDW
public static final double SULFUR_VDW
public static final double OXIGEN_VDW
public static final double NUC_CARBON_VDW
public static final double NUC_NITROGEN_VDW
public static final double PHOSPHOROUS_VDW
public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms)
calculateAsas()
or getGroupAsas()
to calculate the ASAs
Only non-Hydrogen atoms are considered in the calculation.structure
- the structure, all non-H atoms will be usedprobe
- the probe sizenSpherePoints
- the number of points to be used in generating the spherical
dot-density, the more points the more accurate (and slower) calculationnThreads
- the number of parallel threads to use for the calculationhetAtoms
- if true HET residues are considered, if false they aren't, equivalent to
NACCESS' -h optionStructureTools.getAllNonHAtomArray(org.biojava.nbio.structure.Structure, boolean)
public AsaCalculator(Atom[] atoms, double probe, int nSpherePoints, int nThreads)
calculateAsas()
or getGroupAsas()
to calculate the ASAs.atoms
- an array of atoms not containing Hydrogen atomsprobe
- the probe sizenSpherePoints
- the number of points to be used in generating the spherical
dot-density, the more points the more accurate (and slower) calculationnThreads
- the number of parallel threads to use for the calculationIllegalArgumentException
- if any atom in the array is a Hydrogen atompublic AsaCalculator(javax.vecmath.Point3d[] atomCoords, double probe, int nSpherePoints, int nThreads, double radius)
calcSingleAsa(int)
to calculate the atom ASAs. The given radius parameter will be taken as the radius for
all points given. No ASA calculation per group will be possible with this constructor, so
usage of getGroupAsas()
will result in a NullPointerException.atomCoords
- the coordinates representing the center of atomsprobe
- the probe sizenSpherePoints
- the number of points to be used in generating the spherical
dot-density, the more points the more accurate (and slower) calculationnThreads
- the number of parallel threads to use for the calculationradius
- the radius that will be assign to all given coordinatespublic GroupAsa[] getGroupAsas()
ResidueNumber
public double[] calculateAsas()
public static double getRadius(Atom atom)
Element().N
is returnedatom
- Copyright © 2000–2019 BioJava. All rights reserved.