/** * Returns and array of all non-Hydrogen atoms in the given Structure, * optionally including HET atoms or not. Waters are not included. * * @param s * @param hetAtoms * if true HET atoms are included in array, if false they are not * @return */ public static final Atom[] getAllNonHAtomArray(Structure s, boolean hetAtoms) { AtomIterator iter = new AtomIterator(s); return getAllNonHAtomArray(s, hetAtoms, iter); } /**
/** * Returns and array of all non-Hydrogen atoms in the given Structure, * optionally including HET atoms or not. Waters are not included. * * @param s * @param hetAtoms * if true HET atoms are included in array, if false they are not * @param modelNr Model number to draw atoms from * @return */ public static final Atom[] getAllNonHAtomArray(Structure s, boolean hetAtoms, int modelNr) { AtomIterator iter = new AtomIterator(s,modelNr); return getAllNonHAtomArray(s, hetAtoms, iter); } private static final Atom[] getAllNonHAtomArray(Structure s, boolean hetAtoms, AtomIterator iter) {
Atom[] atoms2 = null; if (atomNames == null) { atoms1 = getAllNonHAtomArray(chain1, hetAtoms); atoms2 = getAllNonHAtomArray(chain2, hetAtoms); } else { atoms1 = getAtomArray(chain1, atomNames);
/** * 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 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 * @see StructureTools#getAllNonHAtomArray */ public AsaCalculator(Structure structure, double probe, int nSpherePoints, int nThreads, boolean hetAtoms) { this.atoms = StructureTools.getAllNonHAtomArray(structure, hetAtoms); this.atomCoords = Calc.atomsToPoints(atoms); this.probe = probe; this.nThreads = nThreads; this.useSpatialHashingForNeighbors = DEFAULT_USE_SPATIAL_HASHING; // initialising the radii by looking them up through AtomRadii radii = new double[atomCoords.length]; for (int i=0;i<atomCoords.length;i++) { radii[i] = getRadius(atoms[i]); } initSpherePoints(nSpherePoints); }
atoms = getAllNonHAtomArray(chain, false); } else { atoms = getAtomArray(chain, atomNames);
Atom[] nonwaters = StructureTools.getAllNonHAtomArray(reduced,true,toModel); if( nonwaters.length < 1 ) return;