comparison dihedrals.py @ 3:49dac57d004a draft

planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3ff06e3182c3a1546ea0a3b29e0d4383e12169e1
author chemteam
date Wed, 03 Apr 2019 15:47:16 -0400
parents 0315b541c74d
children 36babbdd7818
comparison
equal deleted inserted replaced
2:57a3d6f94bcd 3:49dac57d004a
57 57
58 58
59 u = mda.Universe(args.ipdb, args.idcd, topology_format="PDB", format="DCD") 59 u = mda.Universe(args.ipdb, args.idcd, topology_format="PDB", format="DCD")
60 data = np.array([(u.trajectory.frame, psi(u)) for ts in u.trajectory]) 60 data = np.array([(u.trajectory.frame, psi(u)) for ts in u.trajectory])
61 frame, psi = data.T 61 frame, psi = data.T
62 PSI = np.concatenate(psi, axis=0)
62 63
63 zip(frame, psi) 64 zip(frame, PSI)
64 65
65 with open(args.output, 'w') as f: 66 with open(args.output, 'w') as f:
66 writer = csv.writer(f, delimiter='\t') 67 writer = csv.writer(f, delimiter='\t')
67 writer.writerows(zip(frame, psi)) 68 writer.writerows(zip(frame, PSI))
68 69
69 with open(args.output) as f: 70 with open(args.output) as f:
70 g = [xtmp.strip() for xtmp in f] 71 g = [xtmp.strip() for xtmp in f]
71 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]] 72 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]]
72 time = [xtmp[0] for xtmp in data] 73 time = [xtmp[0] for xtmp in data]