2014-10-22 01:09:24 +08:00
|
|
|
/* -*- c++ -*- ----------------------------------------------------------
|
2013-04-04 00:57:24 +08:00
|
|
|
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(write_data,WriteData)
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#ifndef LMP_WRITE_DATA_H
|
|
|
|
#define LMP_WRITE_DATA_H
|
|
|
|
|
2015-10-31 04:04:06 +08:00
|
|
|
#include <stdio.h>
|
2013-04-04 00:57:24 +08:00
|
|
|
#include "pointers.h"
|
|
|
|
|
|
|
|
namespace LAMMPS_NS {
|
|
|
|
|
|
|
|
class WriteData : protected Pointers {
|
|
|
|
public:
|
|
|
|
WriteData(class LAMMPS *);
|
|
|
|
void command(int, char **);
|
|
|
|
void write(char *);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int me,nprocs;
|
2013-04-24 04:35:26 +08:00
|
|
|
int pairflag;
|
2015-07-16 05:29:44 +08:00
|
|
|
int coeffflag;
|
2018-03-04 22:56:22 +08:00
|
|
|
int fixflag;
|
2013-04-04 00:57:24 +08:00
|
|
|
FILE *fp;
|
2013-04-04 03:58:40 +08:00
|
|
|
bigint nbonds_local,nbonds;
|
|
|
|
bigint nangles_local,nangles;
|
2018-01-23 14:56:11 +08:00
|
|
|
bigint ndihedrals_local,ndihedrals;
|
|
|
|
bigint nimpropers_local,nimpropers;
|
2013-04-04 00:57:24 +08:00
|
|
|
|
|
|
|
void header();
|
|
|
|
void type_arrays();
|
|
|
|
void force_fields();
|
|
|
|
void atoms();
|
|
|
|
void velocities();
|
|
|
|
void bonds();
|
|
|
|
void angles();
|
|
|
|
void dihedrals();
|
|
|
|
void impropers();
|
2013-08-21 04:44:10 +08:00
|
|
|
void fix(int, int);
|
2013-04-04 00:57:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
2013-06-30 05:20:42 +08:00
|
|
|
|
|
|
|
/* ERROR/WARNING messages:
|
|
|
|
|
|
|
|
E: Write_data command before simulation box is defined
|
|
|
|
|
2014-01-31 00:09:37 +08:00
|
|
|
Self-explanatory.
|
2013-06-30 05:20:42 +08:00
|
|
|
|
|
|
|
E: Illegal ... command
|
|
|
|
|
2014-01-29 09:37:09 +08:00
|
|
|
Self-explanatory. Check the input script syntax and compare to the
|
|
|
|
documentation for the command. You can use -echo screen as a
|
|
|
|
command-line option when running LAMMPS to see the offending line.
|
2013-06-30 05:20:42 +08:00
|
|
|
|
|
|
|
E: Atom count is inconsistent, cannot write data file
|
|
|
|
|
2014-01-31 00:09:37 +08:00
|
|
|
The sum of atoms across processors does not equal the global number
|
|
|
|
of atoms. Probably some atoms have been lost.
|
2013-06-30 05:20:42 +08:00
|
|
|
|
|
|
|
E: Cannot open data file %s
|
|
|
|
|
2014-01-31 00:09:37 +08:00
|
|
|
The specified file cannot be opened. Check that the path and name are
|
|
|
|
correct.
|
2013-06-30 05:20:42 +08:00
|
|
|
|
|
|
|
*/
|