57int main(
int argc,
char** argv) {
59 std::cerr <<
"Usage: " << argv[0] <<
" <input.hdf5> <output.csv>"
70 std::ofstream out(argv[2]);
72 std::cerr <<
"Could not open output file: " << argv[2] << std::endl;
75 out <<
"segment_id,site_id,x_bohr,y_bohr,z_bohr,"
76 <<
"FPx_au,FPy_au,FPz_au,U1x_au,U1y_au,U1z_au\n";
78 std::size_t n_sites = 0;
79 std::size_t n_segments = 0;
87 const Eigen::Vector3d& pos = site.getPos();
88 const Eigen::Vector3d& fp = site.V();
89 const Eigen::Vector3d& u1 = site.getInducedDipole();
90 out <<
id <<
"," << site.getId() <<
"," << pos.x() <<
"," << pos.y()
91 <<
"," << pos.z() <<
"," << fp.x() <<
"," << fp.y() <<
"," << fp.z()
92 <<
"," << u1.x() <<
"," << u1.y() <<
"," << u1.z() <<
"\n";
97 std::cout <<
"Wrote " << n_sites <<
" sites from " << n_segments
98 <<
" segments to " << argv[2] << std::endl;
CheckpointReader getReader()
bool Has(Index id, EwaldChargeState state) const
std::vector< Index > AllIds() const
const PolarSegment & Get(Index id, EwaldChargeState state) const
void ReadFromCpt(CheckpointReader &r)
Class to represent Atom/Site in electrostatic+polarization.
int main(int argc, char **argv)
Charge transport classes.
ClassicalSegment< PolarSite > PolarSegment
Provides a means for comparing floating point numbers.