18#ifndef VOTCA_CSG_PDBWRITER_H
19#define VOTCA_CSG_PDBWRITER_H
39 void Open(std::string file,
bool bAppend =
false)
override;
40 void Close()
override;
49 void WriteBox(
const Eigen::Matrix3d &box);
54 return atom.getElement();
59 template <
class T,
class Atom>
61 return container.getType();
70 template <
class T,
class Atom>
72 return container.getId();
103 boost::format atomfrmt(
104 "ATOM %1$5d %2$-4s %3$-3s %4$1s%5$4d %6$8.3f%7$8.3f%8$8.3f\n");
107 Eigen::Vector3d r =
getPos(atom);
108 std::string resname =
getResname(container, atom);
109 std::string atomname =
getName(atom);
110 if (resname.size() > 3) {
111 resname = resname.substr(0, 3);
113 if (atomname.size() > 4) {
114 atomname = atomname.substr(0, 4);
117 out_ << atomfrmt % (
getId(atom) % 100000)
119 % atomname % resname %
" "
120 % (
getResId(container, atom) % 10000)
123 % r.x() % r.y() % r.z();
virtual Eigen::Vector3d & Pos()
std::string getName() const
Gets the name of the bead.
const Index & getResnr() const
std::string getName(Atom &atom)
std::string getResname(T &container, Atom &)
void writeSymmetry(Atom &)
Eigen::Vector3d getPos(Atom &atom)
void WriteHeader(std::string header)
T & getIterable(T &container)
void WriteBox(const Eigen::Matrix3d &box)
Index getResId(T &container, Atom &)
void Write(Topology *conf) override
Eigen::Vector3d getPos(const Bead &bead)
void WriteContainer(T &container)
void Open(std::string file, bool bAppend=false) override
BeadContainer & getIterable(Topology &top)
Index getResId(Topology &, const Bead &bead)
std::string getName(const Bead &bead)
const tools::DistanceUnit distance_unit
topology of the whole system
boost::container::deque< Bead, void, block_bead_x4_t > BeadContainer
base class for all analysis tools