Files
lammps/src/atom_vec_charge.cpp
2022-10-24 11:08:26 -04:00

45 lines
1.4 KiB
C++

/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
https://www.lammps.org/, Sandia National Laboratories
LAMMPS development team: developers@lammps.org
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.
------------------------------------------------------------------------- */
#include "atom_vec_charge.h"
#include "atom.h"
using namespace LAMMPS_NS;
/* ---------------------------------------------------------------------- */
AtomVecCharge::AtomVecCharge(LAMMPS *lmp) : AtomVec(lmp)
{
molecular = Atom::ATOMIC;
mass_type = PER_TYPE;
atom->q_flag = 1;
// strings with peratom variables to include in each AtomVec method
// strings cannot contain fields in corresponding AtomVec default strings
// order of fields in a string does not matter
// except: fields_data_atom & fields_data_vel must match data file
fields_grow = {"q"};
fields_copy = {"q"};
fields_border = {"q"};
fields_border_vel = {"q"};
fields_exchange = {"q"};
fields_restart = {"q"};
fields_create = {"q"};
fields_data_atom = {"id", "type", "q", "x"};
fields_data_vel = {"id", "v"};
setup_fields();
}