本文整理匯總了Python中graph.Vertex.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Vertex.__init__方法的具體用法?Python Vertex.__init__怎麽用?Python Vertex.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類graph.Vertex
的用法示例。
在下文中一共展示了Vertex.__init__方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from graph import Vertex [as 別名]
# 或者: from graph.Vertex import __init__ [as 別名]
def __init__(self, atomType=None, radicalElectrons=None, spinMultiplicity=None, charge=None, label=''):
Vertex.__init__(self)
self.atomType = atomType or []
for index in range(len(self.atomType)):
if isinstance(self.atomType[index], str):
self.atomType[index] = atomTypes[self.atomType[index]]
self.radicalElectrons = radicalElectrons or []
self.spinMultiplicity = spinMultiplicity or []
self.charge = charge or []
self.label = label
示例2: __init__
# 需要導入模塊: from graph import Vertex [as 別名]
# 或者: from graph.Vertex import __init__ [as 別名]
def __init__(self, element=None, coord=np.array([0.0, 0.0, 0.0]), radicalElectrons=0, spinMultiplicity=1, implicitHydrogens=0, charge=0, label=''):
Vertex.__init__(self)
if isinstance(element, str):
self.element = elements.__dict__[element]
else:
self.element = element
self.coord = coord
self.radicalElectrons = radicalElectrons
self.spinMultiplicity = spinMultiplicity
self.implicitHydrogens = implicitHydrogens
self.charge = charge
self.label = label
self.atomType = None