/*************************************************************************** pbcmd_common.h - description ------------------- begin : Tue Apr 13 12:40:57 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 __PBCMD_COMMON__ #define __PBCMD_COMMON__ #include #include #include #include #include #include using namespace Almost; template inline string to_string(const PBCMDOptions & pbcmd_opt){ stringstream s; s< inline string to_string(const PBCMD &){ return ""; } template struct OperatorHelperSolv; template<> struct OperatorHelperSolv<0> { template static typename FF::FloatType helper(PBCMDImplData & data){ // cout<<"NO SOLV"< static typename FF::FloatType helper(PBCSMDImplData & data){ // cout<<"NO SOLV"< struct OperatorHelperSolv<1> { template static typename FF::FloatType helper(PBCMDImplData & data){ // cout<<"SOLV"< static typename FF::FloatType helper(PBCSMDImplData & data){ // cout<<"SOLV"< struct OperatorHelperUb; template<> struct OperatorHelperUb<0> { template static typename FF::FloatType helper(PBCMDImplData & data){ // cout<<"NO UB"< static typename FF::FloatType helper(PBCSMDImplData & data){ // cout<<"NO UB"< struct OperatorHelperUb<1> { template static typename FF::FloatType helper(PBCMDImplData & data){ // cout<<"UB"< static typename FF::FloatType helper(PBCSMDImplData & data){ // cout<<"UB"< DynaLogStream & operator<<(DynaLogStream &log, PBCMDImplData & 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, PBCMDImplData & data){ typename FF::FloatType time = ((typename FF::FloatType)data.step)*data.time_step; dat.stream()<::helper(data)<<" " <::helper(data)<<" " < DynaLogStream & operator<<(DynaLogStream &log, PBCSMDImplData & 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, PBCSMDImplData & data){ typename FF::FloatType time = ((typename FF::FloatType)data.step)*data.time_step; dat.stream()<::helper(data)<<" " <::helper(data)<<" " < >(mod.self(),"pbcmdoptions") \ .def_attribute("kind",&PBCMDOptions< type >::kind)\ .doc_attribute(PBCMDOptions< type >,rdie,see force field doc) \ .doc_attribute(PBCMDOptions< type >,solv,see force field doc) \ .doc_attribute(PBCMDOptions< type >,solv_ignore_h,see force field doc) \ .doc_attribute(PBCMDOptions< type >,vdw_shift,see force field doc) \ .doc_attribute(PBCMDOptions< type >,elec_shift,see force field doc) \ .doc_attribute(PBCMDOptions< type >,cut_on,see force field doc) \ .doc_attribute(PBCMDOptions< type >,cut_off,see force field doc) \ .doc_attribute(PBCMDOptions< type >,cut_nb,see force field doc) \ .doc_attribute(PBCMDOptions< type >,e_zero,see force field doc) \ .doc_attribute(PBCMDOptions< type >,e_14,see force field doc) \ .doc_attribute(PBCMDOptions< type >,eps,see force field doc) \ .doc_attribute(PBCMDOptions< type >,r_water,see force field doc) \ .doc_attribute(PBCMDOptions< type >,gamma_water,see force field doc) \ .doc_attribute(PBCMDOptions< type >,vect,see force field doc) \ .doc_attribute(PBCMDOptions< type >,algorithm,Integration algorithm) \ .doc_attribute(PBCMDOptions< type >,Lx,X size of the box) \ .doc_attribute(PBCMDOptions< type >,Ly,Y size of the box) \ .doc_attribute(PBCMDOptions< type >,Lz,Z size of the box) \ .doc_attribute(PBCMDOptions< type >,granularity,granularuty of the box) \ .doc_attribute(PBCMDOptions< type >,trj,Name of the file on which the coordinates of the dynamics run are to be saved.) \ .doc_attribute(PBCMDOptions< type >,vtrj,Name of the file on which the velocities of the dynamics run are to be saved.) \ .doc_attribute(PBCMDOptions< type >,rst,Name of the file on which the dynamics restart file for the present run is to be written.) \ .def_attribute("log",&PBCMDOptions< type >::log) \ .def_attribute("dat",&PBCMDOptions< type >::dat) \ .def_attribute("steps",&PBCMDOptions< type >::steps) \ .def_attribute("nprint",&PBCMDOptions< type >::nprint) \ .def_attribute("nsave",&PBCMDOptions< type >::nsave) \ .def_attribute("nupdate",&PBCMDOptions< type >::nupdate) \ .def_attribute("nrottrans",&PBCMDOptions< type >::nrottrans) \ .def_attribute("shake_mode",&PBCMDOptions< type >::shake_mode) \ .def_attribute("shake_tol",&PBCMDOptions< type >::shake_tol) \ .def_attribute("temp",&PBCMDOptions< type >::temp) \ .def_attribute("time_step",&PBCMDOptions< type >::time_step) \ .def_attribute("tau",&PBCMDOptions< type >::tau) \ .def_attribute("seed",&PBCMDOptions< type >::seed) \ .def_attribute("save_fitted",&PBCMDOptions< type >::save_fitted) \ .def_attribute("selection",&PBCMDOptions< type >::selection); #endif // Local Variables: // mode:C++ // End: