/*************************************************************************** agresign_mod.cpp - description ------------------- begin : Fri May 5 14:59:56 2006 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 #include namespace Almost { map ref_ene; int init_ref_ene___(){ // ref_ene["ALA"] = -95.1; // ref_ene["ARG"] = -127.38; // ref_ene["ASN"] = -115.34; // ref_ene["ASP"] = -123.13; // ref_ene["CYS"] = -98.02; // ref_ene["GLN"] = -112.63; // ref_ene["GLU"] = -114.91; // ref_ene["GLY"] = -93.27; // ref_ene["HIS"] = -109.73; // ref_ene["ILE"] = -91.97; // ref_ene["LEU"] = -94.05; // ref_ene["LYS"] = -114.92; // ref_ene["MET"] = -98.4; // ref_ene["PHE"] = -98.91; // ref_ene["PRO"] = -82.39; // ref_ene["SER"] = -102.18; // ref_ene["THR"] = -100.52; // ref_ene["TRP"] = -106.82; // ref_ene["TYR"] = -104.78; // ref_ene["VAL"] = -92.18; ref_ene["ALA"] = -95.806; ref_ene["ARG"] = -136.432; ref_ene["ASN"] = -112.758; ref_ene["ASP"] = -126.92; ref_ene["CYS"] = -98.722; ref_ene["GLN"] = -112.508; ref_ene["GLU"] = -125.408; ref_ene["GLY"] = -98.772; ref_ene["HIS"] = -112.908; ref_ene["ILE"] = -90.062; ref_ene["LEU"] = -92.16; ref_ene["LYS"] = -124.964; ref_ene["MET"] = -98.422; ref_ene["PHE"] = -97.662; ref_ene["PRO"] = -85.604; ref_ene["SER"] = -104.744; ref_ene["THR"] = -101.562; ref_ene["TRP"] = -109.206; ref_ene["TYR"] = -106.698; ref_ene["VAL"] = -91.022; return 1; } static int ref_ene_init = init_ref_ene___(); double potter_energy(EnergyData &e_from, EnergyData &e_to, string from, string to){ double A=0.4; double B=1.5; double C=0.1; double D=1.2; double res = A*(e_from["elec"]-e_to["elec"]) + B*(e_from["vdw"]-e_to["vdw"]) + C*(e_from["solv"]-e_to["solv"]) - D*(ref_ene[from]-ref_ene[to]); return -res; } } using namespace Almost; #define ALMTOSTRING(s) \ template<> \ inline string to_string(const s & ){ \ return "<" #s ">"; \ } ALMTOSTRING(Protein); ALMTOSTRING(MDB); ALMTOSTRING(DunbrackLib); template<> inline string to_string(const AggreHit & ){ return ""; } template<> inline string to_string(const AggreSign & ){ return ""; } template<> inline string to_string(const AggreCheck & ){ return ""; } template<> inline string to_string(const AggreSignRoule & ){ return ""; } template<> inline string to_string(const AggreSignOpts & ){ return ""; } template<> inline string to_string(const AggreCheckOpts & ){ return ""; } template<> inline string to_string(const AutoTargets & ){ return ""; } template<> inline string to_string(const AutoTargetsOptions & ){ return ""; } extern "C" { void init_agresign(){ //declarations here Module mod = Module("aggresign","Aggregation propensity tools"); Class(mod.self(),"roule") .def_method("add",&AggreSignRoule::add) // .def_method("add",&AggreSignRoule::add) ; Class(mod.self(),"sign_options") .def_attribute("mini_steps",&AggreSignOpts::mini_steps,"Undocumented") .def_attribute("inhibt_lpatch",&AggreSignOpts::inhibt_lpatch,"Undocumented") .def_attribute("inhibt_fpatch",&AggreSignOpts::inhibt_fpatch,"Undocumented") .def_attribute("optimize_sc",&AggreSignOpts::optimize_sc,"Undocumented") ; Class(mod.self(),"check_options") .def_attribute("mini_steps",&AggreCheckOpts::mini_steps,"Undocumented") .def_attribute("target_lpatch",&AggreCheckOpts::target_lpatch,"Undocumented") .def_attribute("target_fpatch",&AggreCheckOpts::target_fpatch,"Undocumented") .def_attribute("optimize_sc",&AggreCheckOpts::optimize_sc,"Undocumented") ; Class &,const MDB &, const DunbrackLib &, const AggreSignOpts &> >(mod.self(), "aggresign") .def_method("guess",&AggreSign::guess) .def_method("search",&AggreSign::search) ; Class &,const MDB &, const DunbrackLib &, const AggreCheckOpts &> >(mod.self(), "aggrecheck") .def_method("search",&AggreCheck::search) ; Class(mod.self(),"autotargetsoptions") .def_attribute("para",&AutoTargetsOptions::para,"Undocumented") .def_attribute("anti",&AutoTargetsOptions::anti,"Undocumented") .def_attribute("mini",&AutoTargetsOptions::mini,"Undocumented") .def_attribute("dunbrack",&AutoTargetsOptions::dunbrack,"Undocumented") .def_attribute("steps",&AutoTargetsOptions::steps,"Undocumented") .def_attribute("project",&AutoTargetsOptions::project,"Undocumented") .def_attribute("dir",&AutoTargetsOptions::dir,"Undocumented") ; Class >(mod.self(),"autotargets") .def_method("run",&AutoTargets::run) .def_method("set_energy_options",&AutoTargets::set_energy_options) .def_method("energy_options",&AutoTargets::energy_options) ; // mod.def_function("default_roule","Default substitution roule",default_roule); // mod.def_function("roule","Substitution roule from file",roule); } }