Package rdkit :: Package Chem :: Package Draw :: Module MolDrawing :: Class MolDrawing
[hide private]
[frames] | no frames]

Class MolDrawing

source code

object --+
         |
        MolDrawing

Instance Methods [hide private]
 
__init__(self, canvas=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
transformPoint(self, pos) source code
 
_getBondOffset(self, p1, p2) source code
 
_getOffsetBondPts(self, p1, p2, offsetX, offsetY, lenFrac=None) source code
 
_offsetDblBond(self, p1, p2, bond, a1, a2, conf, dir=1, lenFrac=None) source code
 
_drawWedgedBond(self, bond, pos, nbrPos, width=1.2, color=(1, 0, 0), dash=None) source code
 
_drawBond(self, bond, atom, nbr, pos, nbrPos, conf, width=1.2, color=(1, 0, 0), color2=None) source code
 
scaleAndCenter(self, mol, conf, coordCenter=False, canvasSize=None, ignoreHs=False) source code
 
_drawLabel(self, label, pos, font, color=None, **kwargs) source code
 
AddMol(self, mol, centerIt=True, molTrans=None, drawingTrans=None, highlightAtoms=[], confId=-1, flagCloseContactsDist=2, highlightMap=None, ignoreHs=False, highlightBonds=[], **kwargs)
Set the molecule to be drawn.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  dotsPerAngstrom = 30
  useFraction = 0.85
  atomLabelFontFace = 'sans'
  atomLabelFontSize = 12
  atomLabelMinFontSize = 7
  bondLineWidth = 1.2
  dblBondOffset = 0.3
  dblBondLengthFrac = 0.8
  defaultColor = (1, 0, 0)
  selectColor = (1, 0, 0)
  colorBonds = True
  noCarbonSymbols = True
  includeAtomNumbers = False
  atomNumberOffset = 0
  radicalSymbol = u''
  dash = (4, 4)
  atomPs = None
hash(x)
  canvas = None
hash(x)
  canvasSize = None
hash(x)
  wedgeDashedBonds = True
  coordScale = 1.0
  elemDict = {0: (0.5, 0.5, 0.5), 7: (0, 0, 1), 8: (1, 0, 0), 9:...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, canvas=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

AddMol(self, mol, centerIt=True, molTrans=None, drawingTrans=None, highlightAtoms=[], confId=-1, flagCloseContactsDist=2, highlightMap=None, ignoreHs=False, highlightBonds=[], **kwargs)

source code 
Set the molecule to be drawn.

Parameters:
  hightlightAtoms -- list of atoms to highlight (default [])
  highlightMap -- dictionary of (atom, color) pairs (default None)

Notes:
  - specifying centerIt will cause molTrans and drawingTrans to be ignored


Class Variable Details [hide private]

elemDict

Value:
{0: (0.5, 0.5, 0.5),
 7: (0, 0, 1),
 8: (1, 0, 0),
 9: (0.2, 0.8, 0.8),
 15: (1, 0.5, 0),
 16: (0.8, 0.8, 0),
 17: (0, 0.8, 0),
 35: (0.5, 0.3, 0.1)}