comparison distance.py @ 1:0315b541c74d draft

planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 9b44a37fc1a0c338693f54eaf52b582439ca9f0c
author chemteam
date Thu, 20 Dec 2018 06:48:45 -0500
parents 9bb57bd1fdc8
children 36babbdd7818
comparison
equal deleted inserted replaced
0:9bb57bd1fdc8 1:0315b541c74d
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')