diff --git a/order/order.py b/order/order.py index 85efd22..08e7bb2 100644 --- a/order/order.py +++ b/order/order.py @@ -54,20 +54,20 @@ def command_line_runner(): util.output_task('tto', args['frequency'], args['bins'], args['center']) tasker = tto.Translational(reader, args['center'], args['bins']) tasker.translational_param(args['frequency']) - tasker.out_put('TTO', 'Sk') + tasker.out_put('tto', 'Sk') if 'avc' in args['task']: util.output_task('avc', args['frequency'], args['bins'], args['center']) tasker = avc.VoronoiCell(reader, args['center'], args['bins']) tasker.asphericity(args['frequency']) - tasker.out_put('AVC', 'Eta') + tasker.out_put('avc', 'Eta') if 'msd' in args['task']: util.output_task('msd', args['frequency'], args['bins'], args['center']) tasker = msd.meanSquareD(reader, args['center'], args['bins']) #TODO: tasker.mean_square_displacement(1000, args['frequency']) - tasker.out_put('MSD') + tasker.out_put('msd') if 'interface' in args['task']: tasker = interface.WillardChandler(reader, 'interface.in') diff --git a/order/oto.py b/order/oto.py index d461261..c6d1540 100644 --- a/order/oto.py +++ b/order/oto.py @@ -85,7 +85,7 @@ def orientational_param(self, freq = 1): bar.next() bar.finish() - def out_put(self, taskname='OTO', param_name='Q'): + def out_put(self, taskname='oto', param_name='Q'): """output raw data and distribution""" raw_data = self.fprefix + '_' + taskname + '_raw.dat' with open(raw_data, 'w') as f: diff --git a/order/plot.py b/order/plot.py index 510385a..9dbd0b3 100644 --- a/order/plot.py +++ b/order/plot.py @@ -38,6 +38,7 @@ def plot_distribution(self): plt.rcParams['figure.titlesize'] = 12 #clean last plot + plt.figure() plt.clf() if self.taskname == 'oto': @@ -61,7 +62,7 @@ def plot_distribution(self): plt.plot(x,y,linewidth=2.0) - figure = self.fprefix + '_' + self.taskname.upper() + '.pdf' + figure = self.fprefix + '_' + self.taskname + '.pdf' plt.savefig(figure, bbox_inches="tight") def plot_ionic(self): diff --git a/order/tto.py b/order/tto.py index 13a3ad5..585bcac 100644 --- a/order/tto.py +++ b/order/tto.py @@ -18,6 +18,7 @@ import six from six.moves import range + import numpy as np from progress.bar import ChargingBar from . import oto @@ -39,7 +40,7 @@ def translational_param(self, freq = 1): for j in range(self.traj.n_atoms): if self.traj.atom_names[i][j] == self.center: s = 0.0 - norms = np.array(map(np.linalg.norm, foo[j])) + norms = np.array([np.linalg.norm(x) for x in foo[j]]) sqrt_norms = (norms - norms.mean()) ** 2 sum_norms = sqrt_norms.sum() / ( 4 * norms.mean() ** 2) s = 1 - 1 / 3 * sum_norms