schrodinger.application.glide.utils module

Glide utility functions.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.glide.utils.is_valid_pv_file(file_name, require_poses=False)[source]

Returns bool indicating if the file appears to be a valid PV file.

This function with throw an exception is the file is not a valid Maestro structure file.

The checks for this are simple, and may not be conclusive. The test is content, and not file-extension based, since there are valid PV or EPV files that lack any indication that they are PV files in the file extension. If you need to check the extension as well see fileutils.is_poseviewer_file.

A PV file has exactly one structure with a true value for b_glide_receptor.

An EPV file has one or more structures with a true value for b_glide_receptor at the beginning of the file. Single-receptor EPV files are therefore considered PV files, but not EPV files with two or more receptors.

Parameters
  • file_name (str) – path to the structure file

  • require_poses (bool) – pv file must contain more than one structure

Returns

bool indicating if the file appears to be a valid PV file

Return type

bool

schrodinger.application.glide.utils.is_valid_epv_file(file_name)[source]

Returns bool indicating if the file appears to be a valid EPV file.

Parameters

file_name (str) – path to the structure file

Returns

bool indicating if the file appears to be a valid EPV file

Return type

bool

schrodinger.application.glide.utils.get_recep_structure_from_grid(gridfile)[source]

Return a Structure object given a grid file (may be .grd or .zip)

schrodinger.application.glide.utils.is_grid_good_for_ligand(gridfile, lig_st) → bool[source]

Check whether the ligand structure fits in the outer box of the grid.

Parameters
schrodinger.application.glide.utils.check_required_gridfiles(gridfile)[source]

Check whether all required gridfiles exist for the given uncompressed gridfile

Parameters

gridfile (str) – Path to the grid file (.grd)

schrodinger.application.glide.utils.extract_file_from_grid(grid_file, ext)[source]

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.utils.parse_xvol_file(xvol_file)[source]

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).