예제 #1
0
  /**
   * Sets to all amino acids atoms in a protein their associated XlogP values.
   *
   * @return float value representing the sum of XlogP values for the protein complex.
   */
  private float setAtomicXlogP() {

    Hashtable<AminoAcidType, Hashtable<AtomType, Float>> xlogPs =
        ParameterReader.getXlogPparameterSet();
    float sum = 0;
    for (PolyPeptide polyPeptide : this.polyPeptideComplex) {
      for (AminoAcid aa : polyPeptide) {
        for (Atom atom : aa.getAllAtoms()) {
          if (!atom.getElement().getSymbol().equals("H")) {
            Hashtable<AtomType, Float> atomicXlogPs = xlogPs.get(aa.getType());
            float xlogP = atomicXlogPs.get(atom.getType());
            atom.setXlogP(xlogP);
            sum += xlogP;
          } else {
            // hydrogen atoms have always a XlogP value of 0.
            atom.setXlogP(0);
          }
        }
      }
    }
    return sum;
  }