frag_pele/Helpers/find_dihedrals.py
def calculate_cluster_angles(self, dihedral_list):
        """
        Calculate dihedral angles from pdb
        Parameters
        ----------
        pdb_file: str
            Path to the cluster representative conformation
        dihedral_list: list
            List of the tuples containing the atoms that form the dihedrals
        match_indexes: bool
            Whether to use the atom indices from the dihedral list or match to
            the cluster structure before
        """
        rdkit_wrapper = RDKitToolkitWrapper()
        pdb_dihedrals = []
        # use the input molecule as template since the cluster structures
        # probably will not have proper stereochemistry
        mol = molecule.Molecule(self._pdb_file, connectivity_template=self._molecule.rdkit_molecule)
        # we use substructure matching to ensure that the indices in the
        # clusters pdb and the input ligand are the same
        for dihedral in dihedral_list:
            names = [self._topology.atoms[atom].PDB_name for atom in dihedral]
            angle = get_dihedral(mol, *dihedral, units="degrees")
        
            pdb_dihedrals.append(names+[angle])
        self.dihedral_library[self._pdb_file] = pdb_dihedrals

        Calculate dihedral angles from pdb
        Parameters
        ----------
        pdb_file: str
            Path to the cluster representative conformation
        dihedral_list: list
            List of the tuples containing the atoms that form the dihedrals
        match_indexes: bool
            Whether to use the atom indices from the dihedral list or match to
            the cluster structure before
        
Calculate dihedral angles from pdb
Parameters

str
Path to the cluster representative conformation
dihedral_list: list
List of the tuples containing the atoms that form the dihedrals
match_indexes: bool
Whether to use the atom indices from the dihedral list or match to
the cluster structure before
Calculate dihedral angles from pdb Parameters str Path to the cluster representative conformation dihedral_list : list List of the tuples containing the atoms that form the dihedrals match_indexes : bool Whether to use the atom indices from the dihedral list or match to the cluster structure before
def calculate_cluster_angles(self, dihedral_list):
        rdkit_wrapper = RDKitToolkitWrapper()
        pdb_dihedrals = []
        mol = molecule.Molecule(self._pdb_file, connectivity_template=self._molecule.rdkit_molecule)
        for dihedral in dihedral_list:
            names = [self._topology.atoms[atom].PDB_name for atom in dihedral]
            angle = get_dihedral(mol, *dihedral, units="degrees")
            pdb_dihedrals.append(names+[angle])
        self.dihedral_library[self._pdb_file] = pdb_dihedrals
def calculate_cluster_angles ( self , dihedral_list ) : rdkit_wrapper = RDKitToolkitWrapper ( ) pdb_dihedrals = [ ] mol = molecule . Molecule ( self . _pdb_file , connectivity_template = self . _molecule . rdkit_molecule ) for dihedral in dihedral_list : names = [ self . _topology . atoms [ atom ] . PDB_name for atom in dihedral ] angle = get_dihedral ( mol , * dihedral , units = "degrees" ) pdb_dihedrals . append ( names + [ angle ] ) self . dihedral_library [ self . _pdb_file ] = pdb_dihedrals
Calculate dihedral angles from pdb
Parameters
Calculate dihedral angles from pdb Parameters
"""
        Calculate dihedral angles from pdb
        Parameters
        ----------
        pdb_file: str
            Path to the cluster representative conformation
        dihedral_list: list
            List of the tuples containing the atoms that form the dihedrals
        match_indexes: bool
            Whether to use the atom indices from the dihedral list or match to
            the cluster structure before
        """ # use the input molecule as template since the cluster structures # probably will not have proper stereochemistry # we use substructure matching to ensure that the indices in the # clusters pdb and the input ligand are the same
self
dihedral_list