Package schrodinger :: Package utils :: Module pymol
[hide private]
[frames] | no frames]

Module pymol

Utilities to load Maestro projects into PyMOL.

Example:

>>> cmd = PymolInstance("/path/to/pymol")
>>> pt = maestro.project_table_get()
>>> process_prj(cmd, pt)

Copyright Schrodinger LLC, All rights reserved.

Author: Thomas Holder

Classes [hide private]
  Mapping
Mappings from Maestro codes to PyMOL representations and settings
  PymolInstance
Represents a remote PyMOL instance (controlled via a one-way pipe)
  PymolScriptInstance
Represents a PyMOL script for deferred execution.
  VisRecord
Represents a surface entry in a "vis_list" file
  VisRecordVol
Represents a volume entry in a "vis_list" file
  RowProxy
Proxy for project table row to attach additional data.
  WorkspaceIdMapper
Maps workspace atom indices to (row.index, ID)
Functions [hide private]
 
select_surf_asl(row, surf_handle, name='')
Make a PyMOL selection for surface ASL.
list
get_measurement_items(key, mmprojadmin)
Get workspace atom ids from the measurements table.
 
process_measurements(cmd, prj_handle)
Send workspace measurements to PyMOL
int
get_font_id(font_name, font_style)
Get the PyMOL label_font_id which best matches the given font name and style.
 
process_highlights(cmd, prj_handle)
Send "highlights" (label+arrow annotation) to PyMOL
 
process_prj(cmd, prj_handle, limit='all', with_surf=True, mimic=True)
Send maestro project to PyMOL.
 
process_hypothesis(cmd, row, mae)
Import Phase pharmacophores as CGOs into PyMOL.
 
process_row(cmd, row, limit_included=False, with_surf=True, mimic=True)
Send a row from the project table to PyMOL.
 
process_surface(cmd, row, e_surf)
Send a surface to PyMOL
bool
send_maestro_settings(cmd)
Map Maestro settings to closest matching PyMOL settings.
Variables [hide private]
  logger = log.get_output_logger("pymol4maestro")
  maestro = schrodinger.get_maestro()
  PREFIX_MAPS = ''
  PREFIX_SURFACES = ''
  PREFIX_MEASUREMENTS = ''
  PREFIX_CALLOUTS = ''
  __package__ = None
hash(x)
Function Details [hide private]

select_surf_asl(row, surf_handle, name='')

 

Make a PyMOL selection for surface ASL.

Returns:
PyMOL selection name

get_measurement_items(key, mmprojadmin)

 

Get workspace atom ids from the measurements table. If not running from Maestro, read the *.tab files from the .mmproj-admin directory.

Parameters:
  • key (str) - one of distance, angle or dihedral
Returns: list
List of lists of atom ids (workspace)

process_measurements(cmd, prj_handle)

 

Send workspace measurements to PyMOL

Parameters:

get_font_id(font_name, font_style)

 

Get the PyMOL label_font_id which best matches the given font name and style.

Parameters:
  • font_style (int)
  • font_name (str)
Returns: int

process_highlights(cmd, prj_handle)

 

Send "highlights" (label+arrow annotation) to PyMOL

Parameters:

process_prj(cmd, prj_handle, limit='all', with_surf=True, mimic=True)

 

Send maestro project to PyMOL. By default send everything, optional filters may apply.

Parameters:
  • cmd (PymolInstance) - PyMOL API proxy
  • prj_handle (schrodinger.project.Project) - project handle
  • limit (str) - all, included or selected. The latter will not send workspace items like measurements and text highlights.
  • with_surf (bool) - send surfaces and maps (volumes)
  • mimic (bool) - use PyMOL settings to match style as close as possible

process_hypothesis(cmd, row, mae)

 

Import Phase pharmacophores as CGOs into PyMOL.

Parameters:

process_row(cmd, row, limit_included=False, with_surf=True, mimic=True)

 

Send a row from the project table to PyMOL.

Parameters:
  • cmd (PymolInstance) - PyMOL API proxy
  • row (schrodinger.project.ProjectRow) - project table row
  • limit_included (bool) - limit surface export to workspace
  • with_surf (bool) - send surfaces
  • mimic (bool) - use PyMOL settings to match style as close as possible

process_surface(cmd, row, e_surf)

 

Send a surface to PyMOL

Parameters:

send_maestro_settings(cmd)

 

Map Maestro settings to closest matching PyMOL settings.

Parameters:
Returns: bool
True on success and False if Maestro is not available