示例#1
0
	def __init__(self, residue_dict, derivative):
		self.residue_dict = residue_dict
		self.derivative = derivative
		formula = Formula(derivative.form())
		for residue, count in residue_dict.iteritems():
			formula.add(residue.form().multiply(count))
		self.formula = formula
示例#2
0
	def __init__(self, code):
		self.residue = code
		formula = Formula(Residue.residues[code]['formula'])
		formula.add('C2H2NO')
		self.formula = formula