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)
property index
property atom_type

Return macromodel atom type.

property xyz
property 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(value)

Bases: enum.Enum

An enumeration.

NoCache = 0
ItemCoordinateCache = 1
DeviceCoordinateCache = 2
DeviceCoordinateCache = 2
class GraphicsItemChange(value)

Bases: enum.Enum

An enumeration.

ItemPositionChange = 0
ItemVisibleChange = 2
ItemEnabledChange = 3
ItemSelectedChange = 4
ItemParentChange = 5
ItemChildAddedChange = 6
ItemChildRemovedChange = 7
ItemTransformChange = 8
ItemPositionHasChanged = 9
ItemTransformHasChanged = 10
ItemSceneChange = 11
ItemVisibleHasChanged = 12
ItemEnabledHasChanged = 13
ItemSelectedHasChanged = 14
ItemParentHasChanged = 15
ItemSceneHasChanged = 16
ItemCursorChange = 17
ItemCursorHasChanged = 18
ItemToolTipChange = 19
ItemToolTipHasChanged = 20
ItemFlagsChange = 21
ItemFlagsHaveChanged = 22
ItemZValueChange = 23
ItemZValueHasChanged = 24
ItemOpacityChange = 25
ItemOpacityHasChanged = 26
ItemScenePositionHasChanged = 27
ItemRotationChange = 28
ItemRotationHasChanged = 29
ItemScaleChange = 30
ItemScaleHasChanged = 31
ItemTransformOriginPointChange = 32
ItemTransformOriginPointHasChanged = 33
class GraphicsItemFlag(value)

Bases: enum.Flag

An enumeration.

ItemIsMovable = 1
ItemIsSelectable = 2
ItemIsFocusable = 4
ItemClipsToShape = 8
ItemClipsChildrenToShape = 16
ItemIgnoresTransformations = 32
ItemIgnoresParentOpacity = 64
ItemDoesntPropagateOpacityToChildren = 128
ItemStacksBehindParent = 256
ItemUsesExtendedStyleOption = 512
ItemHasNoContents = 1024
ItemSendsGeometryChanges = 2048
ItemAcceptsInputMethod = 4096
ItemNegativeZStacksBehindParent = 8192
ItemIsPanel = 16384
ItemSendsScenePositionChanges = 65536
ItemContainsChildrenInShape = 524288
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
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(value)

Bases: enum.Enum

An enumeration.

NonModal = 0
PanelModal = 1
SceneModal = 2
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.MouseButton
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, phase: int)
boundingRect(self) QRectF
boundingRegion(self, itemToDeviceTransform: 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, other: QGraphicsItem, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) bool
collidesWithPath(self, path: QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) bool
collidingItems(self, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
commonAncestorItem(self, other: QGraphicsItem) QGraphicsItem
contains(self, point: QPointF) bool
contextMenuEvent(self, event: QGraphicsSceneContextMenuEvent)
cursor(self) QCursor
data(self, key: int) Any
deviceTransform(self, viewportTransform: QTransform) QTransform
dragEnterEvent(self, event: QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, event: QGraphicsSceneDragDropEvent)
dragMoveEvent(self, event: QGraphicsSceneDragDropEvent)
dropEvent(self, event: QGraphicsSceneDragDropEvent)
effectiveOpacity(self) float
ensureVisible(self, rect: QRectF = QRectF(), xMargin: int = 50, yMargin: int = 50)
ensureVisible(self, x: float, y: float, w: float, h: float, xMargin: int = 50, yMargin: int = 50) None
filtersChildEvents(self) bool
flags(self) QGraphicsItem.GraphicsItemFlag
focusInEvent(self, event: QFocusEvent)
focusItem(self) QGraphicsItem
focusOutEvent(self, event: 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, event: QGraphicsSceneHoverEvent)
hoverLeaveEvent(self, event: QGraphicsSceneHoverEvent)
hoverMoveEvent(self, event: QGraphicsSceneHoverEvent)
inputMethodEvent(self, event: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, query: Qt.InputMethodQuery) Any
installSceneEventFilter(self, filterItem: QGraphicsItem)
isActive(self) bool
isAncestorOf(self, child: QGraphicsItem) bool
isBlockedByModalPanel(self) Tuple[bool, QGraphicsItem]
isClipped(self) bool
isEnabled(self) bool
isObscured(self, rect: QRectF = QRectF()) bool
isObscured(self, ax: float, ay: float, w: float, h: float) bool
isObscuredBy(self, item: QGraphicsItem) bool
isPanel(self) bool
isSelected(self) bool
isUnderMouse(self) bool
isVisible(self) bool
isVisibleTo(self, parent: QGraphicsItem) bool
isWidget(self) bool
isWindow(self) bool
itemChange(self, change: QGraphicsItem.GraphicsItemChange, value: Any) Any
itemTransform(self, other: QGraphicsItem) Tuple[QTransform, bool]
keyPressEvent(self, event: QKeyEvent)
keyReleaseEvent(self, event: QKeyEvent)
mapFromItem(self, item: QGraphicsItem, point: QPointF) QPointF
mapFromItem(self, item: QGraphicsItem, rect: QRectF) QPolygonF
mapFromItem(self, item: QGraphicsItem, polygon: QPolygonF) QPolygonF
mapFromItem(self, item: QGraphicsItem, path: QPainterPath) QPainterPath
mapFromItem(self, item: QGraphicsItem, ax: float, ay: float) QPointF
mapFromItem(self, item: QGraphicsItem, ax: float, ay: float, w: float, h: float) QPolygonF
mapFromParent(self, point: QPointF) QPointF
mapFromParent(self, rect: QRectF) QPolygonF
mapFromParent(self, polygon: QPolygonF) QPolygonF
mapFromParent(self, path: QPainterPath) QPainterPath
mapFromParent(self, ax: float, ay: float) QPointF
mapFromParent(self, ax: float, ay: float, w: float, h: float) QPolygonF
mapFromScene(self, point: QPointF) QPointF
mapFromScene(self, rect: QRectF) QPolygonF
mapFromScene(self, polygon: QPolygonF) QPolygonF
mapFromScene(self, path: QPainterPath) QPainterPath
mapFromScene(self, ax: float, ay: float) QPointF
mapFromScene(self, ax: float, ay: float, w: float, h: float) QPolygonF
mapRectFromItem(self, item: QGraphicsItem, rect: QRectF) QRectF
mapRectFromItem(self, item: QGraphicsItem, ax: float, ay: float, w: float, h: float) QRectF
mapRectFromParent(self, rect: QRectF) QRectF
mapRectFromParent(self, ax: float, ay: float, w: float, h: float) QRectF
mapRectFromScene(self, rect: QRectF) QRectF
mapRectFromScene(self, ax: float, ay: float, w: float, h: float) QRectF
mapRectToItem(self, item: QGraphicsItem, rect: QRectF) QRectF
mapRectToItem(self, item: QGraphicsItem, ax: float, ay: float, w: float, h: float) QRectF
mapRectToParent(self, rect: QRectF) QRectF
mapRectToParent(self, ax: float, ay: float, w: float, h: float) QRectF
mapRectToScene(self, rect: QRectF) QRectF
mapRectToScene(self, ax: float, ay: float, w: float, h: float) QRectF
mapToItem(self, item: QGraphicsItem, point: QPointF) QPointF
mapToItem(self, item: QGraphicsItem, rect: QRectF) QPolygonF
mapToItem(self, item: QGraphicsItem, polygon: QPolygonF) QPolygonF
mapToItem(self, item: QGraphicsItem, path: QPainterPath) QPainterPath
mapToItem(self, item: QGraphicsItem, ax: float, ay: float) QPointF
mapToItem(self, item: QGraphicsItem, ax: float, ay: float, w: float, h: float) QPolygonF
mapToParent(self, point: QPointF) QPointF
mapToParent(self, rect: QRectF) QPolygonF
mapToParent(self, polygon: QPolygonF) QPolygonF
mapToParent(self, path: QPainterPath) QPainterPath
mapToParent(self, ax: float, ay: float) QPointF
mapToParent(self, ax: float, ay: float, w: float, h: float) QPolygonF
mapToScene(self, point: QPointF) QPointF
mapToScene(self, rect: QRectF) QPolygonF
mapToScene(self, polygon: QPolygonF) QPolygonF
mapToScene(self, path: QPainterPath) QPainterPath
mapToScene(self, ax: float, ay: float) QPointF
mapToScene(self, ax: float, ay: float, w: float, h: float) QPolygonF
mouseDoubleClickEvent(self, event: QGraphicsSceneMouseEvent)
mouseMoveEvent(self, event: QGraphicsSceneMouseEvent)
mousePressEvent(event)

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

mouseReleaseEvent(self, event: QGraphicsSceneMouseEvent)
moveBy(self, dx: float, dy: 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, filterItem: QGraphicsItem)
resetTransform(self)
rotation(self) float
scale(self) float
scene(self) QGraphicsScene
sceneBoundingRect(self) QRectF
sceneEvent(self, event: QEvent) bool
sceneEventFilter(self, watched: QGraphicsItem, event: QEvent) bool
scenePos(self) QPointF
sceneTransform(self) QTransform
scroll(self, dx: float, dy: float, rect: QRectF = QRectF())
setAcceptDrops(self, on: bool)
setAcceptHoverEvents(self, enabled: bool)
setAcceptTouchEvents(self, enabled: bool)
setAcceptedMouseButtons(self, buttons: Qt.MouseButton)
setActive(self, active: bool)
setBoundingRegionGranularity(self, granularity: float)
setCacheMode(self, mode: QGraphicsItem.CacheMode, logicalCacheSize: QSize = QSize())
setCursor(self, cursor: Union[QCursor, Qt.CursorShape])
setData(self, key: int, value: Any)
setEnabled(self, enabled: bool)
setFiltersChildEvents(self, enabled: bool)
setFlag(self, flag: QGraphicsItem.GraphicsItemFlag, enabled: bool = True)
setFlags(self, flags: QGraphicsItem.GraphicsItemFlag)
setFocus(self, focusReason: Qt.FocusReason = Qt.OtherFocusReason)
setFocusProxy(self, item: QGraphicsItem)
setGraphicsEffect(self, effect: QGraphicsEffect)
setGroup(self, group: QGraphicsItemGroup)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setOpacity(self, opacity: float)
setPanelModality(self, panelModality: QGraphicsItem.PanelModality)
setParentItem(self, parent: QGraphicsItem)
setPos(self, pos: QPointF)
setPos(self, ax: float, ay: float) None
setRotation(self, angle: float)
setScale(self, scale: float)
setSelected(self, selected: bool)
setToolTip(self, toolTip: str)
setTransform(self, matrix: QTransform, combine: bool = False)
setTransformOriginPoint(self, origin: QPointF)
setTransformOriginPoint(self, ax: float, ay: float) None
setTransformations(self, transformations: Iterable[QGraphicsTransform])
setVisible(self, visible: bool)
setX(self, x: float)
setY(self, y: float)
setZValue(self, z: 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=StereoType.StereoFromAnnotationAndGeometry_Safe, hydrogenTreatment=H.H_ExplicitOnly, 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, sibling: QGraphicsItem)
toGraphicsObject(self) QGraphicsObject
toolTip(self) str
topLevelItem(self) QGraphicsItem
topLevelWidget(self) QGraphicsWidget
transform(self) QTransform
transformOriginPoint(self) QPointF
transformations(self) List[QGraphicsTransform]
type(self) int
ungrabKeyboard(self)
ungrabMouse(self)
unsetCursor(self)
update(self, rect: QRectF = QRectF())
update(self, ax: float, ay: float, width: float, height: float) None
updateMicroFocus(self)
wheelEvent(self, event: QGraphicsSceneWheelEvent)
window(self) QGraphicsWidget
x(self) float
y(self) float
zValue(self) float
class schrodinger.application.desmond.fep_scholar_util.FEPStructureObject(parent, rect=None)

Bases: PyQt6.QtCore.QObject

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

__init__(parent, rect=None)
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 (canvas2d.ChmMol) – template molecule

  • mapper (FEPScholarMapper) – FEP mapper from which MCS matches are obtained.

setChmmol(chmmol)

Assigns a chmmol to the structure item, then clears and regenerates its picture.

Parameters

chmmol (canvas2d.ChmMol) – the chmmol object corresponding to the structure

clear()
sizeHint()

Provide size hint for structure pictures.

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

blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
connectNotify(self, signal: QMetaMethod)
customEvent(self, a0: QEvent)
deleteLater(self)
destroyed

destroyed(self, object: typing.Optional[QObject] = None) [signal]

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
inherits(self, classname: str) bool
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

parent(self) QObject
property(self, name: 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, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, name: str)
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
signalsBlocked(self) bool
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
tr(sourceText: str, disambiguation: typing.Optional[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

  • main_msj_fname (str) – the filename for the main 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