clean up includes in USER-COLVARS package

This commit is contained in:
Axel Kohlmeyer
2019-07-04 01:16:56 -04:00
parent fa15bf5edd
commit 732bd937e0
6 changed files with 37 additions and 54 deletions

View File

@ -10,30 +10,19 @@
#include "colvarproxy_lammps.h"
#include <mpi.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <cerrno>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <memory>
#include <string>
#include "lammps.h"
#include "atom.h"
#include "error.h"
#include "output.h"
#include "random_park.h"
#include "fix_colvars.h"
#include "colvarmodule.h"
#include "colvar.h"
#include "colvarbias.h"
#include "colvaratoms.h"
#include "colvarproxy.h"
#define HASH_FAIL -1

View File

@ -10,39 +10,22 @@
#ifndef COLVARPROXY_LAMMPS_H
#define COLVARPROXY_LAMMPS_H
#include "colvarproxy_lammps_version.h"
#include "colvarproxy_lammps_version.h" // IWYU pragma: export
#include <mpi.h>
#include <cstddef>
#include <string>
#include <vector>
#include "colvarmodule.h"
#include "colvarproxy.h"
#include "colvarvalue.h"
#include "colvartypes.h"
#include "lammps.h"
#include "domain.h"
#include "force.h"
#include "update.h"
#include <string>
#include <vector>
#include <iostream>
/* struct for packed data communication of coordinates and forces. */
struct commdata {
int tag,type;
double x,y,z,m,q;
};
inline std::ostream & operator<< (std::ostream &out, const commdata &cd)
{
out << " (" << cd.tag << "/" << cd.type << ": "
<< cd.x << ", " << cd.y << ", " << cd.z << ") ";
return out;
}
// forward declarations
namespace LAMMPS_NS {
class LAMMPS;
class RanPark;
}
#include "random_park.h"
#include "lammps.h" // IWYU pragma: keep
#include "domain.h" // IWYU pragma: keep
#include "force.h" // IWYU pragma: keep
#include "update.h" // IWYU pragma: keep
/// \brief Communication between colvars and LAMMPS
/// (implementation of \link colvarproxy \endlink)

View File

@ -25,26 +25,28 @@
------------------------------------------------------------------------- */
#include "fix_colvars.h"
#include <cmath>
#include <cstdio>
#include <mpi.h>
#include <cstdlib>
#include <cstring>
#include <errno.h>
#include <iostream>
#include <string>
#include <vector>
#include <memory>
#include "atom.h"
#include "comm.h"
#include "domain.h"
#include "error.h"
#include "group.h"
#include "force.h"
#include "memory.h"
#include "modify.h"
#include "random_park.h"
#include "respa.h"
#include "universe.h"
#include "update.h"
#include "citeme.h"
#include "colvarproxy_lammps.h"
#include "colvarmodule.h"
static const char colvars_pub[] =
"fix colvars command:\n\n"
@ -57,6 +59,19 @@ static const char colvars_pub[] =
" note = {doi: 10.1080/00268976.2013.813594}\n"
"}\n\n";
/* struct for packed data communication of coordinates and forces. */
struct LAMMPS_NS::commdata {
int tag,type;
double x,y,z,m,q;
};
inline std::ostream & operator<< (std::ostream &out, const LAMMPS_NS::commdata &cd)
{
out << " (" << cd.tag << "/" << cd.type << ": "
<< cd.x << ", " << cd.y << ", " << cd.z << ") ";
return out;
}
/* re-usable integer hash table code with static linkage. */
/** hash table top level data structure */

View File

@ -34,10 +34,9 @@ FixStyle(colvars,FixColvars)
#define LMP_FIX_COLVARS_H
#include "fix.h"
#include <mpi.h>
// forward declaration
class colvarproxy_lammps;
struct commdata;
namespace LAMMPS_NS {
@ -64,7 +63,7 @@ class FixColvars : public Fix {
virtual void restart(char *);
protected:
class colvarproxy_lammps *proxy; // pointer to the colvars proxy class
colvarproxy_lammps *proxy; // pointer to the colvars proxy class
char *conf_file; // name of colvars config file
char *inp_name; // name/prefix of colvars restart file
char *out_name; // prefix string for all output files

View File

@ -17,12 +17,11 @@
------------------------------------------------------------------------- */
#include "group_ndx.h"
#include <cstdio>
#include <mpi.h>
#include <cstdlib>
#include "atom.h"
#include "comm.h"
#include "group.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;

View File

@ -17,14 +17,12 @@
------------------------------------------------------------------------- */
#include "ndx_group.h"
#include <cstdio>
#include <mpi.h>
#include <cstdlib>
#include <cstring>
#include "atom.h"
#include "comm.h"
#include "group.h"
#include "memory.h"
#include "force.h"
#include "error.h"
using namespace LAMMPS_NS;