예제 #1
0
 def __init__(self,
              pdb_hierarchy,
              geometry_restraints,
              use_ideal_bonds_angles=True):
     self.cs = geometry_restraints.crystal_symmetry
     self.pdb_hierarchy = pdb_hierarchy
     self.connectivity_manager = connectivity.determine_connectivity(
         pdb_hierarchy=self.pdb_hierarchy,
         geometry_restraints=geometry_restraints)
     self.h_connectivity = self.connectivity_manager.h_connectivity
     self.double_H = self.connectivity_manager.double_H
     self.connectivity_slipped = self.connectivity_manager.connectivity_slipped
     self.parameterization_manager = parameterization.manager(
         h_connectivity=self.h_connectivity,
         sites_cart=self.pdb_hierarchy.atoms().extract_xyz(),
         use_ideal_bonds_angles=use_ideal_bonds_angles)
     self.h_parameterization = \
       self.parameterization_manager.determine_parameterization()
     self.parameterization_cpp = []
     for hp in self.h_parameterization:
         if (hp is not None):
             self.parameterization_cpp.append(hp)
     self.hd_selection = self.pdb_hierarchy.atom_selection_cache().\
       selection("element H or element D")
     self.not_hd_selection = ~self.hd_selection
예제 #2
0
 def __init__(self,
              pdb_hierarchy,
              geometry_restraints,
              use_ideal_bonds_angles=True,
              process_manager=True):
     self.pdb_hierarchy = pdb_hierarchy
     self.geometry_restraints = geometry_restraints
     self.use_ideal_bonds_angles = use_ideal_bonds_angles
     #
     self.hd_selection = self.pdb_hierarchy.atom_selection_cache().\
       selection("element H or element D")
     self.not_hd_selection = ~self.hd_selection
     self.h_parameterization = []
     self.parameterization_cpp = []
     if process_manager is True:
         connectivity_manager = connectivity.determine_connectivity(
             pdb_hierarchy=self.pdb_hierarchy,
             geometry_restraints=geometry_restraints)
         h_connectivity = connectivity_manager.h_connectivity
         diagnostics_connectivity = connectivity_manager.get_diagnostics()
         parameterization_manager = parameterization.manager(
             h_connectivity=h_connectivity,
             sites_cart=self.pdb_hierarchy.atoms().extract_xyz(),
             use_ideal_bonds_angles=use_ideal_bonds_angles)
         self.h_parameterization = parameterization_manager.h_parameterization
         self.parameterization_cpp = self.get_parameterization_cpp(
             h_parameterization=self.h_parameterization)
예제 #3
0
 def __init__(self,
              pdb_hierarchy,
              geometry_restraints,
              use_ideal_bonds_angles=True,
              process_manager=True,
              use_ideal_dihedral=False,
              ignore_h_with_dof=False):
     self.pdb_hierarchy = pdb_hierarchy
     self.geometry_restraints = geometry_restraints
     self.use_ideal_bonds_angles = use_ideal_bonds_angles
     self.ignore_h_with_dof = ignore_h_with_dof
     #
     self.hd_selection = self.pdb_hierarchy.atom_selection_cache().\
       selection("element H or element D")
     self.not_hd_selection = ~self.hd_selection
     self.h_parameterization = []
     self.parameterization_cpp = []
     if process_manager is True:
         connectivity_manager = connectivity.determine_connectivity(
             pdb_hierarchy=self.pdb_hierarchy,
             geometry_restraints=geometry_restraints)
         h_connectivity = connectivity_manager.h_connectivity
         diagnostics_connectivity = connectivity_manager.get_diagnostics()
         parameterization_manager = parameterization.manager(
             h_connectivity=h_connectivity,
             sites_cart=self.pdb_hierarchy.atoms().extract_xyz(),
             use_ideal_bonds_angles=use_ideal_bonds_angles,
             site_labels=[
                 atom.id_str().replace('pdb=', '').replace('"', '')
                 for atom in pdb_hierarchy.atoms()
             ],
             use_ideal_dihedral=use_ideal_dihedral,
             ignore_h_with_dof=self.ignore_h_with_dof)
         self.h_parameterization = parameterization_manager.h_parameterization
         self.parameterization_cpp = self.get_parameterization_cpp(
             h_parameterization=self.h_parameterization)