Python plotly 模块,tools() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用plotly.tools()

项目:aesop    作者:BioMoDeL    | 项目源码 | 文件源码
def execCoulomb(path_coulomb_exe, pqr):
    """Summary
    Call Coulomb from APBS tools to calculate Coulombic energies.

    Parameters
    ----------
    path_coulomb_exe : str
        Full path to coulomb executable.
    pqr : TYPE
        Filename for PQR to use for Coulombic energy calculation. Must be
        full path if not in current path.

    Returns
    -------
    float
        Coulombic energy associated with input PQR file.
    """
    (log, err) = runProcess([path_coulomb_exe, pqr])
    pattern = re.compile(
        '(?<=Total energy =)\s+[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?'
    )  # May need to update regex
    coul = np.asarray(re.findall(pattern, log)).astype(np.float)
    return (coul, log)


##########################################################################
# Function to run DSSP.exe - should work on any supported OS
##########################################################################
# def execDSSP(pdbfile, dssp):
#     """Summary

#     Parameters
#     ----------
#     pdbfile : TYPE
#         Description
#     dssp : TYPE
#         Description

#     Returns
#     -------
#     TYPE
#         Description
#     """
#     (log, err) = runProcess([dssp, pdbfile])
#     return log

##########################################################################
# Function to plot results of Alascan
##########################################################################