Package schrodinger :: Package application :: Package glide :: Module poseviewconvert
[hide private]
[frames] | no frames]

Module poseviewconvert

Functions for creating or converting pose viewer files.

The module can convert a 'pose viewer' type file into a series of complexes, and convert complexes into ligand-only, receptor-only, or pose viewer files.

For convenience, the main method has a minimal option parser to handle some common usage patterns. However, the details of entry level property copying are not handled by the current command line interface.

Copyright Schrodinger, LLC. All rights reserved.

Classes [hide private]
  Complex
A helper class to split a receptor-ligand complex structure into ligand, and receptor structure components, and write the structure components to new files.
Functions [hide private]
 
get_parser()
Returns a SingleDashOptionParser configured for this module's command line use.
 
is_pv_file(file_name, max_ligand_atoms=MAX_LIGAND_ATOMS, test_all=True, test_recep_atom_count=True, test_ligand_atom_count=True, test_recep_gscore=True, test_ligand_gscore=True)
Returns a True if the file appears to be a pose view format file.
 
merge_pv_file(in_file, out_file, ligand_last=True, copy_props=True, check_count=False, radius=None, title_sep=":")
Creates a file of receptor-ligand complex structures from a pose view format file.
 
pv2complex(in_file, out_file, ligand_last=True, copy_props=True, merge_pv_radius=None)
Alias for merge_pv_file()
 
main(version=None)
A convenience command-line interface function that takes file names from the command line and writes pv format files or splits depending on flags.
Variables [hide private]
  _version = "$Revision: 1.11 $"
  logger = log.get_output_logger(__file__)
Function Details [hide private]

get_parser()

 

Returns a SingleDashOptionParser configured for this module's command line use.

Note, this parser is provided as a convenience for internal development and testing. The scriptcenter's pv_convert.py has the preferred customer facing command-line parser, which includes additional IO options.

is_pv_file(file_name, max_ligand_atoms=MAX_LIGAND_ATOMS, test_all=True, test_recep_atom_count=True, test_ligand_atom_count=True, test_recep_gscore=True, test_ligand_gscore=True)

 

Returns a True if the file appears to be a pose view format file. The tests are simple, and may not be conclusive. It is assumed that the trivial test for a 'pv.mae' extension has already been performed.

Specific tests can be skipped by setting the test_recep_atom_count, test_recep_gscore, test_ligand_atom_count, and test_ligand_gscore booleans.

Parameters:
  • max_ligand_atoms (int) - The maximum size in atoms of a putative ligand, and minimum size of the receptor. The default is the package constant schrodinger.application.glide.MAX_LIGAND_ATOMS.
  • test_all (bool) - Perform all tests, regardless of other test_* booleans. Default = True.
  • test_recep_atom_count (bool) - Receptor must have more than max_ligand_atoms. Default = True.
  • test_ligand_atom_count (bool) - Ligand must have less than or equal to max_ligand_atoms. Default = True.
  • test_recep_gscore (bool) - Receptor must not have 'r_i_glide_gscore' property. Default = True.
  • test_ligand_gscore (bool) - Ligand must have 'r_i_glide_gscore' property. Default = True.

merge_pv_file(in_file, out_file, ligand_last=True, copy_props=True, check_count=False, radius=None, title_sep=":")

 

Creates a file of receptor-ligand complex structures from a pose view format file.

Parameters:
  • in_file (str) - Name of the pv format file.
  • out_file (str) - Name of receptor-ligand complex file to write.
  • ligand_last (bool) - Create complex so ligand is the last molecule if True, the first if False.
  • copy_props (bool) - Transfer entry level properties to complex.
  • check_count (bool) - Count input and output structure, make sure the correct number of complexes is written. This can be time consuming for large files. Default False.
  • radius (float) - Include only receptor residues within this cutoff, in angstroms, from the ligand.
  • title_sep (str) - separator of the receptor and ligand titles in the new title for the merged complex <rec_title><title_sep><lig_title>. Default is ":".
Raises:
  • IOError - If in_file can't be found.
  • RuntimeError - If the wrong number of complexes is produced.

main(version=None)

 

A convenience command-line interface function that takes file names from the command line and writes pv format files or splits depending on flags. If a version string isn't passed in, this module's '_version' string is used by the parser.