8 #ifndef IMPISD_SWITCHING_H
9 #define IMPISD_SWITCHING_H
11 #include <IMP/isd/isd_config.h>
18 IMPISD_BEGIN_NAMESPACE
30 if (!Nuisance::particle_is_instance(p))
31 Nuisance::setup_particle(p,switching);
37 static bool particle_is_instance(
Particle *p) {
38 return Nuisance::particle_is_instance(p) &&
Nuisance(p).get_lower()>=0
42 Float get_switching()
const {
46 void set_switching(
Float d) { set_nuisance(d); }
50 add_to_nuisance_derivative(d, accum);
53 Float get_switching_derivative()
const
55 return get_nuisance_derivative();
58 static FloatKey get_switching_key() {
return get_nuisance_key(); }
60 bool get_switching_is_optimized()
const
62 return get_nuisance_is_optimized();
65 void set_switching_is_optimized(
bool val)
67 set_nuisance_is_optimized(val);