00001 /** 00002 * \file atom/protein_ligand_score.h 00003 * \brief Functions to read mol2s 00004 * 00005 * Copyright 2007-9 IMP Inventors. All rights reserved. 00006 * 00007 */ 00008 #ifndef IMPATOM_PROTEIN_LIGAND_SCORE_H 00009 #define IMPATOM_PROTEIN_LIGAND_SCORE_H 00010 00011 #include "atom_config.h" 00012 #include "internal/protein_ligand_internal_score.h" 00013 #include "Hierarchy.h" 00014 #include <IMP/Model.h> 00015 #include <IMP/Particle.h> 00016 #include <IMP/Restraint.h> 00017 #include <IMP/PairScore.h> 00018 #include <IMP/algebra/Vector3D.h> 00019 #include <IMP/file.h> 00020 #include <limits> 00021 00022 IMPATOM_BEGIN_NAMESPACE 00023 00024 /** \name Protein-ligand scoring 00025 00026 \imp provides a statistical scoring function for scoring 00027 protein-ligand complexes. Papers will be forthcoming. 00028 00029 Neither of the scoring methods provide derivatives. 00030 00031 As will more documentation and examples. 00032 @{ 00033 */ 00034 class ProteinLigandRestraint; 00035 00036 /** add_protein_ligand_score_data() must be called on the molecules 00037 containing the atoms before the PairScore is used in order 00038 to properly initialize the particles. 00039 */ 00040 class IMPATOMEXPORT ProteinLigandAtomPairScore: public PairScore { 00041 friend class ProteinLigandRestraint; 00042 internal::PMFTable table_; 00043 double threshold_; 00044 inline double evaluate(const algebra::VectorD<3> &protein_v, 00045 int ptype, 00046 const algebra::VectorD<3> &ligand_v, 00047 int ltype, 00048 core::XYZ pxyz, core::XYZ lxyz, 00049 DerivativeAccumulator *da) const; 00050 public: 00051 ProteinLigandAtomPairScore(double threshold 00052 = std::numeric_limits<double>::max()); 00053 IMP_SIMPLE_PAIR_SCORE(ProteinLigandAtomPairScore); 00054 }; 00055 00056 /** Score a pair of molecules. See ProteinLigandAtomPairScore for 00057 simply scoring the atom pairs. 00058 */ 00059 class IMPATOMEXPORT ProteinLigandRestraint: public Restraint { 00060 IMP::internal::OwnerPointer<ProteinLigandAtomPairScore> score_; 00061 RefCountingDecorator<Hierarchy> protein_, ligand_; 00062 public: 00063 ProteinLigandRestraint(Hierarchy protein, Hierarchy ligand, 00064 double threshold= std::numeric_limits<double>::max()); 00065 IMP_RESTRAINT(ProteinLigandRestraint); 00066 }; 00067 00068 00069 00070 00071 IMPATOMEXPORT void add_protein_ligand_score_data(Hierarchy h); 00072 00073 /** @} */ 00074 IMPATOM_END_NAMESPACE 00075 00076 #endif /* IMPATOM_PROTEIN_LIGAND_SCORE_H */