Commit 799ffc58 authored by dilkins's avatar dilkins
Browse files

C++ system headers included and enumeration of flip_int used;documentation corrected

parent 21c59d4c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -100,11 +100,6 @@ calculated by this fix is "extensive".

[Restrictions:]

The GLE thermostat in its current implementation should not be used
with rigid bodies, SHAKE or RATTLE. It is expected that all the
thermostatted degrees of freedom are fully flexible, and the sampled
ensemble will not be correct otherwise.

In order to perform constant-pressure simulations please use
"fix press/berendsen"_fix_press_berendsen.html, rather than
"fix npt"_fix_nh.html, to avoid duplicate integration of the
+18 −13
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@
------------------------------------------------------------------------- */

#include <mpi.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include "fix_ffl.h"
#include "math_extra.h"
#include "atom.h"
@@ -91,19 +91,24 @@ FixFFL::FixFFL(LAMMPS *lmp, int narg, char **arg) :
    int seed = force->inumeric(FLERR,arg[6]);

    // Flip type used, uses rescale if no flip is given
    if (narg == 8) strcpy(flip_type,arg[7]);
    else strcpy(flip_type,"rescale");
    if (narg == 8) {
        if (strcmp(arg[7],"no_flip") == 0) {flip_int = 0;}
	else if ((strcmp(arg[7],"rescale") == 0) {flip_int = 1;}
	else if ((strcmp(arg[7],"hard") == 0) {flip_int = 2;}
	else if ((strcmp(arg[7],"soft") == 0) {flip_int = 3;}
	else {
   	  error->all(FLERR,"Illegal fix ffl flip type, only accepts : rescale - hard - soft - no_flip");
	}
    } else {
        flip_int = 1;
    }


    // Tests if the flip type is valid
    if ( strcmp(flip_type,"rescale") && strcmp(flip_type,"hard") 
         && strcmp(flip_type,"soft") && strcmp(flip_type,"no_flip") )
        error->all(FLERR,"Illegal fix ffl flip type, only accepts : rescale - hard - soft - no_flip");

    if ( strcmp(flip_type,"no_flip") == 0 ) flip_int = 0;
    if ( strcmp(flip_type,"rescale") == 0 ) flip_int = 1;
    if ( strcmp(flip_type,"hard") == 0 ) flip_int = 2;
    if ( strcmp(flip_type,"soft") == 0 ) flip_int = 3;
//    if ( strcmp(flip_type,"no_flip") == 0 ) flip_int = 0;
 //   if ( strcmp(flip_type,"rescale") == 0 ) flip_int = 1;
  //  if ( strcmp(flip_type,"hard") == 0 ) flip_int = 2;
  //  if ( strcmp(flip_type,"soft") == 0 ) flip_int = 3;

    t_target=t_start;
    const double kT = t_target * force->boltz / force->mvv2e;