From 7f328e7746eab21906959f408b430ed6d2cf668d Mon Sep 17 00:00:00 2001 From: arcan1s Date: Sat, 6 Dec 2014 01:07:15 +0300 Subject: [PATCH] fix #1 some edit of python files --- mathmech/radf/src/main.c | 6 +++--- xvg2csv/xvg2csv.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mathmech/radf/src/main.c b/mathmech/radf/src/main.c index 129cb7d..5460e96 100644 --- a/mathmech/radf/src/main.c +++ b/mathmech/radf/src/main.c @@ -248,12 +248,12 @@ int main(int argc, char *argv[]) _atom_info = (atom_info *) malloc (8 * _system_info.num_atoms * sizeof (atom_info)); if (mode == 2) { - i = (_radf_info.r_max - _radf_info.r_min) / _radf_info.r_step; - j = (_radf_info.ang_max - _radf_info.ang_min) / _radf_info.ang_step; + i = 1 + (_radf_info.r_max - _radf_info.r_min) / _radf_info.r_step; + j = 1 + (_radf_info.ang_max - _radf_info.ang_min) / _radf_info.ang_step; i *= j; } else - i = (_radf_info.r_max - _radf_info.r_min) / _radf_info.r_step; + i = 1 + (_radf_info.r_max - _radf_info.r_min) / _radf_info.r_step; radf = (int *) malloc (i * sizeof (int)); for (j=0; j -1): if (line.find("RMSD") > -1): type = "rmsd" - elif (line.find("distance") > -1): + elif (line.find("istance") > -1): type = "dist" elif (line.find("Angle") > -1): type = "angl" @@ -230,9 +230,9 @@ if __name__ == "__main__": help = 'Do not create *.csv file', action = 'store_true', default = False) parser.add_argument('-nq', '--noqti', dest = 'noqti', help = 'Do not create *.qti file', action = 'store_true', default = False) - parser.add_argument('-t', '--time', dest = 'time', + parser.add_argument('-t', '--time', dest = 'time', type = int, help = 'Averaging time', action = 'store', default = 1) - parser.add_argument('-s', '--step', dest = 'step', + parser.add_argument('-s', '--step', dest = 'step', type = float, help = 'Time step', action = 'store', default = 1.0) args = parser.parse_args()