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

« back to all changes in this revision

Viewing changes to src/fix_langevin.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:
55
55
{
56
56
  if (narg < 7) error->all(FLERR,"Illegal fix langevin command");
57
57
 
 
58
  dynamic_group_allow = 1;
58
59
  scalar_flag = 1;
59
60
  global_freq = 1;
60
61
  extscalar = 1;
73
74
 
74
75
  t_stop = force->numeric(FLERR,arg[4]);
75
76
  t_period = force->numeric(FLERR,arg[5]);
76
 
  int seed = force->inumeric(FLERR,arg[6]);
 
77
  seed = force->inumeric(FLERR,arg[6]);
77
78
 
78
79
  if (t_period <= 0.0) error->all(FLERR,"Fix langevin period must be > 0.0");
79
80
  if (seed <= 0) error->all(FLERR,"Illegal fix langevin command");
680
681
  double inertiaone;
681
682
  
682
683
  for (int i = 0; i < nlocal; i++) {
683
 
    if (mask[i] & groupbit) {
 
684
    if ((mask[i] & groupbit) && (radius[i] > 0.0)) {
684
685
      inertiaone = SINERTIA*radius[i]*radius[i]*rmass[i];
685
686
      if (tstyle == ATOM) tsqrt = sqrt(tforce[i]);
686
687
      gamma1 = -tendivthree*inertiaone / t_period / ftm2v;