Exemplo n.º 1
0
 def __init__(self, symbol='C', charge=0):
     try:
         self.__symbol = Element.get(symbol).symbol
     except KeyError:
         self.__symbol = symbol
         
     self.charge = charge
Exemplo n.º 2
0
 def weight(self):
     result = 0.0
     nH = 0
     for i in self.atoms:
         result += i.weight
         nH += self.implicit_H(i)
     result += nH * Element.get(1).weight
     return result
Exemplo n.º 3
0
 def element(self):
     return Element.get(self.symbol)