/*************************************************************************** md_mod.cpp - description ------------------- begin : Mon Dec 29 03:17:34 2003 copyright : (C) 2002 by Cavalli Andrea email : cavalli@bioc.unizh.ch **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include #include #include #include #include using namespace Almost; #define ALMTOSTRING(s) \ template<> \ inline string to_string(const s & ){ \ return "<" #s ">"; \ } ALMTOSTRING(ConstraintCollection); typedef MDImpl > * (MD::*md_factory)(const Molecules & molecules, const MDOptions & options, const MDB & mdb); #if (__GNUC__ >= 3) template<> #endif map,MD::md_factory > MD::factory #if (__GNUC__ >= 3) = map,MD::md_factory >(); #endif ; template<> inline string to_string(const MD &){ return ""; } template<> inline string to_string(const Molecules & molecules){ return ""; } template<> inline string to_string(const MDB & mdb){ return ""; } namespace Almost { void run_md_help(ConstraintCollection & cc, const Molecules & mol, const MDOptions & opts, const MDB & mdb){ MD md(cc); md.run(mol,opts,mdb); } } extern "C" { void init_md(){ //declarations here Module mod = Module("md","Molecular dynamics"); REGISTER_MDC19_OPTIONS(double); REGISTER_CONST(double); Class >(mod.self(),"md") .def_method("run",&MD::run) .def_method("cont",&MD::cont) .def_method("run_from_mol",&MD::run_from_mol) .def_method("restart",&MD::restart) .def_method("rst2molecules",&MD::rst2molecules) ; mod.def_function("const_md","Run a constrained MD simulation", const_md >); mod // .def_function("c19_options","Return options with right defaults",c19_md_options) .def_function("c22_defaults","Return options with right defaults",c22_md_options) .def_function("amber_defaults","Return options with right defaults",amber_md_options) .def_function("c19_defaults","Return options with right defaults",c19_defaults); } }