Example #1
0
  /**
   * Maps the hydrophobicity property of the protein on a list of atom. Note, that only atoms within
   * mm.constants.Constants.PHYSICOCHEMICAL_INFLUENCE_RADIUS will be included in the potential
   * calculation.
   *
   * @param sampleAtoms List of atoms on which potential will be calculated.
   */
  public final void mapHydrophobicity(final AtomList sampleAtoms) {

    float max = mm.constants.Constants.PHYSICOCHEMICAL_INFLUENCE_RADIUS;

    for (Atom sampleAtom : sampleAtoms) {
      for (Atom atom : this.polyPeptideComplex.getAllAtoms()) {
        float dist = Mathematics.distance(atom.getXYZ(), sampleAtom.getXYZ());
        if (dist <= max) {
          float h = atom.getXlogP();
          double s = Mathematics.sigmoidFunction(dist, max);
          sampleAtom.setHes((float) (sampleAtom.getHes() + (h * s)));
        }
      }
    }
  }