@@ -126,7 +126,37 @@ static class IndexAndDistance {
126126 * Constructs a new AsaCalculator. Subsequently call {@link #calculateAsas()}
127127 * or {@link #getGroupAsas()} to calculate the ASAs
128128 * Only non-Hydrogen atoms are considered in the calculation.
129- * @param structure the structure, all non-H atoms will be used
129+ * @param structure the structure, all non-H atoms of given model number will be used
130+ * @param probe the probe size
131+ * @param nSpherePoints the number of points to be used in generating the spherical
132+ * dot-density, the more points the more accurate (and slower) calculation
133+ * @param nThreads the number of parallel threads to use for the calculation
134+ * @param hetAtoms if true HET residues are considered, if false they aren't, equivalent to
135+ * @param modelNr the model number from which we want atoms extracted
136+ * NACCESS' -h option
137+ */
138+ public AsaCalculator (Structure structure , double probe , int nSpherePoints , int nThreads , boolean hetAtoms , int modelNr ) {
139+ this .atoms = StructureTools .getAllNonHAtomArray (structure , hetAtoms , modelNr );
140+ this .atomCoords = Calc .atomsToPoints (atoms );
141+ this .probe = probe ;
142+ this .nThreads = nThreads ;
143+
144+ this .useSpatialHashingForNeighbors = DEFAULT_USE_SPATIAL_HASHING ;
145+
146+ // initialising the radii by looking them up through AtomRadii
147+ radii = new double [atomCoords .length ];
148+ for (int i =0 ;i <atomCoords .length ;i ++) {
149+ radii [i ] = getRadius (atoms [i ]);
150+ }
151+
152+ initSpherePoints (nSpherePoints );
153+ }
154+
155+ /**
156+ * Constructs a new AsaCalculator. Subsequently call {@link #calculateAsas()}
157+ * or {@link #getGroupAsas()} to calculate the ASAs
158+ * Only non-Hydrogen atoms are considered in the calculation.
159+ * @param structure the structure, all non-H atoms of model 1 will be used
130160 * @param probe the probe size
131161 * @param nSpherePoints the number of points to be used in generating the spherical
132162 * dot-density, the more points the more accurate (and slower) calculation
@@ -135,7 +165,7 @@ static class IndexAndDistance {
135165 * NACCESS' -h option
136166 */
137167 public AsaCalculator (Structure structure , double probe , int nSpherePoints , int nThreads , boolean hetAtoms ) {
138- this .atoms = StructureTools .getAllNonHAtomArray (structure , hetAtoms );
168+ this .atoms = StructureTools .getAllNonHAtomArray (structure , hetAtoms , 1 );
139169 this .atomCoords = Calc .atomsToPoints (atoms );
140170 this .probe = probe ;
141171 this .nThreads = nThreads ;
0 commit comments