Esempio n. 1
0
    def __init__(self,
                 session,
                 enclose_atoms,
                 show_atoms,
                 probe_radius,
                 grid_spacing,
                 resolution,
                 level,
                 name,
                 color,
                 visible_patches,
                 sharp_boundaries,
                 update=True):

        Surface.__init__(self, name, session)
        self.selection_coupled = enclose_atoms.unique_structures

        self.atoms = enclose_atoms
        self._atom_count = len(
            self.atoms)  # Used to determine when atoms deleted.
        self.show_atoms = show_atoms  # Atoms for surface patch to show
        self.probe_radius = probe_radius  # Only used for solvent excluded surface
        self.grid_spacing = grid_spacing
        self.resolution = resolution  # Only used for Gaussian surface
        self.level = level  # Contour level for Gaussian surface, atomic number units
        self.color = color
        self._atom_patch_colors = None
        self._atom_patch_color_mask = None
        self.visible_patches = visible_patches
        self.sharp_boundaries = sharp_boundaries
        self._joined_triangles = None
        self._refinement_steps = 1  # Used for fixing sharp edge problems near 3 atom junctions.

        self._auto_update_handler = None
        self.auto_update = update

        self._vertex_to_atom = None
        self._vertex_to_atom_count = None  # Used to check if atoms deleted
        self._max_radius = None
        self.clip_cap = True
Esempio n. 2
0
 def __init__(self, session):
     Surface.__init__(self, 'blob outline box', session)
     self.pickable = False