/* []----------------------------------------[] | Rydberg.h | []----------------------------------------[] | | | AUTHOR: MFSomers 2005. | | USE: Defines a Rydberg type | | interaction... | | | []----------------------------------------[] */ // 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(__RYDBERG_INCLUDED__) #define __RYDBERG_INCLUDED__ #include "Global.h" #include "Vector.h" #include "Constants.h" #include "ClassicalDynamics.h" #include "PointPair.h" /* --------------------------------------------------------- */ /* Defines a Rydberg pointpair interaction between particles */ class RydbergInteraction; typedef RydbergInteraction *RydbergInteractionPointer; class RydbergInteraction : public PointPairInteraction { public: inline RydbergInteraction( double TheD, double TheR, double TheA1, double TheA2, double TheA3, double TheGamma, unsigned int TheId = GET_NEW_ID, Vector *UsePeriodicBox = NULL ) : PointPairInteraction( TheId, UsePeriodicBox ) { D = TheD; R = TheR; Gamma = TheGamma; A1 = TheA1; A2 = TheA2; A3 = TheA3; Type = ARydbergInteraction; } inline RydbergInteraction( RydbergInteraction& I ) : PointPairInteraction( I ) { D = I.D; R = I.R; Gamma = I.Gamma; A1 = I.A1; A2 = I.A2; A3 = I.A3; } virtual RydbergInteraction& operator=( RydbergInteraction& I ) { if( &I == &(*this) ) return( (*this) ); PointPairInteraction::operator=( I ); D = I.D; R = I.R; Gamma = I.Gamma; A1 = I.A1; A2 = I.A2; A3 = I.A3; return( (*this) ); } virtual RydbergInteractionPointer Clone() { return( new RydbergInteraction( (*this) ) ); } virtual RydbergInteractionPointer Create( double TheD = 1.0, double TheR = 1.0, double TheA1 = 1.0, double TheA2 = 1.0, double TheA3 = 1.0, double TheGamma = 1.0, unsigned int TheId = GET_NEW_ID, Vector *UsePeriodicBox = NULL ) { return( new RydbergInteraction( TheD, TheR, TheA1, TheA2, TheA3, TheGamma, TheId, UsePeriodicBox ) ); } virtual double PointPairPotential( Particle& P1, Particle& P2 ); virtual Vector PointPairForce( Particle& P1, Particle& P2 ); double D, R, A1, A2, A3, Gamma; /* V(r) = D-D*(1+A1*(r-R)+A2*(r-R)^2+A3*(r-R)^3)*EXP(-Gamma*(r-R)) */ }; /* --------------------------------------------------------- */ #endif