schrodinger.application.glide.grid module¶
Functions for dealing with Glide grid files: reading grids to access their metadata, uncompressing grids, getting receptor structures, checking if all required member files are present, determining the right grid size for a ligand, etc.
- exception schrodinger.application.glide.grid.GlideError¶
Bases:
RuntimeError
Exception class for fatal errors raised by Glide.
- class schrodinger.application.glide.grid.Grid(grid_file)¶
Bases:
object
Class representing the user selected grid file.
- __init__(grid_file)¶
- isValid()¶
Whether the specified grid file is valid.
- schrodinger.application.glide.grid.get_recep_structure_from_grid(gridfile)¶
Return a Structure object given a grid file (may be .grd or .zip)
- schrodinger.application.glide.grid.is_grid_good_for_ligand(gridfile, lig_st) bool ¶
Check whether the ligand structure fits in the outer box of the grid.
- Parameters:
gridfile (str) – Filename of gridfile
lig_st (schrodinger.structure.Structure) – Ligand structure
- schrodinger.application.glide.grid.check_required_gridfiles(gridfile)¶
Check whether all required gridfiles exist for the given uncompressed gridfile
- Parameters:
gridfile (str) – Path to the grid file (.grd)
- schrodinger.application.glide.grid.extract_file_from_grid(grid_file, ext)¶
Extract the file with requested extension form the given grid file archive. Will return None if the requested file is not present in the archive. If the specified grid file is uncompressed, will simply return the file with the same extension in the same location as the grid.
- Parameters:
grid_file (str) – Path to the grid file (.zip or .grd)
ext (str) – Extension of the requested file.
- Return type:
str or None
- Returns:
File path or None
- schrodinger.application.glide.grid.parse_xvol_file(xvol_file)¶
Returns a list of excluded volumes in the specified excluded volumes file.
- Parameters:
xvol_file (str) – Path to the excluded volumes file
- Return type:
List of tuples
- Returns:
Each tuple defines an excluded volume. First item is the name (str), second item is a tuple of XYZ coordinates, third item is a radius (float).
- schrodinger.application.glide.grid.unzip_grids(grid_archive, jobname)¶
Extract the contents of the grid archive to a temporary directory if the subjobs will be running locally.
- Returns:
2-tuple with the path to the temporary directory and the .grd file.
- Return type:
tuple of str
- schrodinger.application.glide.grid.find_grd_file(dirname)¶
Find the
*.grd file
in a directory. There must be one and only one!
- schrodinger.application.glide.grid.calc_ligand_size(st, ligand_atom_indices)¶
Given a list of (x, y, z) coordinates for all atoms in a ligand, calculate the ligand size. This value should be added to the innerbox to get the default outerbox.
- Parameters:
st (structure.Structure) – ligand structure
ligand_atom_indices (ligand atoms, by atom index) – list[int]
- Return type:
float
- Returns:
The size of the ligand.
- schrodinger.application.glide.grid.get_default_box_size(struct, ligand_asl='all')¶
Gets the default box size for a grid. This returns the outer and inner box lengths.
- Parameters:
struct (structure.StructureReader) – The structure containing the reference ligand
ligand_asl (str) – The ASL for the ligand. Default: “all”
- Return type:
tuple of lists, e.g. ([10, 10, 10], [-5.9863, -1.887 , -0.2703])