00001 /* ---------------------------------------------------------------------- 00002 miniMD is a simple, parallel molecular dynamics (MD) code. miniMD is 00003 an MD microapplication in the Mantevo project at Sandia National 00004 Laboratories ( http://software.sandia.gov/mantevo/ ). The primary 00005 authors of miniMD are Steve Plimpton and Paul Crozier 00006 (pscrozi@sandia.gov). 00007 00008 Copyright (2008) Sandia Corporation. Under the terms of Contract 00009 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 00010 certain rights in this software. This library is free software; you 00011 can redistribute it and/or modify it under the terms of the GNU Lesser 00012 General Public License as published by the Free Software Foundation; 00013 either version 3 of the License, or (at your option) any later 00014 version. 00015 00016 This library is distributed in the hope that it will be useful, but 00017 WITHOUT ANY WARRANTY; without even the implied warranty of 00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00019 Lesser General Public License for more details. 00020 00021 You should have received a copy of the GNU Lesser General Public 00022 License along with this software; if not, write to the Free Software 00023 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00024 USA. See also: http://www.gnu.org/licenses/lgpl.txt . 00025 00026 For questions, contact Paul S. Crozier (pscrozi@sandia.gov). 00027 00028 Please read the accompanying README and LICENSE files. 00029 ---------------------------------------------------------------------- */ 00030 00031 #ifndef ATOM_H 00032 #define ATOM_H 00033 00034 struct Box { 00035 double xprd,yprd,zprd; 00036 double xlo,xhi; 00037 double ylo,yhi; 00038 double zlo,zhi; 00039 }; 00040 00041 class Atom { 00042 public: 00043 int natoms; 00044 int nlocal,nghost; 00045 int nmax; 00046 00047 double **x; 00048 double **v; 00049 double **f; 00050 double **vold; 00051 00052 int comm_size,reverse_size,border_size; 00053 00054 struct Box box; 00055 00056 Atom(); 00057 ~Atom(); 00058 void addatom(double, double, double, double, double, double); 00059 void pbc(); 00060 void growarray(); 00061 00062 void copy(int, int); 00063 00064 void pack_comm(int, int *, double *, int *); 00065 void unpack_comm(int, int, double *); 00066 void pack_reverse(int, int, double *); 00067 void unpack_reverse(int, int *, double *); 00068 00069 int pack_border(int, double *, int *); 00070 int unpack_border(int, double *); 00071 int pack_exchange(int, double *); 00072 int unpack_exchange(int, double *); 00073 int skip_exchange(double *); 00074 00075 double **realloc_2d_double_array(double **, int, int, int); 00076 double **create_2d_double_array(int, int); 00077 void destroy_2d_double_array(double **); 00078 }; 00079 00080 #endif