Mercurial > repos > chemteam > mdanalysis_angle
comparison distance.py @ 4:e7d0075052c9 draft
"planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 3b99f08f22b9e0c16c0a0adc82f8c16c1a25cedf"
author | chemteam |
---|---|
date | Mon, 07 Oct 2019 12:51:05 -0400 |
parents | 4759026f6ff4 |
children |
comparison
equal
deleted
inserted
replaced
3:ad135cf42274 | 4:e7d0075052c9 |
---|---|
12 import numpy as np | 12 import numpy as np |
13 | 13 |
14 | 14 |
15 def parse_command_line(argv): | 15 def parse_command_line(argv): |
16 parser = argparse.ArgumentParser() | 16 parser = argparse.ArgumentParser() |
17 parser.add_argument('--idcd', help='input dcd') | 17 parser.add_argument('--itraj', help='input traj') |
18 parser.add_argument('--ipdb', help='input pdb') | 18 parser.add_argument('--istr', help='input str') |
19 parser.add_argument('--itrajext', help='input traj ext') | |
20 parser.add_argument('--istrext', help='input str ext') | |
19 parser.add_argument('--isegid1', help='segid 1') | 21 parser.add_argument('--isegid1', help='segid 1') |
20 parser.add_argument('--iresid1', help='resid 1') | 22 parser.add_argument('--iresid1', help='resid 1') |
21 parser.add_argument('--iname1', help='name 1') | 23 parser.add_argument('--iname1', help='name 1') |
22 parser.add_argument('--isegid2', help='segid 2') | 24 parser.add_argument('--isegid2', help='segid 2') |
23 parser.add_argument('--iresid2', help='resid 2') | 25 parser.add_argument('--iresid2', help='resid 2') |
32 atom1 = "(segid %s and resid %s and name %s)" % \ | 34 atom1 = "(segid %s and resid %s and name %s)" % \ |
33 (args.isegid1, args.iresid1, args.iname1) | 35 (args.isegid1, args.iresid1, args.iname1) |
34 atom2 = "(segid %s and resid %s and name %s)" % \ | 36 atom2 = "(segid %s and resid %s and name %s)" % \ |
35 (args.isegid2, args.iresid2, args.iname2) | 37 (args.isegid2, args.iresid2, args.iname2) |
36 | 38 |
37 u = mda.Universe(args.ipdb, args.idcd, topology_format="PDB", format="DCD") | 39 u = mda.Universe(args.istr, args.itraj, |
40 topology_format=args.istrext, format=args.itrajext) | |
38 x = u.select_atoms(atom1) | 41 x = u.select_atoms(atom1) |
39 y = u.select_atoms(atom2) | 42 y = u.select_atoms(atom2) |
40 | 43 |
41 with open(args.output, 'w') as f: | 44 with open(args.output, 'w') as f: |
42 for t in u.trajectory: | 45 for t in u.trajectory: |