diff --git a/biojava-structure/src/main/java/org/biojava/nbio/structure/asa/AsaCalculator.java b/biojava-structure/src/main/java/org/biojava/nbio/structure/asa/AsaCalculator.java index 84effc3e44..0f46b7f416 100644 --- a/biojava-structure/src/main/java/org/biojava/nbio/structure/asa/AsaCalculator.java +++ b/biojava-structure/src/main/java/org/biojava/nbio/structure/asa/AsaCalculator.java @@ -126,16 +126,17 @@ static class IndexAndDistance { * Constructs a new AsaCalculator. Subsequently call {@link #calculateAsas()} * or {@link #getGroupAsas()} to calculate the ASAs * Only non-Hydrogen atoms are considered in the calculation. - * @param structure the structure, all non-H atoms will be used + * @param structure the structure, all non-H atoms of given model number will be used * @param probe the probe size * @param nSpherePoints the number of points to be used in generating the spherical * dot-density, the more points the more accurate (and slower) calculation * @param nThreads the number of parallel threads to use for the calculation * @param hetAtoms if true HET residues are considered, if false they aren't, equivalent to + * @param modelNr the model number from which we want atoms extracted * NACCESS' -h option */ - public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms) { - this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms); + public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms, int modelNr) { + this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms, modelNr); this.atomCoords = Calc.atomsToPoints(atoms); this.probe = probe; this.nThreads = nThreads; @@ -151,6 +152,22 @@ public AsaCalculator(Structure structure, double probe, int nSpherePoints, int n initSpherePoints(nSpherePoints); } + /** + * Constructs a new AsaCalculator. Subsequently call {@link #calculateAsas()} + * or {@link #getGroupAsas()} to calculate the ASAs + * Only non-Hydrogen atoms are considered in the calculation. + * @param structure the structure, all non-H atoms of model 1 will be used + * @param probe the probe size + * @param nSpherePoints the number of points to be used in generating the spherical + * dot-density, the more points the more accurate (and slower) calculation + * @param nThreads the number of parallel threads to use for the calculation + * @param hetAtoms if true HET residues are considered, if false they aren't, equivalent to + * NACCESS' -h option + */ + public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms) { + this(structure, probe, nSpherePoints, nThreads, hetAtoms, 0); + } + /** * Constructs a new AsaCalculator. Subsequently call {@link #calculateAsas()} * or {@link #getGroupAsas()} to calculate the ASAs.