Example #1
0
 /** Sets the probability of observing this cross-link with its SAS distance. */
 public final void setSASDprobability() {
   float preProb = -1;
   TreeSet<Float> sortedBins =
       new TreeSet<Float>(ParameterReader.getSASdistanceProbabilitySet().keySet());
   for (float bin : sortedBins) {
     float prob = ParameterReader.getSASdistanceProbabilitySet().get(bin);
     if (bin > this.solventPathDistance) {
       this.sasdDistProbability = preProb;
       break;
     }
     preProb = prob;
   }
   if (this.sasdDistProbability == -1 && this.solventPathDistance != -1) {
     this.sasdDistProbability = 0;
   }
   this.doProbability = true;
 }
Example #2
0
 /** Sets the probability of observing this cross-link with its Euclidean distance. */
 public final void setEucProbability() {
   float preProb = -1;
   TreeSet<Float> sortedBins =
       new TreeSet<Float>(ParameterReader.getEuclideanDistanceProbabilitySet().keySet());
   for (float bin : sortedBins) {
     float prob = ParameterReader.getEuclideanDistanceProbabilitySet().get(bin);
     if (bin > this.eucDist) {
       this.eucDistProbability = preProb;
       break;
     }
     preProb = prob;
   }
   if (this.eucDistProbability == -1 && this.eucDist != -1) {
     this.eucDistProbability = 0;
   }
   this.doProbability = true;
 }
Example #3
0
 /**
  * Constructor. Reads in the XlogP parameter file and assigns the values to the protein atoms.
  *
  * @param complex Protein complex object holding all amino acids to which atomic XlogP values will
  *     be calculated.
  */
 public Hydrophobicity(final PolyPeptideList complex) {
   //        if (ParameterReader.getXlogPparameterSet() == null) {
   try {
     ParameterReader.setParameterReader(Constants.ParameterSets.XLOGP);
   } catch (IOException e) {
     System.err.print(
         e.getMessage()
             + Constants.LINE_SEPERATOR
             + "ERROR: While reading the XlogP parameter file"
             + Constants.LINE_SEPERATOR);
   }
   //        }
   this.polyPeptideComplex = complex;
   this.setAtomicXlogP();
 }
Example #4
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;
  }