Mercurial > repos > chemteam > mdanalysis_angle
comparison dihedrals.py @ 3:c19dea167308 draft
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3ff06e3182c3a1546ea0a3b29e0d4383e12169e1
| author | chemteam |
|---|---|
| date | Wed, 03 Apr 2019 15:42:28 -0400 |
| parents | 231a8ddd34c6 |
| children | 8a5c112aa0f1 |
comparison
equal
deleted
inserted
replaced
| 2:72aaaa34dda5 | 3:c19dea167308 |
|---|---|
| 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] |
