Go to the documentation of this file.
9 #ifndef BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
10 #define BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
12 #ifndef BALL_DATATYPE_OPTIONS_H
16 #ifndef BALL_MOLMEC_COMMON_GRADIENT_H
23 class SnapShotManager;
163 bool isValid()
const;
189 virtual bool specificSetup();
208 virtual bool isConverged()
const;
218 virtual double findStep();
224 virtual void updateDirection();
230 virtual double updateEnergy();
236 virtual void updateForces();
243 void storeGradientEnergy();
252 virtual void printEnergy()
const;
262 virtual void takeSnapShot()
const;
282 virtual void finishIteration();
286 Size getNumberOfIterations()
const;
302 double getEnergy()
const;
310 double getInitialEnergy()
const;
314 double& getInitialEnergy();
318 void setNumberOfIterations(
Size number_of_iterations);
322 Size getMaxNumberOfIterations()
const;
326 void setMaxNumberOfIterations(
Size number_of_iterations);
331 void setMaxSameEnergy(
Size number);
336 Size getMaxSameEnergy()
const;
340 void setEnergyOutputFrequency(
Size energy_output_frequency);
344 Size getEnergyOutputFrequency()
const;
348 void setEnergyDifferenceBound(
float energy_difference_bound);
352 float getEnergyDifferenceBound()
const;
357 void setMaxGradient(
float max_gradient);
362 float getMaxGradient()
const;
367 void setMaximumDisplacement(
float maximum_displacement);
371 float getMaximumDisplacement()
const;
375 void setSnapShotFrequency(
Size snapshot_frequency);
379 Size getSnapShotFrequency()
const;
387 Size getForceUpdateCounter()
const ;
391 Size getEnergyUpdateCounter()
const ;
404 virtual bool minimize(
Size steps = 0,
bool resume =
false);
408 void enableEnergyAbortCondition(
bool state);
411 bool energyAbortConditionEnabled()
const;
417 void setEnergyToAbort(
float value);
420 float getEnergyToAbort()
const;
425 bool wasAborted()
const ;
558 #endif // BALL_MOLMEC_MINIMIZATION_ENERGYMINIMIZER_H
static const char * MAX_SAME_ENERGY
static const char * ENERGY_OUTPUT_FREQUENCY
double energy_difference_bound_
Size energy_update_counter_
Size same_energy_counter_
static const char * MAXIMUM_DISPLACEMENT
static float MAXIMUM_DISPLACEMENT
static float MAX_GRADIENT
static const char * MAXIMAL_NUMBER_OF_ITERATIONS
static Size ENERGY_OUTPUT_FREQUENCY
static const char * SNAPSHOT_FREQUENCY
Size energy_output_frequency_
Size maximal_number_of_iterations_
static Size NUMBER_OF_ITERATION
static Size MAX_SAME_ENERGY
static Size MAXIMAL_NUMBER_OF_ITERATIONS
ForceField * force_field_
bool abort_by_energy_enabled_
static const char * ENERGY_DIFFERENCE_BOUND
static const char * NUMBER_OF_ITERATION
float maximum_displacement_
static const char * MAX_GRADIENT
BALL_EXPORT bool operator==(const String &s1, const String &s2)
static float ENERGY_DIFFERENCE_BOUND
static Size SNAPSHOT_FREQUENCY
Size number_of_iterations_
#define BALL_CREATE(name)
SnapShotManager * snapshot_
Size force_update_counter_