Mercurial > repos > chemteam > mdanalysis_distance
comparison distance.py @ 1:2b1434ec8c7e draft
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 9b44a37fc1a0c338693f54eaf52b582439ca9f0c
author | chemteam |
---|---|
date | Thu, 20 Dec 2018 06:48:23 -0500 |
parents | c33b972fe040 |
children | 312f912de69d |
comparison
equal
deleted
inserted
replaced
0:c33b972fe040 | 1:2b1434ec8c7e |
---|---|
4 import sys | 4 import sys |
5 | 5 |
6 import MDAnalysis as mda | 6 import MDAnalysis as mda |
7 | 7 |
8 import matplotlib | 8 import matplotlib |
9 matplotlib.use('Agg') # noqa | |
9 import matplotlib.pyplot as plt | 10 import matplotlib.pyplot as plt |
10 | 11 |
11 import numpy as np | 12 import numpy as np |
12 | |
13 matplotlib.use('Agg') | |
14 | 13 |
15 | 14 |
16 def parse_command_line(argv): | 15 def parse_command_line(argv): |
17 parser = argparse.ArgumentParser() | 16 parser = argparse.ArgumentParser() |
18 parser.add_argument('--idcd', help='input dcd') | 17 parser.add_argument('--idcd', help='input dcd') |
51 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]] | 50 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]] |
52 time = [xtmp[0] for xtmp in data] | 51 time = [xtmp[0] for xtmp in data] |
53 distance = [xtmp[1] for xtmp in data] | 52 distance = [xtmp[1] for xtmp in data] |
54 plt.plot(time, distance) | 53 plt.plot(time, distance) |
55 plt.xlabel('Frame No.') | 54 plt.xlabel('Frame No.') |
56 plt.ylabel('Distance ($\AA$)') | 55 plt.ylabel(r'Distance ($\AA$)') |
57 plt.savefig(args.odistance_plot, format='png') | 56 plt.savefig(args.odistance_plot, format='png') |