From e97c6070979447b2bf5d690e8d2290bd7f58aabb Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 30 Sep 2010 18:23:34 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4907 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/REPLICA/temper.h | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/REPLICA/temper.h diff --git a/src/REPLICA/temper.h b/src/REPLICA/temper.h new file mode 100644 index 0000000000..58c3a7aa7e --- /dev/null +++ b/src/REPLICA/temper.h @@ -0,0 +1,59 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef COMMAND_CLASS + +CommandStyle(temper,Temper) + +#else + +#ifndef LMP_TEMPER_H +#define LMP_TEMPER_H + +#include "pointers.h" + +namespace LAMMPS_NS { + +class Temper : protected Pointers { + public: + Temper(class LAMMPS *); + ~Temper(); + void command(int, char **); + + private: + int me,me_universe; // my proc ID in world and universe + int iworld,nworlds; // world info + double boltz; // copy from output->boltz + MPI_Comm roots; // MPI comm with 1 root proc from each world + class RanPark *ranswap,*ranboltz; // RNGs for swapping and Boltz factor + int nevery; // # of timesteps between swaps + int nswaps; // # of tempering swaps to perform + int seed_swap; // 0 = toggle swaps, n = RNG for swap direction + int seed_boltz; // seed for Boltz factor comparison + int whichfix; // index of temperature fix to use + int fixstyle; // what kind of temperature fix is used + + int my_set_temp; // which set temp I am simulating + double *set_temp; // static list of replica set temperatures + int *temp2world; // temp2world[i] = world simulating set temp i + int *world2temp; // world2temp[i] = temp simulated by world i + int *world2root; // world2root[i] = root proc of world i + + void scale_velocities(int, int); + void print_status(); +}; + +} + +#endif +#endif