schrodinger.application.desmond.fep_scholar_util module

This file contains common utility methods and classes used in several FEP scripts.

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.application.desmond.fep_scholar_util.DECREMENT(x)
schrodinger.application.desmond.fep_scholar_util.get_chmmol_bonds_from_atoms(chmmol, atoms)

This function returns a list of bonds that connect atoms in a given list.

Parameters:
  • chmmol (canvas.ChmMol) – molecule structure
  • atoms (list) – list of atom indices
schrodinger.application.desmond.fep_scholar_util.get_mutation_atoms_and_bonds(cmol, match, mut_atoms)

This function determines lists of atoms and bonds that should be highlighted to show mutations.

Parameters:
  • cmol (canvas2d.ChmMol) – Canvas ChmMol
  • match (list) – list of core atoms
  • mut_atoms (list) – list of ‘mutated’ atoms
Returns:

tuple that contains list of atoms and list of bonds

Return type:

tuple

schrodinger.application.desmond.fep_scholar_util.generate_default_pic(ligand1, ligand2)

Create default picture of two ligands, which only shows ligand structures and no mapping.

Parameters:
  • ligand1 (fep_scholar_util.FEPStructureObject) – first ligand FEP structure object
  • ligand2 (fep_scholar_util.FEPStructureObject) – second ligand FEP structure object
schrodinger.application.desmond.fep_scholar_util.generate_mutation_pic(mapper, ligand1, ligand2)

Create mutations on ligand structures.

Parameters:
  • mapper (fep_scholar_util.FEPScholarMapper) – FEP scholar mapper object
  • ligand1 (fep_scholar_util.FEPStructureObject) – first ligand FEP structure object
  • ligand2 (fep_scholar_util.FEPStructureObject) – second ligand FEP structure object
schrodinger.application.desmond.fep_scholar_util.generate_mapping_pic(mapper, ligand1, ligand2)

Create atom mapping by displaying atom indices on ligand structures. For the second ligand we display corresponding atom indices from the first ligand.

Parameters:
  • mapper (fep_scholar_util.FEPScholarMapper) – FEP scholar mapper object
  • ligand1 (fep_scholar_util.FEPStructureObject) – first ligand FEP structure object
  • ligand2 (fep_scholar_util.FEPStructureObject) – second ligand FEP structure object
schrodinger.application.desmond.fep_scholar_util.generate_core_pic(mapper, ligand1, ligand2)

Highlight core atoms and bonds in ligand structures.

Parameters:
  • mapper (fep_scholar_util.FEPScholarMapper) – FEP scholar mapper object
  • ligand1 (fep_scholar_util.FEPStructureObject) – first ligand FEP structure object
  • ligand2 (fep_scholar_util.FEPStructureObject) – second ligand FEP structure object
schrodinger.application.desmond.fep_scholar_util.generate_hot_atoms_pic(mapper, ligand1, ligand2)

Show ‘hot’ atoms on ligand structures.

Parameters:
  • mapper (fep_scholar_util.FEPScholarMapper) – FEP scholar mapper object
  • ligand1 (fep_scholar_util.FEPStructureObject) – first ligand FEP structure object
  • ligand2 (fep_scholar_util.FEPStructureObject) – second ligand FEP structure object
class schrodinger.application.desmond.fep_scholar_util.MappingAnnotator(matches, map_to=None)

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

This annotator allows to show atom numbers for a selected subset of atoms. In addition user can specify ‘map to’ list of atom numbers that will be used instead to as atom labels.

__init__(matches, map_to=None)

Instantiate a MappingAnnotator instance.

Parameters:
  • matches (list) – list of atoms for which atom labels will be shown.
  • map_to (list) – list of atom numbers that will be used as atom labels. Atom indices in this list are zero-based.
annotate(view, dm)

Add atom number to each atom

Parameters:
  • view (Chemview) – the View this item goes in
  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics
class schrodinger.application.desmond.fep_scholar_util.MetaAtom(atom)

Bases: object

This is the meta atom class that mostly provides convinience functions. It is used by the scholar mapper functions.

__init__(atom)

Initialize self. See help(type(self)) for accurate signature.

index
atom_type

Return macromodel atom type.

xyz
connected_atoms

Return a list of atoms that are bonded to this atom.

class schrodinger.application.desmond.fep_scholar_util.FEPScholarMapper(st1, st2, dist=0.4, match1=None, match2=None, core_hop=False)

Bases: object

This is a mapper class used by FEP Scholar GUI so that we don’t need to use Canvas MCS for matching molecule atoms.

__init__(st1, st2, dist=0.4, match1=None, match2=None, core_hop=False)

Class initializer, which takes two molecule structures that need to be matched. If optional core atom matches for two molecules are provided (match1 and match2) this data would be used to match two molecules instead.

Parameters:
  • st1 (structure.Structure) – first structure
  • st2 (structure.Structure) – second structure
  • dist (float) – distance cutoff
  • match1 (list) – list of core atom indices for first structure
  • match2 (list) – list of core atom indices for second structure
createMap()

This function should be called when this class is initialized. It determines atom mapping between two structures. Mapping information is stored as various properties in structure objects.

getMatches()

This function returns tuple that contains lists of ‘core’ atom indices for both structures. For the second ligand list of atom matches is reordered to reference the list of matches for the first ligand.

Returns:tuple that contains two lists of core atoms
Return type:tuple
getMutations()

This function finds mutated atoms for two ligand structures. Atoms in two ligands are defined as ‘mutated’ if they are defined as ‘core’ atoms, but don’t have same atomic numbers.

Returns:tuple that contains lists of ‘mutated’ atoms for two ligands
Return type:tuple
getHotAtoms()

This function returns lists of ‘hot’ atoms for two ligands.

Returns:tuple that contains lists of ‘hot’ atoms.
Return type:tuple
getStructures()

This function returns structure.Structure objects for two ligands. Note that these structures are different(!) from the ones used to initialize this class. There contain special fep mapping properties.

Returns:modified structures for two ligands
Return type:tuple
getCoreRmsd()

This function calculates RMSD for core atoms in two ligands.

Returns:core RMSD
Return type:float
get_carat_map(st)
clear_atom_props(st)
get_dist(xyz1, xyz2)
get_atom_key(atom)
get_coords_dict(st)

This function creates so-called coordinates dictionary for each atom in a structure. Here key is the text string based on atom coordinates and value is atom’s MetaAtom object.

Returns:‘coordinates dictionary’
Return type:dict
del_from_carat(idx)
set_match_atom(atom, matched_atom_index)
match_by_cartesian_coordinates(st_new)
match_by_distance(st_new, distance)
get_core_map(st_new)
remove_unconn_core_atoms(st_new)
match_core_hydrogens(st_new)
get_fep_mapping(st)
class schrodinger.application.desmond.fep_scholar_util.ScholarStructureItem(rect=None)

Bases: schrodinger.ui.qt.structure2d.structure_item

This class adds new function to the base structure_item class that allows to show some atoms and bonds with highlighting.

generatePictureHighlight(atoms, bonds, color, gen_coord)

Generates a QPicture of the structure. This should be called after setting the structure and the accompaning annotators.

Parameters:
  • atoms (list) – list atom indices that should be highlighted.
  • bonds (list) – list of bond indices that should be highlighted
  • color (QtGui.QColor) – highlighting color
  • gen_coord (bool) – argument indicating whether molecule coordinates should be generated.
class CacheMode

Bases: int

__init__

Initialize self. See help(type(self)) for accurate signature.

bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

from_bytes(bytes, byteorder, *, signed=False) → int

Return the integer represented by the given array of bytes.

The bytes argument must be a bytes-like object (e.g. bytes or bytearray).

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument indicates whether two’s complement is used to represent the integer.

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

to_bytes(length, byteorder, *, signed=False) → bytes

Return an array of bytes representing an integer.

The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

DeviceCoordinateCache = 2
class GraphicsItemChange

Bases: int

__init__

Initialize self. See help(type(self)) for accurate signature.

bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

from_bytes(bytes, byteorder, *, signed=False) → int

Return the integer represented by the given array of bytes.

The bytes argument must be a bytes-like object (e.g. bytes or bytearray).

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument indicates whether two’s complement is used to represent the integer.

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

to_bytes(length, byteorder, *, signed=False) → bytes

Return an array of bytes representing an integer.

The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

class GraphicsItemFlag

Bases: int

__init__

Initialize self. See help(type(self)) for accurate signature.

bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

from_bytes(bytes, byteorder, *, signed=False) → int

Return the integer represented by the given array of bytes.

The bytes argument must be a bytes-like object (e.g. bytes or bytearray).

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument indicates whether two’s complement is used to represent the integer.

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

to_bytes(length, byteorder, *, signed=False) → bytes

Return an array of bytes representing an integer.

The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

class GraphicsItemFlags

Bases: sip.simplewrapper

QGraphicsItem.GraphicsItemFlags(Union[QGraphicsItem.GraphicsItemFlags, QGraphicsItem.GraphicsItemFlag]) QGraphicsItem.GraphicsItemFlags(QGraphicsItem.GraphicsItemFlags)

__init__

Initialize self. See help(type(self)) for accurate signature.

ItemAcceptsInputMethod = 4096
ItemChildAddedChange = 6
ItemChildRemovedChange = 7
ItemClipsChildrenToShape = 16
ItemClipsToShape = 8
ItemContainsChildrenInShape = 524288
ItemCoordinateCache = 1
ItemCursorChange = 17
ItemCursorHasChanged = 18
ItemDoesntPropagateOpacityToChildren = 128
ItemEnabledChange = 3
ItemEnabledHasChanged = 13
ItemFlagsChange = 21
ItemFlagsHaveChanged = 22
ItemHasNoContents = 1024
ItemIgnoresParentOpacity = 64
ItemIgnoresTransformations = 32
ItemIsFocusable = 4
ItemIsMovable = 1
ItemIsPanel = 16384
ItemIsSelectable = 2
ItemMatrixChange = 1
ItemNegativeZStacksBehindParent = 8192
ItemOpacityChange = 25
ItemOpacityHasChanged = 26
ItemParentChange = 5
ItemParentHasChanged = 15
ItemPositionChange = 0
ItemPositionHasChanged = 9
ItemRotationChange = 28
ItemRotationHasChanged = 29
ItemScaleChange = 30
ItemScaleHasChanged = 31
ItemSceneChange = 11
ItemSceneHasChanged = 16
ItemScenePositionHasChanged = 27
ItemSelectedChange = 4
ItemSelectedHasChanged = 14
ItemSendsGeometryChanges = 2048
ItemSendsScenePositionChanges = 65536
ItemStacksBehindParent = 256
ItemToolTipChange = 19
ItemToolTipHasChanged = 20
ItemTransformChange = 8
ItemTransformHasChanged = 10
ItemTransformOriginPointChange = 32
ItemTransformOriginPointHasChanged = 33
ItemUsesExtendedStyleOption = 512
ItemVisibleChange = 2
ItemVisibleHasChanged = 12
ItemZValueChange = 23
ItemZValueHasChanged = 24
NoCache = 0
NonModal = 0
PanelModal = 1
class PanelModality

Bases: int

__init__

Initialize self. See help(type(self)) for accurate signature.

bit_length() → int

Number of bits necessary to represent self in binary. >>> bin(37) ‘0b100101’ >>> (37).bit_length() 6

conjugate()

Returns self, the complex conjugate of any int.

denominator

the denominator of a rational number in lowest terms

from_bytes(bytes, byteorder, *, signed=False) → int

Return the integer represented by the given array of bytes.

The bytes argument must be a bytes-like object (e.g. bytes or bytearray).

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument indicates whether two’s complement is used to represent the integer.

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

real

the real part of a complex number

to_bytes(length, byteorder, *, signed=False) → bytes

Return an array of bytes representing an integer.

The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes.

The byteorder argument determines the byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

The signed keyword-only argument determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

SceneModal = 2
Type = 1
UserType = 65536
__init__(rect=None)
Parameters:rect (QRectF) – Size of the rect of the bounding box.
acceptDrops(self) → bool
acceptHoverEvents(self) → bool
acceptTouchEvents(self) → bool
acceptedMouseButtons(self) → Qt.MouseButtons
add_annotator(annotator)

Adds annotator to stack. The order that these functions get added is the order that they will be applied to the picture.

Parameters:annotator (schrodinger.infra.canvas2d.ChemViewAnnotator) – Annotator which draws on top an image
add_annotator_function_return(function)

Add functions that need to get returned after the structure is rendered on the screen. An example of this would be a function that returns drawmol coordinates.

advance(self, int)
boundingRect(self) → QRectF
boundingRegion(self, QTransform) → QRegion
boundingRegionGranularity(self) → float
cacheMode(self) → QGraphicsItem.CacheMode
childItems(self) → List[QGraphicsItem]
childrenBoundingRect(self) → QRectF
clear()

Clear picture from item.

clearFocus(self)
clear_annotators()

Clears all annotators

clipPath(self) → QPainterPath
collidesWithItem(self, QGraphicsItem, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) → bool
collidesWithPath(self, QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) → bool
collidingItems(self, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) → object
commonAncestorItem(self, QGraphicsItem) → QGraphicsItem
contains(self, Union[QPointF, QPoint]) → bool
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
cursor(self) → QCursor
data(self, int) → Any
deviceTransform(self, QTransform) → QTransform
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
effectiveOpacity(self) → float
ensureVisible(self, rect: QRectF = QRectF(), xMargin: int = 50, yMargin: int = 50)

ensureVisible(self, float, float, float, float, xMargin: int = 50, yMargin: int = 50)

filtersChildEvents(self) → bool
flags(self) → QGraphicsItem.GraphicsItemFlags
focusInEvent(self, QFocusEvent)
focusItem(self) → QGraphicsItem
focusOutEvent(self, QFocusEvent)
focusProxy(self) → QGraphicsItem
generate_picture(gen_coord=True)

Generates a QPicture of the structure. This should be called after setting the structure and the accompaning annotators.

Parameters:gen_coord (bool) – if True generate coordinates.
getBondAtLocation(pos)

Return the bond at the specified coordinates

Parameters:pos (PyQt5.QtCore.QPoint) – The specified coordinates
Returns:If there is a bond at the specified coordinates, return a list of the chmmol atom indices for the two bound atoms. (Note that the chmmol atom indices are zero-indexed, so you should add one to each index if you want the schrodinger.structure.Structure atom indices). If there is no bond at the specified coordinates, return an empty list.
Return type:list
grabKeyboard(self)
grabMouse(self)
graphicsEffect(self) → QGraphicsEffect
group(self) → QGraphicsItemGroup
hasCursor(self) → bool
hasFocus(self) → bool
hide(self)
hoverEnterEvent(self, QGraphicsSceneHoverEvent)
hoverLeaveEvent(self, QGraphicsSceneHoverEvent)
hoverMoveEvent(self, QGraphicsSceneHoverEvent)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) → Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) → Any
installSceneEventFilter(self, QGraphicsItem)
isActive(self) → bool
isAncestorOf(self, QGraphicsItem) → bool
isBlockedByModalPanel(self) → Tuple[bool, QGraphicsItem]
isClipped(self) → bool
isEnabled(self) → bool
isObscured(self, rect: QRectF = QRectF()) → bool

isObscured(self, float, float, float, float) -> bool

isObscuredBy(self, QGraphicsItem) → bool
isPanel(self) → bool
isSelected(self) → bool
isUnderMouse(self) → bool
isVisible(self) → bool
isVisibleTo(self, QGraphicsItem) → bool
isWidget(self) → bool
isWindow(self) → bool
itemChange(self, QGraphicsItem.GraphicsItemChange, Any) → Any
itemTransform(self, QGraphicsItem) → Tuple[QTransform, bool]
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mapFromItem(self, QGraphicsItem, Union[QPointF, QPoint]) → QPointF

mapFromItem(self, QGraphicsItem, QRectF) -> QPolygonF mapFromItem(self, QGraphicsItem, QPolygonF) -> QPolygonF mapFromItem(self, QGraphicsItem, QPainterPath) -> QPainterPath mapFromItem(self, QGraphicsItem, float, float) -> QPointF mapFromItem(self, QGraphicsItem, float, float, float, float) -> QPolygonF

mapFromParent(self, Union[QPointF, QPoint]) → QPointF

mapFromParent(self, QRectF) -> QPolygonF mapFromParent(self, QPolygonF) -> QPolygonF mapFromParent(self, QPainterPath) -> QPainterPath mapFromParent(self, float, float) -> QPointF mapFromParent(self, float, float, float, float) -> QPolygonF

mapFromScene(self, Union[QPointF, QPoint]) → QPointF

mapFromScene(self, QRectF) -> QPolygonF mapFromScene(self, QPolygonF) -> QPolygonF mapFromScene(self, QPainterPath) -> QPainterPath mapFromScene(self, float, float) -> QPointF mapFromScene(self, float, float, float, float) -> QPolygonF

mapRectFromItem(self, QGraphicsItem, QRectF) → QRectF

mapRectFromItem(self, QGraphicsItem, float, float, float, float) -> QRectF

mapRectFromParent(self, QRectF) → QRectF

mapRectFromParent(self, float, float, float, float) -> QRectF

mapRectFromScene(self, QRectF) → QRectF

mapRectFromScene(self, float, float, float, float) -> QRectF

mapRectToItem(self, QGraphicsItem, QRectF) → QRectF

mapRectToItem(self, QGraphicsItem, float, float, float, float) -> QRectF

mapRectToParent(self, QRectF) → QRectF

mapRectToParent(self, float, float, float, float) -> QRectF

mapRectToScene(self, QRectF) → QRectF

mapRectToScene(self, float, float, float, float) -> QRectF

mapToItem(self, QGraphicsItem, Union[QPointF, QPoint]) → QPointF

mapToItem(self, QGraphicsItem, QRectF) -> QPolygonF mapToItem(self, QGraphicsItem, QPolygonF) -> QPolygonF mapToItem(self, QGraphicsItem, QPainterPath) -> QPainterPath mapToItem(self, QGraphicsItem, float, float) -> QPointF mapToItem(self, QGraphicsItem, float, float, float, float) -> QPolygonF

mapToParent(self, Union[QPointF, QPoint]) → QPointF

mapToParent(self, QRectF) -> QPolygonF mapToParent(self, QPolygonF) -> QPolygonF mapToParent(self, QPainterPath) -> QPainterPath mapToParent(self, float, float) -> QPointF mapToParent(self, float, float, float, float) -> QPolygonF

mapToScene(self, Union[QPointF, QPoint]) → QPointF

mapToScene(self, QRectF) -> QPolygonF mapToScene(self, QPolygonF) -> QPolygonF mapToScene(self, QPainterPath) -> QPainterPath mapToScene(self, float, float) -> QPointF mapToScene(self, float, float, float, float) -> QPolygonF

mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(event)

Emit a signal if the user left-clicked on an atom or a bond

mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
moveBy(self, float, float)
opacity(self) → float
opaqueArea(self) → QPainterPath
paint(painter, option, widget=0)

Overrides the paint function to draw the picture that has already been generated. This should never be called manually.

panel(self) → QGraphicsItem
panelModality(self) → QGraphicsItem.PanelModality
parentItem(self) → QGraphicsItem
parentObject(self) → QGraphicsObject
parentWidget(self) → QGraphicsWidget
pos(self) → QPointF
prepareGeometryChange(self)
removeSceneEventFilter(self, QGraphicsItem)
resetTransform(self)
rotation(self) → float
scale(self) → float
scene(self) → QGraphicsScene
sceneBoundingRect(self) → QRectF
sceneEvent(self, QEvent) → bool
sceneEventFilter(self, QGraphicsItem, QEvent) → bool
scenePos(self) → QPointF
sceneTransform(self) → QTransform
scroll(self, float, float, rect: QRectF = QRectF())
setAcceptDrops(self, bool)
setAcceptHoverEvents(self, bool)
setAcceptTouchEvents(self, bool)
setAcceptedMouseButtons(self, Union[Qt.MouseButtons, Qt.MouseButton])
setActive(self, bool)
setBoundingRegionGranularity(self, float)
setCacheMode(self, QGraphicsItem.CacheMode, logicalCacheSize: QSize = QSize())
setCursor(self, Union[QCursor, Qt.CursorShape])
setData(self, int, Any)
setEnabled(self, bool)
setFiltersChildEvents(self, bool)
setFlag(self, QGraphicsItem.GraphicsItemFlag, enabled: bool = True)
setFlags(self, Union[QGraphicsItem.GraphicsItemFlags, QGraphicsItem.GraphicsItemFlag])
setFocus(self, focusReason: Qt.FocusReason = Qt.OtherFocusReason)
setFocusProxy(self, QGraphicsItem)
setGraphicsEffect(self, QGraphicsEffect)
setGroup(self, QGraphicsItemGroup)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setOpacity(self, float)
setPanelModality(self, QGraphicsItem.PanelModality)
setParentItem(self, QGraphicsItem)
setPos(self, Union[QPointF, QPoint])

setPos(self, float, float)

setRotation(self, float)
setScale(self, float)
setSelected(self, bool)
setToolTip(self, str)
setTransform(self, QTransform, combine: bool = False)
setTransformOriginPoint(self, Union[QPointF, QPoint])

setTransformOriginPoint(self, float, float)

setTransformations(self, Iterable[QGraphicsTransform])
setVisible(self, bool)
setX(self, float)
setY(self, float)
setZValue(self, float)
set_colormap(colormap)

Sets the colormap for the atom and bond coloring. Otherwise, the coloring used will be that coming from the ct and/or chmmol.

set_rect(rect)
Parameters:rect (QRect) – size of bounding box
set_structure(struct, StereoType=6, hydrogenTreatment=1, wantProperties=True, wantMMStereoProps=True, readAtomBondProperties=True, allowRadicals=False)

Set the structure to the given Structure object.

Parameters:
  • struct (schrodinger.structure.Structure class object) – structure to be drawn on the canvas
  • StereoType (ChmMmctAdaptor.StereoType) – Stereochemistry option to use. Avialable options: # Does not include stereochemistry info: canvas2d.ChmMmctAdaptor.NoStereo # Ignores mmstereo annotations: canvas2d.ChmMmctAdaptor.StereoFromGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromGeometry_Safe # Ignores 3d geometry: canvas2d.ChmMmctAdaptor.StereoFromAnnotation # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotation_Safe # Uses mmstereo annotaions with 3D geometry as a backup: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry_Safe
  • hydrogenTreatment (canvas2d.ChmAtomOption.H) – Hydrogen treatment method. canvas2d.ChmAtomOption.H_Never canvas2d.ChmAtomOption.H_ExplicitOnly canvas2d.ChmAtomOption.H_Polar canvas2d.ChmAtomOption.H_ExplicitPolar canvas2d.ChmAtomOption.H_Chiral canvas2d.ChmAtomOption.H_ExplicitChiral canvas2d.ChmAtomOption.H_ExplicitPolarAndChiral canvas2d.ChmAtomOption.H_All
  • wantProperties (bool) – Whether properties should be copied.
  • wantMMStereoProps (bool) – Whether to copy mmstereo properties.
  • readAtomBondProperties (bool) – Whether to copy atom and bond-level properties.
  • allowRadicals (bool) – Whether to assume that valence deficiencies represent unpaired electrons.
set_text(text, alignment=None)

Sets text in the view. This is useful if you display text in place of a structure, in places where no structure is available.

Parameters:
  • text (string) – text to be displayed
  • alignment (Qt.AlignmentFlags) – alignment flags of text, defaults to QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter
shape(self) → QPainterPath
show(self)
stackBefore(self, QGraphicsItem)
toGraphicsObject(self) → QGraphicsObject
toolTip(self) → str
topLevelItem(self) → QGraphicsItem
topLevelWidget(self) → QGraphicsWidget
transform(self) → QTransform
transformOriginPoint(self) → QPointF
transformations(self) → object
type(self) → int
ungrabKeyboard(self)
ungrabMouse(self)
unsetCursor(self)
update(self, rect: QRectF = QRectF())

update(self, float, float, float, float)

updateMicroFocus(self)
wheelEvent(self, QGraphicsSceneWheelEvent)
window(self) → QGraphicsWidget
x(self) → float
y(self) → float
zValue(self) → float
class schrodinger.application.desmond.fep_scholar_util.FEPStructureObject(parent)

Bases: PyQt5.QtCore.QObject

This class holds all information about each ligand. It also contains drawing objects.

__init__(parent)

Initialize self. See help(type(self)) for accurate signature.

setStructure(st, template_chmmol=None, mapper=None)

Set structure and generate coordinates. If template molecule is provided, coordinates will be generated to align matching mcs atoms.

Parameters:
  • st (structure.Structure) – molecule structure
  • template_chmmol (canvas.ChmMol) – template molecule
  • mapper – FEP mapper from which MCS matches are obtained.
clear()
sizeHint()

Provide size hint for structure pictures.

See Qt documentation for an explanation of arguments and return value.

blockSignals(self, bool) → bool
childEvent(self, QChildEvent)
children(self) → object
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, QObject = None) [signal]

disconnect(self)
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) → object
event(self, QEvent) → bool
eventFilter(self, QObject, QEvent) → bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → QObject

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) → List[QObject]

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

inherits(self, str) → bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) → bool
isWidgetType(self) → bool
isWindowType(self) → bool
killTimer(self, int)
metaObject(self) → QMetaObject
moveToThread(self, QThread)
objectName(self) → str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self) → QObject
property(self, str) → Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, PYQT_SIGNAL) → int
removeEventFilter(self, QObject)
sender(self) → QObject
senderSignalIndex(self) → int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) → bool
signalsBlocked(self) → bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) → int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) → QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = -1) → str
schrodinger.application.desmond.fep_scholar_util.make_fep_cmd(cd_params, jobname, struct_fname, opt=[])

Generates an FEP command list based on the specified parameters.

Parameters:
  • cd_params (dict) – config dialog parameters
  • jobname (str) – the jobname
  • master_msj_fname (str) – the filename for the master msj file
  • struct_fname (str) – the filename for the input structure
Returns:

a command list for launching the job

Return type:

list

schrodinger.application.desmond.fep_scholar_util.generate_scripts(cd_params, jobname, cmd)

Write the command line for submitting the job