/*************************************************************************** smd_common.h - description ------------------- begin : Sun Mar 14 06:50:18 2004 copyright : (C) 2002 by Cavalli Andrea author : $Author$ date : $Date$ id : $Id$ 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. * * * ***************************************************************************/ #ifndef __SMD_COMMON__ #define __SMD_COMMON__ #include #include #include #include #include #include using namespace Almost; template inline string to_string(const C19SMDOptions & c19smd_opt){ stringstream s; s< inline string to_string(const C22SMDOptions & c22smd_opt){ stringstream s; s< inline string to_string(const SMD &){ return ""; } template inline string to_string(const SMD22 &){ return ""; } template struct OperatorHelperSolv; template<> struct OperatorHelperSolv<0> { template static typename FF::FloatType helper(SMDImplData & data){ // cout<<"NO SOLV"< struct OperatorHelperSolv<1> { template static typename FF::FloatType helper(SMDImplData & data){ // cout<<"SOLV"< struct OperatorHelperUb; template<> struct OperatorHelperUb<0> { template static typename FF::FloatType helper(SMDImplData & data){ // cout<<"NO UB"< struct OperatorHelperUb<1> { template static typename FF::FloatType helper(SMDImplData & data){ // cout<<"UB"< DynaLogStream & operator<<(DynaLogStream &log, SMDImplData & data){ char buff[256]; typename FF::FloatType time = ((typename FF::FloatType)data.step)*data.time_step; string prmpt=Almost::DynaStatPr; log.stream()<::helper(data), OperatorHelperUb::helper(data)); log.stream()< DynaDataStream & operator<<(DynaDataStream & dat, SMDImplData & data){ typename FF::FloatType time = ((typename FF::FloatType)data.step)*data.time_step; dat.stream()<::helper(data)<<" " <::helper(data)<<" " < >(mod.self(),"c19_options") \ .doc_attribute(C19SMDOptions< type >,rdie,see force field doc) \ .doc_attribute(C19SMDOptions< type >,sasa,see force field doc) \ .doc_attribute(C19SMDOptions< type >,sasa_ignore_h,see force field doc) \ .doc_attribute(C19SMDOptions< type >,vdw_shift,see force field doc) \ .doc_attribute(C19SMDOptions< type >,elec_shift,see force field doc) \ .doc_attribute(C19SMDOptions< type >,cut_on,see force field doc) \ .doc_attribute(C19SMDOptions< type >,cut_off,see force field doc) \ .doc_attribute(C19SMDOptions< type >,cut_nb,see force field doc) \ .doc_attribute(C19SMDOptions< type >,e_zero,see force field doc) \ .doc_attribute(C19SMDOptions< type >,e_14,see force field doc) \ .doc_attribute(C19SMDOptions< type >,eps,see force field doc) \ .doc_attribute(C19SMDOptions< type >,r_water,see force field doc) \ .doc_attribute(C19SMDOptions< type >,gamma_water,see force field doc) \ .doc_attribute(C19SMDOptions< type >,const_file,constraint definition file) \ .doc_attribute(C19SMDOptions< type >,sse,see force field doc) \ .doc_attribute(C19SMDOptions< type >,trj,Name of the file on which the coordinates of the dynamics run are to be saved.) \ .doc_attribute(C19SMDOptions< type >,rst,Name of the file on which the dynamics restart file for the present run is to be written.) \ .def_attribute("log",&C19SMDOptions< type >::log) \ .def_attribute("dat",&C19SMDOptions< type >::dat) \ .def_attribute("steps",&C19SMDOptions< type >::steps) \ .def_attribute("nprint",&C19SMDOptions< type >::nprint) \ .def_attribute("nsave",&C19SMDOptions< type >::nsave) \ .def_attribute("nupdate",&C19SMDOptions< type >::nupdate) \ .def_attribute("nsurf",&C19SMDOptions< type >::nsurf) \ .def_attribute("shake_mode",&C19SMDOptions< type >::shake_mode) \ .def_attribute("shake_tol",&C19SMDOptions< type >::shake_tol) \ .def_attribute("temp",&C19SMDOptions< type >::temp) \ .def_attribute("time_step",&C19SMDOptions< type >::time_step) \ .def_attribute("tau",&C19SMDOptions< type >::tau) \ .def_attribute("seed",&C19SMDOptions< type >::seed) \ .def_attribute("save_fitted",&C19SMDOptions< type >::save_fitted) \ .def_attribute("selection",&C19SMDOptions< type >::selection); #define REGISTER_SMDC22_OPTIONS(type) \ Class >(mod22.self(),"c22_options") \ .def_attribute("rdie",&C22SMDOptions< type >::rdie) \ .def_attribute("vdw_shift",&C22SMDOptions< type >::vdw_shift) \ .def_attribute("elec_shift",&C22SMDOptions< type >::elec_shift) \ .def_attribute("cut_on",&C22SMDOptions< type >::cut_on) \ .def_attribute("cut_off",&C22SMDOptions< type >::cut_off) \ .def_attribute("cut_nb",&C22SMDOptions< type >::cut_nb) \ .def_attribute("e_zero",&C22SMDOptions< type >::e_zero) \ .def_attribute("e_14",&C22SMDOptions< type >::e_14) \ .def_attribute("eps",&C22SMDOptions< type >::eps) \ .doc_attribute(C19SMDOptions< type >,gamma_water,see force field doc) \ .def_attribute("const_file",&C22SMDOptions< type >::const_file) \ .def_attribute("sse",&C22SMDOptions< type >::sse) \ .def_attribute("trj",&C22SMDOptions< type >::trj) \ .def_attribute("rst",&C22SMDOptions< type >::rst) \ .def_attribute("log",&C22SMDOptions< type >::log) \ .def_attribute("dat",&C22SMDOptions< type >::dat) \ .def_attribute("steps",&C22SMDOptions< type >::steps) \ .def_attribute("nprint",&C22SMDOptions< type >::nprint) \ .def_attribute("nsave",&C22SMDOptions< type >::nsave) \ .def_attribute("nupdate",&C22SMDOptions< type >::nupdate) \ .def_attribute("nsurf",&C22SMDOptions< type >::nsurf) \ .def_attribute("shake_mode",&C22SMDOptions< type >::shake_mode) \ .def_attribute("shake_tol",&C22SMDOptions< type >::shake_tol) \ .def_attribute("temp",&C22SMDOptions< type >::temp) \ .def_attribute("time_step",&C22SMDOptions< type >::time_step) \ .def_attribute("tau",&C22SMDOptions< type >::tau) \ .def_attribute("seed",&C22SMDOptions< type >::seed) \ .def_attribute("save_fitted",&C22SMDOptions< type >::save_fitted) \ .doc_attribute(C22SMDOptions< type >,selection, \ Selection of atoms for the fit.); #endif // Local Variables: // mode:C++ // End: