18#ifndef VOTCA_CSG_XYZWRITER_H
19#define VOTCA_CSG_XYZWRITER_H
39 void Open(std::string file,
bool bAppend =
false)
override;
40 void Close()
override;
45 void Write(T &container, std::string header);
55 return atom.getElement();
58 std::string
getName(std::unique_ptr<Bead> &bead) {
return bead->getName(); }
65 Eigen::Vector3d
getPos(std::unique_ptr<Bead> &bead) {
82 out_ << header <<
"\n";
84 boost::format fmter(
"%1$s%2$10.5f%3$10.5f%4$10.5f\n");
87 Eigen::Vector3d r =
getPos(atom);
89 std::string atomname =
getName(atom);
90 if (atomname.size() > 3) {
91 atomname = atomname.substr(0, 3);
93 while (atomname.size() < 3) {
94 atomname =
" " + atomname;
97 out_ << fmter % atomname % r.x() % r.y() % r.z();
topology of the whole system
BeadContainer & getIterable(Topology &top)
T & getIterable(T &container)
Eigen::Vector3d getPos(Atom &atom)
void Open(std::string file, bool bAppend=false) override
const tools::DistanceUnit distance_unit
Eigen::Vector3d getPos(std::unique_ptr< Bead > &bead)
void Write(Topology *conf) override
std::string getName(Atom &atom)
Index getSize(T &container)
std::string getName(std::unique_ptr< Bead > &bead)
boost::container::deque< Bead, void, block_bead_x4_t > BeadContainer
base class for all analysis tools