36 out <<
"Convert a reference atomistic trajectory or configuration into a "
37 "coarse-grained one \n"
38 <<
"based on a mapping xml-file. The mapping can be applied to either "
39 "an entire trajectory \n"
40 <<
"or a selected set of frames only (see options).\n"
42 <<
"* csg_map --top FA-topol.tpr --trj FA-traj.trr --out CG-traj.xtc "
44 <<
"* csg_map --top FA-topol.tpr --trj FA-conf.gro --out CG-conf.gro "
46 <<
"* csg_map --top FA-topol.tpr --trj FA-traj.xtc --out "
47 "FA-history.dlph --no-map\n"
48 <<
"* csg_map --top FA-field.dlpf --trj FA-history.dlph --out "
49 "CG-history.dlph --cg cg-map.xml\n"
50 <<
"* csg_map --top .dlpf --trj .dlph --out .dlph --cg cg-map.xml "
51 "convert HISTORY to HISTORY_CGV\n";
60 " output file for coarse-grained trajectory")(
61 "vel",
" Write mapped velocities (if available)")(
63 " Write mapped forces (if "
64 "available)")(
"hybrid",
103 for (
const auto &residue : top_ref->
Residues()) {
106 for (
const auto &residue : top->
Residues()) {
112 for (
const auto &molecule : top_ref->
Molecules()) {
114 for (
votca::Index i = 0; i < molecule.BeadCount(); i++) {
118 const Bead *bi = molecule.getBead(i);
134 mi->
AddBead(&hybtol.
Beads()[beadid], molecule.getBeadName(i));
144 const Bead *bparent = molecule.getBead(0);
172 string out =
OptionsMap()[
"out"].as<
string>();
173 cout <<
"writing coarse-grained trajectory to " << out << endl;
176 throw runtime_error(
"output format not supported: " + out);
182 throw runtime_error(
"options hybrid and no-map not compatible");
184 cout <<
"Doing hybrid mapping..." << endl;
201int main(
int argc,
char **argv) {
203 return app.
Exec(argc, argv);
string ProgramName() override
program name
bool DoTrajectory() override
overload and return true to enable trajectory command line options
void EndEvaluate() override
called after the last frame
bool EvaluateOptions() override
Process command line options.
void Initialize() override
Initialize application data.
std::unique_ptr< TrajectoryWriter > writer_
void HelpText(ostream &out) override
help text of application without version information
bool DoMapping() override
overload and return true to enable mapping command line options
void EvalConfiguration(Topology *top, Topology *top_ref) override
void BeginEvaluate(Topology *top, Topology *top_ref) override
called before the first frame
virtual const std::string getType() const noexcept
virtual const Eigen::Vector3d & getPos() const
std::string getName() const
Gets the name of the bead.
virtual void setPos(const Eigen::Vector3d &bead_position)
virtual const double & getMass() const noexcept
const Eigen::Vector3d & getF() const
get the force acting on the bead
const Index & getResnr() const
bool HasF() const noexcept
void setF(const Eigen::Vector3d &bead_force)
bool HasVel() const noexcept
void setVel(const Eigen::Vector3d &r)
const Eigen::Vector3d & getVel() const
virtual const double & getQ() const
Symmetry getSymmetry() const
bool EvaluateOptions() override
Process command line options.
void Initialize() override
Initialize application data.
information about molecules
void AddBead(Bead *bead, const std::string &name)
Add a bead to the molecule.
Bead * getBead(Index bead)
get the id of a bead in the molecule
Index BeadCount() const
get the number of beads in the molecule
Index getId() const
get the molecule ID
topology of the whole system
Residue & CreateResidue(std::string name)
Create a new resiude.
void setBox(const Eigen::Matrix3d &box, BoundaryCondition::eBoxtype boxtype=BoundaryCondition::typeAuto)
Index MoleculeCount() const
number of molecules in the system
bool BeadTypeExist(std::string type) const
Determine if a bead type exists.
const Eigen::Matrix3d & getBox() const
Bead * CreateBead(Bead::Symmetry symmetry, std::string name, std::string type, Index resnr, double m, double q)
Creates a new Bead.
void SetHasVel(const bool v)
void SetHasForce(const bool v)
Molecule * getMolecule(const Index i)
void RegisterBeadType(std::string type)
Register the bead type with the topology object.
Molecule * CreateMolecule(std::string name)
Creates a new molecule.
MoleculeContainer & Molecules()
ResidueContainer & Residues()
int main(int argc, char **argv)
FileFormatFactory< TrajectoryWriter > & TrjWriterFactory()