12#ifndef IMPNPC_PROTEIN_LOCALIZATION_RESTRAINT_H
13#define IMPNPC_PROTEIN_LOCALIZATION_RESTRAINT_H
17#include <IMP/npc/npc_config.h>
19#include <cereal/access.hpp>
20#include <cereal/types/base_class.hpp>
28class IMPNPCEXPORT ZAxialPositionRestraint :
public Restraint
34 bool consider_radius_;
36 friend class cereal::access;
37 template<
class Archive>
void serialize(Archive &ar) {
38 ar(cereal::base_class<Restraint>(
this),
39 sc_, lower_bound_, upper_bound_, sigma_, consider_radius_);
45 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
46 ZAxialPositionRestraint(Model *m,
47 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
48 ZAxialPositionRestraint() {}
52 void add_particles(
const ParticlesTemp &ps);
53 void set_particles(
const ParticlesTemp &ps);
70class IMPNPCEXPORT ZAxialPositionLowerRestraint :
public Restraint
75 bool consider_radius_;
77 friend class cereal::access;
78 template<
class Archive>
void serialize(Archive &ar) {
79 ar(cereal::base_class<Restraint>(
this),
80 sc_, lower_bound_, sigma_, consider_radius_);
86 double lower_bound,
bool consider_radius,
double sigma=1);
87 ZAxialPositionLowerRestraint(Model *m,
88 double lower_bound,
bool consider_radius,
double sigma=1);
89 ZAxialPositionLowerRestraint() {}
93 void add_particles(
const ParticlesTemp &ps);
94 void set_particles(
const ParticlesTemp &ps);
111class IMPNPCEXPORT ZAxialPositionUpperRestraint :
public Restraint
116 bool consider_radius_;
118 friend class cereal::access;
119 template<
class Archive>
void serialize(Archive &ar) {
120 ar(cereal::base_class<Restraint>(
this),
121 sc_, upper_bound_, sigma_, consider_radius_);
127 double upper_bound,
bool consider_radius,
double sigma=1);
128 ZAxialPositionUpperRestraint(Model *m,
129 double upper_bound,
bool consider_radius,
double sigma=1);
130 ZAxialPositionUpperRestraint() {}
134 void add_particles(
const ParticlesTemp &ps);
135 void set_particles(
const ParticlesTemp &ps);
153class IMPNPCEXPORT YAxialPositionRestraint :
public Restraint
159 bool consider_radius_;
161 friend class cereal::access;
162 template<
class Archive>
void serialize(Archive &ar) {
163 ar(cereal::base_class<Restraint>(
this),
164 sc_, lower_bound_, upper_bound_, sigma_, consider_radius_);
170 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
171 YAxialPositionRestraint(Model *m,
172 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
173 YAxialPositionRestraint() {}
177 void add_particles(
const ParticlesTemp &ps);
178 void set_particles(
const ParticlesTemp &ps);
195class IMPNPCEXPORT YAxialPositionLowerRestraint :
public Restraint
200 bool consider_radius_;
202 friend class cereal::access;
203 template<
class Archive>
void serialize(Archive &ar) {
204 ar(cereal::base_class<Restraint>(
this),
205 sc_, lower_bound_, sigma_, consider_radius_);
211 double lower_bound,
bool consider_radius,
double sigma=1);
212 YAxialPositionLowerRestraint(Model *m,
213 double lower_bound,
bool consider_radius,
double sigma=1);
214 YAxialPositionLowerRestraint() {}
218 void add_particles(
const ParticlesTemp &ps);
219 void set_particles(
const ParticlesTemp &ps);
236class IMPNPCEXPORT YAxialPositionUpperRestraint :
public Restraint
241 bool consider_radius_;
243 friend class cereal::access;
244 template<
class Archive>
void serialize(Archive &ar) {
245 ar(cereal::base_class<Restraint>(
this),
246 sc_, upper_bound_, sigma_, consider_radius_);
252 double upper_bound,
bool consider_radius,
double sigma=1);
253 YAxialPositionUpperRestraint(Model *m,
254 double upper_bound,
bool consider_radius,
double sigma=1);
255 YAxialPositionUpperRestraint() {}
259 void add_particles(
const ParticlesTemp &ps);
260 void set_particles(
const ParticlesTemp &ps);
278class IMPNPCEXPORT XYRadialPositionRestraint :
public Restraint
284 bool consider_radius_;
286 friend class cereal::access;
287 template<
class Archive>
void serialize(Archive &ar) {
288 ar(cereal::base_class<Restraint>(
this),
289 sc_, lower_bound_, upper_bound_, sigma_, consider_radius_);
295 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
296 XYRadialPositionRestraint(Model *m,
297 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
298 XYRadialPositionRestraint() {}
302 void add_particles(
const ParticlesTemp &ps);
303 void set_particles(
const ParticlesTemp &ps);
320class IMPNPCEXPORT XYRadialPositionLowerRestraint :
public Restraint
325 bool consider_radius_;
327 friend class cereal::access;
328 template<
class Archive>
void serialize(Archive &ar) {
329 ar(cereal::base_class<Restraint>(
this),
330 sc_, lower_bound_, sigma_, consider_radius_);
336 double lower_bound,
bool consider_radius,
double sigma=1);
337 XYRadialPositionLowerRestraint(Model *m,
338 double lower_bound,
bool consider_radius,
double sigma=1);
339 XYRadialPositionLowerRestraint() {}
343 void add_particles(
const ParticlesTemp &ps);
344 void set_particles(
const ParticlesTemp &ps);
361class IMPNPCEXPORT XYRadialPositionUpperRestraint :
public Restraint
366 bool consider_radius_;
368 friend class cereal::access;
369 template<
class Archive>
void serialize(Archive &ar) {
370 ar(cereal::base_class<Restraint>(
this),
371 sc_, upper_bound_, sigma_, consider_radius_);
377 double upper_bound,
bool consider_radius,
double sigma=1);
378 XYRadialPositionUpperRestraint(Model *m,
379 double upper_bound,
bool consider_radius,
double sigma=1);
380 XYRadialPositionUpperRestraint() {}
384 void add_particles(
const ParticlesTemp &ps);
385 void set_particles(
const ParticlesTemp &ps);
404class IMPNPCEXPORT ProteinContactRestraint :
public Restraint
407 double tolerance_factor_;
410 friend class cereal::access;
411 template<
class Archive>
void serialize(Archive &ar) {
412 ar(cereal::base_class<Restraint>(
this), sc_, tolerance_factor_, sigma_);
418 double tolerance_factor,
double sigma=0.1);
419 ProteinContactRestraint(Model *m,
420 double tolerance_factor,
double sigma=0.1);
421 ProteinContactRestraint() {}
425 void add_particles(
const ParticlesTemp &ps);
426 void set_particles(
const ParticlesTemp &ps);
442class IMPNPCEXPORT ProteinChainRestraint :
public Restraint
447 friend class cereal::access;
448 template<
class Archive>
void serialize(Archive &ar) {
449 ar(cereal::base_class<Restraint>(
this), sc_, sigma_);
456 ProteinChainRestraint(Model *m,
458 ProteinChainRestraint() {}
462 void add_particles(
const ParticlesTemp &ps);
463 void set_particles(
const ParticlesTemp &ps);
478class IMPNPCEXPORT MembraneSurfaceLocationRestraint :
public Restraint
486 friend class cereal::access;
487 template<
class Archive>
void serialize(Archive &ar) {
488 ar(cereal::base_class<Restraint>(
this), sc_, R_, r_, sigma_, thickness_);
494 double R,
double r,
double thickness,
double sigma=2);
495 MembraneSurfaceLocationRestraint(Model *m,
496 double R,
double r,
double thickness,
double sigma=2);
497 MembraneSurfaceLocationRestraint() {}
501 void add_particles(
const ParticlesTemp &ps);
502 void set_particles(
const ParticlesTemp &ps);
521class IMPNPCEXPORT MembraneSurfaceLocationConditionalRestraint :
public Restraint
530 friend class cereal::access;
531 template<
class Archive>
void serialize(Archive &ar) {
532 ar(cereal::base_class<Restraint>(
this),
533 sc1_, sc2_, R_, r_, sigma_, thickness_);
539 double R,
double r,
double thickness,
double sigma=2);
540 MembraneSurfaceLocationConditionalRestraint(Model *m,
541 double R,
double r,
double thickness,
double sigma=2);
542 MembraneSurfaceLocationConditionalRestraint() {}
547 void add_particles1(
const ParticlesTemp &ps);
548 void add_particles2(
const ParticlesTemp &ps);
549 void set_particles1(
const ParticlesTemp &ps);
550 void set_particles2(
const ParticlesTemp &ps);
568class IMPNPCEXPORT MembraneExclusionRestraint :
public Restraint
576 friend class cereal::access;
577 template<
class Archive>
void serialize(Archive &ar) {
578 ar(cereal::base_class<Restraint>(
this), sc_, R_, r_, sigma_, thickness_);
584 double R,
double r,
double thickness,
double sigma=2);
585 MembraneExclusionRestraint(Model *m,
586 double R,
double r,
double thickness,
double sigma=2);
587 MembraneExclusionRestraint() {}
591 void add_particles(
const ParticlesTemp &ps);
592 void set_particles(
const ParticlesTemp &ps);
610class IMPNPCEXPORT PoreSideVolumeLocationRestraint :
public Restraint
617 bool consider_radius_;
619 friend class cereal::access;
620 template<
class Archive>
void serialize(Archive &ar) {
621 ar(cereal::base_class<Restraint>(
this),
622 sc_, R_, r_, sigma_, thickness_, consider_radius_);
628 double R,
double r,
double thickness,
bool consider_radius,
double sigma=2);
629 PoreSideVolumeLocationRestraint(Model *m,
630 double R,
double r,
double thickness,
bool consider_radius,
double sigma=2);
631 PoreSideVolumeLocationRestraint() {}
635 void add_particles(
const ParticlesTemp &ps);
636 void set_particles(
const ParticlesTemp &ps);
651class IMPNPCEXPORT PerinuclearVolumeLocationRestraint :
public Restraint
658 bool consider_radius_;
660 friend class cereal::access;
661 template<
class Archive>
void serialize(Archive &ar) {
662 ar(cereal::base_class<Restraint>(
this),
663 sc_, R_, r_, sigma_, thickness_, consider_radius_);
669 double R,
double r,
double thickness,
bool consider_radius,
double sigma=2);
670 PerinuclearVolumeLocationRestraint(Model *m,
671 double R,
double r,
double thickness,
bool consider_radius,
double sigma=2);
672 PerinuclearVolumeLocationRestraint() {}
676 void add_particles(
const ParticlesTemp &ps);
677 void set_particles(
const ParticlesTemp &ps);
694class IMPNPCEXPORT AssemblySymmetryByDistanceRestraint :
public Restraint
699 friend class cereal::access;
700 template<
class Archive>
void serialize(Archive &ar) {
701 ar(cereal::base_class<Restraint>(
this), sc_, sigma_);
708 AssemblySymmetryByDistanceRestraint(Model *m,
710 AssemblySymmetryByDistanceRestraint() {}
714 void add_particles(
const ParticlesTemp &ps);
715 void set_particles(
const ParticlesTemp &ps);
732class IMPNPCEXPORT AssemblySymmetryByDihedralRestraint
738 friend class cereal::access;
739 template<
class Archive>
void serialize(Archive &ar) {
740 ar(cereal::base_class<Restraint>(
this), sc_, sigma_);
747 AssemblySymmetryByDihedralRestraint(Model *m,
749 AssemblySymmetryByDihedralRestraint() {}
753 void add_particles(
const ParticlesTemp &ps);
754 void set_particles(
const ParticlesTemp &ps);
768class IMPNPCEXPORT ProteinProximityRestraint
775 friend class cereal::access;
776 template<
class Archive>
void serialize(Archive &ar) {
777 ar(cereal::base_class<Restraint>(
this), sc_, sigma_, max_dist_);
783 double max_dist,
double sigma=0.1);
784 ProteinProximityRestraint(Model *m,
785 double max_dist,
double sigma=0.1);
786 ProteinProximityRestraint() {}
790 void add_particles(
const ParticlesTemp &ps);
791 void set_particles(
const ParticlesTemp &ps);
805class IMPNPCEXPORT XAxialPositionRestraint :
public Restraint
811 bool consider_radius_;
812 friend class cereal::access;
813 template<
class Archive>
void serialize(Archive &ar) {
814 ar(cereal::base_class<Restraint>(
this),
815 sc_, lower_bound_, upper_bound_, sigma_, consider_radius_);
821 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
822 XAxialPositionRestraint(Model *m,
823 double lower_bound,
double upper_bound,
bool consider_radius,
double sigma=1);
824 XAxialPositionRestraint() {}
828 void add_particles(
const ParticlesTemp &ps);
829 void set_particles(
const ParticlesTemp &ps);
846class IMPNPCEXPORT XAxialPositionLowerRestraint :
public Restraint
851 bool consider_radius_;
853 friend class cereal::access;
854 template<
class Archive>
void serialize(Archive &ar) {
855 ar(cereal::base_class<Restraint>(
this),
856 sc_, lower_bound_, sigma_, consider_radius_);
862 double lower_bound,
bool consider_radius,
double sigma=1);
863 XAxialPositionLowerRestraint(Model *m,
864 double lower_bound,
bool consider_radius,
double sigma=1);
865 XAxialPositionLowerRestraint() {}
869 void add_particles(
const ParticlesTemp &ps);
870 void set_particles(
const ParticlesTemp &ps);
887class IMPNPCEXPORT XAxialPositionUpperRestraint :
public Restraint
892 bool consider_radius_;
894 friend class cereal::access;
895 template<
class Archive>
void serialize(Archive &ar) {
896 ar(cereal::base_class<Restraint>(
this),
897 sc_, upper_bound_, sigma_, consider_radius_);
903 double upper_bound,
bool consider_radius,
double sigma=1);
904 XAxialPositionUpperRestraint(Model *m,
905 double upper_bound,
bool consider_radius,
double sigma=1);
906 XAxialPositionUpperRestraint() {}
913 void add_particles(
const ParticlesTemp &ps);
914 void set_particles(
const ParticlesTemp &ps);
938class IMPNPCEXPORT OverallPositionRestraint :
public Restraint
946 bool consider_radius_;
948 friend class cereal::access;
949 template<
class Archive>
void serialize(Archive &ar) {
950 ar(cereal::base_class<Restraint>(
this),
951 sc_, x_start_, y_start_, z_start_, tolerance_, sigma_, consider_radius_);
957 OverallPositionRestraint(Model *m,
959 double x_start,
double y_start,
double z_start,
double tolerance,
bool consider_radius,
double sigma=1);
960 OverallPositionRestraint(Model *m,
961 double x_start,
double y_start,
double z_start,
double tolerance,
bool consider_radius,
double sigma=1);
962 OverallPositionRestraint() {}
967 void add_particles(
const ParticlesTemp &ps);
968 void set_particles(
const ParticlesTemp &ps);
A nullptr-initialized pointer to an IMP Object.
Abstract base class for all restraints.
A container for Singletons.
Class for adding derivatives from restraints to the model.
Class to handle individual particles of a Model object.
Report key:value information on restraints.
Restraint(Model *m, std::string name)
Create a restraint and register it with the model.
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
RestraintInfo * get_static_info() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
ModelObjectsTemp do_get_inputs() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
RestraintInfo * get_static_info() const override
RestraintInfo * get_static_info() const override
ModelObjectsTemp do_get_inputs() const override
double unprotected_evaluate(IMP::DerivativeAccumulator *accum) const override
Return the unweighted score for the restraint.
IMP::Vector< IMP::WeakPointer< ModelObject > > ModelObjectsTemp
#define IMP_OBJECT_SERIALIZE_DECL(Name)
Declare methods needed for serialization of Object pointers.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
A smart pointer to a ref-counted Object that is a class member.