use of de.bioforscher.jstructure.model.structure.selection.SelectionException in project jstructure by JonStargaryen.
the class DictionaryOfProteinSecondaryStructure method calculateDihedralAngles.
private void calculateDihedralAngles(List<AminoAcid> residues) {
// Omega: CA-C-N-CA
for (int i = 0; i < residues.size() - 1; i++) {
AminoAcid res1 = residues.get(i);
AminoAcid res2 = residues.get(i + 1);
try {
TorsionAngles torsionAngles = new TorsionAngles(res1, res2);
DSSPSecondaryStructure state1 = getState(res1);
DSSPSecondaryStructure state2 = getState(res2);
state2.setPhi(torsionAngles.getPhi());
state1.setPsi(torsionAngles.getPsi());
state1.setOmega(torsionAngles.getOmega());
} catch (SelectionException e) {
logger.debug(e.getLocalizedMessage());
}
}
}
Aggregations