Enumerating torsion (dihedral) angles

Member Site Forums PyRosetta PyRosetta – General Enumerating torsion (dihedral) angles

Viewing 2 reply threads
  • Author
    Posts
    • #2020
      Anonymous

        Is it perhaps possible to get a list of all torsion angles in the pose? I’m using the pyrosetta with the CHARMM force filed to do some monte-carlo simulations of spin-label rotamers. This works very well, except that it turns out I need to apply the CMAP correction as well. This correction is basically a 24×24 lookup table for the energy between two dihedral angles.
        Parsing and loading the CMAP from the parameter file is (almost) trivial in python. But now I have to map the mm_atom_name(s) to the correct two torsions.
        For example I have to map
        CEL1 CEL1 CTL2 SM CEL1 CTL2 SM SM to all pairs of torsion angles that have these mm_atom_types.

        Thank you for your help,
        Ajasja

      • #10383
        Anonymous

          Since graphs are such an integral part of Rosseta (at least according to dr. Andrew Leaver-Fay). Perhaps finding all consecutive torsion angles can be solved as finding all 5-connected segments in the AtomTree Graph? But iterating over graphs in PyRosetta is problematic, since the C++ iterators don’t work in python…

        • #10391
          Anonymous

            Are you looking for *all* the torsion angles, or just the (independently, meaningfully) rotatable ones?

            If it’s the latter, your best bet is to iterate through the residues and get the chi_atoms() from the ResidueType. This will tell you all the sidechain degrees of freedom. You’d have to add on backbone torsions like phi/psi/omega for amino acids, though. This won’t get you “redundant” torsions – there’s only one torsion on the CA-CB bond in threonine, for example, as the methyl group is placed once the oxygen is. It also won’t get you ring torsions on tryptophan and phenylalanine, or torsions to the hydrogens on a methyl group, as rotation in those contexts doesn’t really have any meaning for Rosetta.

            For a more expansive set of torsions, take a look at the ndihe(), dihedral() and dihedrals_for_atom() and print_dihedrals() functions on ResidueType – this is what the MM energy terms in Rosetta use to get the dihedral atoms. As I read the code, this should be pretty exhaustive of all bond-connected dihedrals for within a residue.

            This won’t give you dihedrals that cross a residue boundary, though. For that you’d want to use connections_to_residue() on Residue to determine the connection ID between the two residues, rsd.residue_connection( id ).atomno() to find the direct atom connections, and atoms_within_one_bond_of_a_residue_connection() and atoms_within_two_bonds_of_a_residue_connection() on ResidueType to find all the adjacent atoms. On from there it’s enumeration to find all the relevant torsions. (If you can read C++ and have access to the Rosetta/PyRosetta source code, you can take a look at main/source/src/core/scoring/methods/MMTorsionEnergy.cc for examples.)

            Enumerating over the AtomTree won’t help you, at least for the extensive connections, as the AtomTree is a tree, and some of the bonds (like ring bonds) are cut to get the tree behavior. Also, some of the edges in the AtomTree may be non-bonded “jump” edges, even for proteins which don’t have any rings. (If the AtomTree or FoldTree has been re-arranges, e.g. for loop remodeling.)

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.