/* []----------------------------------------[] | NewtonDynamics.h | []----------------------------------------[] | | | AUTHOR: MFSomers 2005. | | USE: Defines a classical | | dynamics framework class | | to be used for different | | integrators of the Newton | | equation of motion ... | | | []----------------------------------------[] */ // 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(__NEWTON_DYNAMICS_INCLUDED__) #define __NEWTON_DYNAMICS_INCLUDED__ #include "Global.h" #include "Vector.h" #include "Constants.h" #include "ClassicalDynamics.h" #include "DistanceConstraint.h" /* --------------------------------------------------------- */ class NewtonDynamics; typedef NewtonDynamics *NewtonDynamicsPointer; class NewtonDynamics : public ClassicalDynamics { public: NewtonDynamics( unsigned int TheId = GET_NEW_ID ) : ClassicalDynamics( 2, TheId ) { Type = NewtonClassicalDynamics; }; NewtonDynamics( NewtonDynamics& D ) : ClassicalDynamics( D ) { }; virtual NewtonDynamics& operator=( NewtonDynamics& D ) { if( &D == &(*this) ) return( (*this) ); ClassicalDynamics::operator=( D ); return( (*this) ); }; virtual NewtonDynamicsPointer Clone() { return( new NewtonDynamics( (*this) ) ); } virtual NewtonDynamicsPointer Create( unsigned int TheId = GET_NEW_ID ) { return( new NewtonDynamics( TheId ) ); } virtual int Integrator( double Step, double Start = 0.0, ConstraintListPointer Constraints = NULL ); virtual int IntegratorConservationCheck( double Step ); virtual int TrajectoryContinuationCheck( double At, double Step, int nStep, int nSteps ); virtual int RunTrajectory( double Start, double Step, int nSteps, ConstraintListPointer Constraints = NULL ); }; /* --------------------------------------------------------- */ #endif