~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/rerun.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   See the README file in the top-level LAMMPS directory.
12
12
------------------------------------------------------------------------- */
13
13
 
14
 
#include "lmptype.h"
15
14
#include "stdlib.h"
16
15
#include "string.h"
17
16
#include "rerun.h"
71
70
  while (iarg < narg) {
72
71
    if (strcmp(arg[iarg],"first") == 0) {
73
72
      if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
74
 
      first = ATOBIGINT(arg[iarg+1]);
 
73
      first = force->bnumeric(FLERR,arg[iarg+1]);
75
74
      if (first < 0) error->all(FLERR,"Illegal rerun command");
76
75
      iarg += 2;
77
76
    } else if (strcmp(arg[iarg],"last") == 0) {
78
77
      if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
79
 
      last = ATOBIGINT(arg[iarg+1]);
 
78
      last = force->bnumeric(FLERR,arg[iarg+1]);
80
79
      if (last < 0) error->all(FLERR,"Illegal rerun command");
81
80
      iarg += 2;
82
81
    } else if (strcmp(arg[iarg],"every") == 0) {
92
91
    } else if (strcmp(arg[iarg],"start") == 0) {
93
92
      if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
94
93
      startflag = 1;
95
 
      start = ATOBIGINT(arg[iarg+1]);
 
94
      start = force->bnumeric(FLERR,arg[iarg+1]);
96
95
      if (start < 0) error->all(FLERR,"Illegal rerun command");
97
96
      iarg += 2;
98
97
    } else if (strcmp(arg[iarg],"stop") == 0) {
99
98
      if (iarg+2 > narg) error->all(FLERR,"Illegal rerun command");
100
99
      stopflag = 1;
101
 
      stop = ATOBIGINT(arg[iarg+1]);
 
100
      stop = force->bnumeric(FLERR,arg[iarg+1]);
102
101
      if (stop < 0) error->all(FLERR,"Illegal rerun command");
103
102
      iarg += 2;
104
103
    } else if (strcmp(arg[iarg],"dump") == 0) {
127
126
  // perform the psuedo run
128
127
  // invoke lmp->init() only once
129
128
  // read all relevant snapshots
130
 
  // uset setup_minimal() since atoms are already owned by correct procs
 
129
  // use setup_minimal() since atoms are already owned by correct procs
131
130
  // addstep_compute_all() insures energy/virial computed on every snapshot
132
131
 
133
132
  update->whichflag = 1;