Mercurial > repos > chemteam > mdanalysis_dihedral
comparison rdf.py @ 1:cc1d22357daf draft
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/ commit 9b44a37fc1a0c338693f54eaf52b582439ca9f0c
author | chemteam |
---|---|
date | Thu, 20 Dec 2018 06:49:06 -0500 |
parents | f95d4348ed7c |
children | d8178fe9aaff |
comparison
equal
deleted
inserted
replaced
0:f95d4348ed7c | 1:cc1d22357daf |
---|---|
6 | 6 |
7 import MDAnalysis as mda | 7 import MDAnalysis as mda |
8 from MDAnalysis.analysis.rdf import InterRDF | 8 from MDAnalysis.analysis.rdf import InterRDF |
9 | 9 |
10 import matplotlib | 10 import matplotlib |
11 matplotlib.use('Agg') # noqa | |
11 import matplotlib.pyplot as plt | 12 import matplotlib.pyplot as plt |
12 | 13 |
13 import numpy as np | 14 import numpy as np |
14 | |
15 matplotlib.use('Agg') | |
16 | 15 |
17 | 16 |
18 def parse_command_line(argv): | 17 def parse_command_line(argv): |
19 parser = argparse.ArgumentParser() | 18 parser = argparse.ArgumentParser() |
20 parser.add_argument('--idcd', help='input dcd') | 19 parser.add_argument('--idcd', help='input dcd') |
62 g = [xtmp.strip() for xtmp in f] | 61 g = [xtmp.strip() for xtmp in f] |
63 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]] | 62 data = [tuple(map(float, xtmp.split())) for xtmp in g[0:]] |
64 time = [xtmp[0] for xtmp in data] | 63 time = [xtmp[0] for xtmp in data] |
65 rdf = [xtmp[1] for xtmp in data] | 64 rdf = [xtmp[1] for xtmp in data] |
66 plt.plot(time, rdf) | 65 plt.plot(time, rdf) |
67 plt.xlabel('r ($\AA$)') | 66 plt.xlabel(r'r ($\AA$)') |
68 plt.ylabel('g(r)') | 67 plt.ylabel('g(r)') |
69 plt.savefig(args.ordf_plot, format='png') | 68 plt.savefig(args.ordf_plot, format='png') |