comparison ramachandran_plots.py @ 4:312f912de69d draft

"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3b99f08f22b9e0c16c0a0adc82f8c16c1a25cedf"
author chemteam
date Mon, 07 Oct 2019 12:52:40 -0400
parents 489b25966bb9
children aa4090b50e7b
comparison
equal deleted inserted replaced
3:489b25966bb9 4:312f912de69d
17 import seaborn as sns 17 import seaborn as sns
18 18
19 19
20 def parse_command_line(argv): 20 def parse_command_line(argv):
21 parser = argparse.ArgumentParser() 21 parser = argparse.ArgumentParser()
22 parser.add_argument('--idcd', help='input dcd') 22 parser.add_argument('--itraj', help='input traj')
23 parser.add_argument('--ipdb', help='input pdb') 23 parser.add_argument('--istr', help='input str')
24 parser.add_argument('--itrajext', help='input traj ext')
25 parser.add_argument('--istrext', help='input str ext')
24 parser.add_argument('--isegid1', help='segid 1') 26 parser.add_argument('--isegid1', help='segid 1')
25 parser.add_argument('--iresid1', help='resid 1') 27 parser.add_argument('--iresid1', help='resid 1')
26 parser.add_argument('--iname1', help='name 1') 28 parser.add_argument('--iname1', help='name 1')
27 parser.add_argument('--isegid2', help='segid 2') 29 parser.add_argument('--isegid2', help='segid 2')
28 parser.add_argument('--iresid2', help='resid 2') 30 parser.add_argument('--iresid2', help='resid 2')
92 94
93 dihe = calc_dihedrals(A, B, C, D) 95 dihe = calc_dihedrals(A, B, C, D)
94 return np.rad2deg(dihe) 96 return np.rad2deg(dihe)
95 97
96 98
97 u = mda.Universe(args.ipdb, args.idcd, topology_format="PDB", format="DCD") 99 u = mda.Universe(args.istr, args.itraj,
100 topology_format=args.istrext, format=args.itrajext)
98 101
99 phi_trajdata = np.array( 102 phi_trajdata = np.array(
100 [(u.trajectory.frame, calc_torsion(dihe_phi)) for ts in u.trajectory]) 103 [(u.trajectory.frame, calc_torsion(dihe_phi)) for ts in u.trajectory])
101 psi_trajdata = np.array( 104 psi_trajdata = np.array(
102 [(u.trajectory.frame, calc_torsion(dihe_psi)) for ts in u.trajectory]) 105 [(u.trajectory.frame, calc_torsion(dihe_psi)) for ts in u.trajectory])
106
107 print(phi_trajdata, psi_trajdata)
103 108
104 phi_frame, phi_series = phi_trajdata.T 109 phi_frame, phi_series = phi_trajdata.T
105 psi_frame, psi_series = psi_trajdata.T 110 psi_frame, psi_series = psi_trajdata.T
106 111
107 phi_series = np.concatenate(phi_series, axis=0) 112 phi_series = np.concatenate(phi_series, axis=0)