Search in sources :

Example 6 with SelectionException

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());
        }
    }
}
Also used : AminoAcid(de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid) SelectionException(de.bioforscher.jstructure.model.structure.selection.SelectionException)

Aggregations

AminoAcid (de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid)6 SelectionException (de.bioforscher.jstructure.model.structure.selection.SelectionException)6 ArrayList (java.util.ArrayList)2 Atom (de.bioforscher.jstructure.model.structure.Atom)1