bis_protein_structure.TORSION2.get_torsion¶
- bis_protein_structure.TORSION2.get_torsion(atom_mask, atom_pos, residues, as_tensor=False)[source]¶
Computes the torsion angles for a set of residues.
- Parameters:
atom_mask (np.ndarray) – An array indicating which atoms have valid coordinates.
atom_pos (np.ndarray) – An array containing the coordinates of the atoms.
residues (dict) – A dictionary mapping residue IDs to residue names.
as_tensor (bool, optional) – If True, returns the angles and masks as PyTorch tensors (default is False).
- Returns:
tor_masks (np.ndarray) – A boolean array of shape (n_residues, 7) indicating valid torsion angles.
tor_angles (np.ndarray) – An array of shape (n_residues, 7) containing the torsion angle values.