本文整理汇总了Python中MolKit.Read.molecular_weight方法的典型用法代码示例。如果您正苦于以下问题:Python Read.molecular_weight方法的具体用法?Python Read.molecular_weight怎么用?Python Read.molecular_weight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MolKit.Read
的用法示例。
在下文中一共展示了Read.molecular_weight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: logP
# 需要导入模块: from MolKit import Read [as 别名]
# 或者: from MolKit.Read import molecular_weight [as 别名]
"""
raise NotImplementedError
def logP(self):
"""Return the octanol partition coefficient of the molecule.
"""
raise NotImplementedError
def mix_in(self, object):
"""Mix this class into the base classes of the given object
"""
object.__classes.__bases__ += (MolecularDescriptorMixIn,)
# check to see if you're already there !!
# MolecularDescriptorMixIn
if __name__ == '__main__':
# read the molecule
from MolKit import Read
mol = Read("nfv.pdb")[0]
# mix in the molecular descriptors
mol.__class__.__bases__ += (MolecularDescriptorMixIn,)
print "atomic formula of %s: %s" % (mol.name, repr(mol.atomic_formula()) )
print "molecular weight of %s: %4.2f" % (mol.name, mol.molecular_weight())
print "H-bond acceptors of %s: %d" % (mol.name, mol.Hbond_acceptors())
print "H-bond donors of %s: %d" % (mol.name, mol.Hbond_donors())