comparison dihedrals.py @ 3:489b25966bb9 draft

planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3ff06e3182c3a1546ea0a3b29e0d4383e12169e1
author chemteam
date Wed, 03 Apr 2019 15:46:56 -0400
parents 2b1434ec8c7e
children 312f912de69d
comparison
equal deleted inserted replaced
2:46892d756cec 3:489b25966bb9
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]