本文整理汇总了Python中molecule.Molecule.compute_g_matrix方法的典型用法代码示例。如果您正苦于以下问题:Python Molecule.compute_g_matrix方法的具体用法?Python Molecule.compute_g_matrix怎么用?Python Molecule.compute_g_matrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类molecule.Molecule
的用法示例。
在下文中一共展示了Molecule.compute_g_matrix方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: coordinates
# 需要导入模块: from molecule import Molecule [as 别名]
# 或者: from molecule.Molecule import compute_g_matrix [as 别名]
# build transformation matrix from regular internal coordinates (in zmat order)
# to C2-symmetrized internal coordinates for HOOH/DOD
n = 1 / np.sqrt(2)
U = np.array(
# rOH, rOO, fHOO, rOH', fHOO', tHOOH
[[ +n, 0, 0, +n, 0, 0], # s1
[ 0, +1, 0, 0, 0, 0], # s2
[ 0, 0, +n, 0, +n, 0], # s3
[ 0, 0, 0, 0, 0, +1], # s4
[ +n, 0, 0, -n, 0, 0], # s5
[ 0, 0, +n, 0, -n, 0]] # s6
)
# compute the G matrices for HOOH and DOOD
G = hooh.compute_g_matrix() # compute G matrix in unsymmetrized internal coordinate basis
m = hooh.masses
r = hooh.distance
f = hooh.angle
t = hooh.torsion
G = np.dot(U, np.dot(G, U.T)) # G -> U * G * U.T, transform to symmetrized internal coordinate basis
vib_hooh = IntCoVibAnalysis(F, G, blockdims=(4, 2))
print("HOOH G matrix")
print G.round(14)
G = dood.compute_g_matrix() # compute G matrix in unsymmetrized internal coordinate basis
G = np.dot(U, np.dot(G, U.T)) # G -> U * G * U.T, transform to symmetrized internal coordinate basis
vib_dood = IntCoVibAnalysis(F, G, blockdims=(4, 2))
print("DOOD G matrix")
print G.round(14)
示例2: Molecule
# 需要导入模块: from molecule import Molecule [as 别名]
# 或者: from molecule.Molecule import compute_g_matrix [as 别名]
import numpy as np
from vib import IntCoVibAnalysis
from molecule import Molecule
h2cn = Molecule(
"""
N
C 1 1.253338969095741
H 2 1.095130571925020 1 121.213471579853874
H 2 1.095130571925020 1 121.213471579853874 3 180.000000000000000
"""
)
G = h2cn.compute_g_matrix() ## unsymmetrized internal coordinate basis
print(G)
示例3: Molecule
# 需要导入模块: from molecule import Molecule [as 别名]
# 或者: from molecule.Molecule import compute_g_matrix [as 别名]
from molecule import Molecule
h2o = Molecule(
"""
O
H 1 1.09520
H 1 1.09520 2 109.0000
"""
)
print( h2o.compute_g_matrix() )
示例4: Molecule
# 需要导入模块: from molecule import Molecule [as 别名]
# 或者: from molecule.Molecule import compute_g_matrix [as 别名]
from molecule import Molecule
hooh = Molecule(
"""
H
O 1 0.9625
O 2 1.4535 1 99.64
H 3 0.9625 2 99.64 1 113.7
"""
)
print( hooh.compute_g_matrix() )