/* []----------------------------------------[] | SteepestDescent.h | []----------------------------------------[] | | | AUTHOR: MFSomers 2005. | | USE: Defines a conformation | | searcher using steepest | | descent method... | | | []----------------------------------------[] */ // Copyright (C) 2005 M.F. Somers, Theoretical Chemistry Department, Leiden University // // This is free software; you can redistribute it and/or modify it under the terms of // the GNU Lesser General Public License as published by the Free Software Foundation. // // http://www.gnu.org/licenses/lgpl.txt #if !defined(__STEEPEST_DESCENT_INCLUDED__) #define __STEEPEST_DESCENT_INCLUDED__ #include "Global.h" #include "Vector.h" #include "Constants.h" #include "ClassicalDynamics.h" #include "DistanceConstraint.h" /* --------------------------------------------------------- */ class SteepestDescent; typedef SteepestDescent *SteepestDescentPointer; class SteepestDescent : public ClassicalStates { public: SteepestDescent( unsigned int TheId = GET_NEW_ID ) : ClassicalStates( 2, TheId ) { Type = SteepestDescentMinimizer; }; SteepestDescent( SteepestDescent& D ) : ClassicalStates( D ) { }; virtual SteepestDescent& operator=( SteepestDescent& D ) { if( &D == &(*this) ) return( (*this) ); ClassicalStates::operator=( D ); return( (*this) ); }; virtual SteepestDescentPointer Clone() { return( new SteepestDescent( (*this) ) ); } virtual SteepestDescentPointer Create( unsigned int TheId = GET_NEW_ID ) { return( new SteepestDescent( TheId ) ); } virtual ParticleListPointer GetFinalStateParticlesPointer( void ) { return( GetStateParticlesPointer( 1 ) ); } virtual InteractionListPointer GetFinalStateInteractionsPointer( void ) { return( GetStateInteractionsPointer( 1 ) ); } virtual double RelativeTotalInteractionPotentialChange( void ); virtual int StepSteepestDescent( double StepSize, ConstraintListPointer Constraints = NULL ); virtual int FindMinima( int MaxSteps, double MaxStepSize, double Accuracy = CONST_EPSILON, ConstraintListPointer Constraints = NULL ); }; /* --------------------------------------------------------- */ #endif