Пример #1
0
def get_gdir_angle(coords1, coords2, coords3):
    r_ji = geomcalc.get_r_ij(coords2, coords1)
    r_jk = geomcalc.get_r_ij(coords2, coords3)
    u_ji = geomcalc.get_u_ij(coords2, coords1)
    u_jk = geomcalc.get_u_ij(coords2, coords3)
    cp    = geomcalc.get_ucp(u_ji, u_jk)
    gdir1 = geomcalc.get_ucp(u_ji, cp) / r_ji
    gdir3 = geomcalc.get_ucp(cp, u_jk) / r_jk
    gdir2 = -1.0 * (gdir1 + gdir3)
    return gdir1, gdir2, gdir3
Пример #2
0
def get_gdir_angle(coords1, coords2, coords3):
    r_ji = geomcalc.get_r_ij(coords2, coords1)
    r_jk = geomcalc.get_r_ij(coords2, coords3)
    u_ji = geomcalc.get_u_ij(coords2, coords1)
    u_jk = geomcalc.get_u_ij(coords2, coords3)
    cp = geomcalc.get_ucp(u_ji, u_jk)
    gdir1 = geomcalc.get_ucp(u_ji, cp) / r_ji
    gdir3 = geomcalc.get_ucp(cp, u_jk) / r_jk
    gdir2 = -1.0 * (gdir1 + gdir3)
    return gdir1, gdir2, gdir3
Пример #3
0
def get_gdir_torsion(coords1, coords2, coords3, coords4):
    r_kl = geomcalc.get_r_ij(coords3, coords4)
    r_ij = geomcalc.get_r_ij(coords1, coords2)
    u_ji = geomcalc.get_u_ij(coords2, coords1)
    u_jk = geomcalc.get_u_ij(coords2, coords3)
    u_kj = geomcalc.get_u_ij(coords3, coords2)
    u_kl = geomcalc.get_u_ij(coords3, coords4)
    a_ijk = geomcalc.get_a_ijk(coords1, coords2, coords3)
    a_lkj = geomcalc.get_a_ijk(coords4, coords3, coords2)
    gdir1 = geomcalc.get_ucp(u_ji, u_jk)
    gdir4 = geomcalc.get_ucp(u_kl, u_kj)
    gdir1 /= r_ij * math.sin(geomcalc.deg2rad() * a_ijk)
    gdir4 /= r_kl * math.sin(geomcalc.deg2rad() * a_lkj)
    gdir2 = -0.5 * (gdir1 + gdir4)
    gdir3 = 1.0 * gdir2
    return gdir1, gdir2, gdir3, gdir4
Пример #4
0
def get_gdir_torsion(coords1, coords2, coords3, coords4):
    r_kl = geomcalc.get_r_ij(coords3, coords4)
    r_ij = geomcalc.get_r_ij(coords1, coords2)
    u_ji = geomcalc.get_u_ij(coords2, coords1)
    u_jk = geomcalc.get_u_ij(coords2, coords3)
    u_kj = geomcalc.get_u_ij(coords3, coords2)
    u_kl = geomcalc.get_u_ij(coords3, coords4)
    a_ijk = geomcalc.get_a_ijk(coords1, coords2, coords3)
    a_lkj = geomcalc.get_a_ijk(coords4, coords3, coords2)
    gdir1 = geomcalc.get_ucp(u_ji, u_jk)
    gdir4 = geomcalc.get_ucp(u_kl, u_kj)
    gdir1 /= r_ij * math.sin(geomcalc.deg2rad() * a_ijk)
    gdir4 /= r_kl * math.sin(geomcalc.deg2rad() * a_lkj)
    gdir2 = -0.5 * (gdir1 + gdir4)
    gdir3 = 1.0 * gdir2
    return gdir1, gdir2, gdir3, gdir4
Пример #5
0
def get_gdir_inter(coords1, coords2):
    gdir1 = geomcalc.get_u_ij(coords2, coords1)
    gdir2 = -1.0 * gdir1
    return gdir1, gdir2
Пример #6
0
def get_gdir_inter(coords1, coords2):
    gdir1 = geomcalc.get_u_ij(coords2, coords1)
    gdir2 = -1.0 * gdir1
    return gdir1, gdir2