当前位置: 首页>>代码示例>>Python>>正文


Python Read.molecular_weight方法代码示例

本文整理汇总了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())
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:32,代码来源:MolecularDescriptor.py


注:本文中的MolKit.Read.molecular_weight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。