Search in sources :

Example 1 with TorsionAngles

use of de.bioforscher.jstructure.mathematics.TorsionAngles in project jstructure by JonStargaryen.

the class SecondaryStructureAnnotator 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);
        TorsionAngles torsionAngles = new TorsionAngles(res1, res2);
        SecondaryStructure state1 = getState(res1);
        SecondaryStructure state2 = getState(res2);
        state2.setPhi(torsionAngles.getPhi());
        state1.setPsi(torsionAngles.getPsi());
        state1.setOmega(torsionAngles.getOmega());
    }
}
Also used : AminoAcid(de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid) TorsionAngles(de.bioforscher.jstructure.mathematics.TorsionAngles)

Aggregations

TorsionAngles (de.bioforscher.jstructure.mathematics.TorsionAngles)1 AminoAcid (de.bioforscher.jstructure.model.structure.aminoacid.AminoAcid)1