Exemple #1
0
import pytraj as pt
import numpy as np

traj = pt.iterload("RAN.rst7", "RAN.parm7")

print(traj.n_atoms, traj.top.n_residues)
print(pt.calc_chin(traj))

t0 = traj[:1]
deg_ene = []

flist = []

for deg in range(-180, 180, 5):
    pt._rotate_dih(t0, dihtype='chin', deg=deg, resid='1')
    flist.append(t0[0].copy())

en = pt.energy_decomposition(flist,
                             top=traj.top,
                             igb=8,
                             parm='./RAN.parm7')['dihedral']

chin = pt.calc_chin(flist, top=traj.top).values
en = en - en.min()

from matplotlib import pyplot as plt
plt.plot(chin, en, '--bo')
plt.show()
Exemple #2
0
#!/usr/bin/env python 
import pytraj as pt

traj = pt.iterload('./RAN.rst7', './RAN.parm7')
t0 = traj[:]

flist = []
for deg in range(-180, 175, 5):
    pt._rotate_dih(t0, resid='1', dihtype='chin', deg=deg)
    flist.append(t0[0].copy())

print(pt.calc_chin(flist, top=t0.top))
pt.write_traj('combined_traj.nc', flist, top=t0.top)
Exemple #3
0
import pytraj as pt

# load DNA structure
# calculate glycosidic torsion angle
trajin = "../tests/data/Test_NAstruct/adh026.3.crd"
parm = "../tests/data/Test_NAstruct/adh026.3.top"

traj = pt.iterload(trajin, parm)

print(pt.calc_chin(traj))
print(pt.calc_chin(traj, resrange=range(3, 21, 3)))