Code: Linux version and
HP-UX version
In the code: Change the boolean flags
In the code:
Change There will always some numerical error no matter how small the steplength
was chosen to be or how (relatively) accurate the algorithm was devised to
be. (We are not hearing a lot of complaints from the molecular simulations
community about this problem.
Because statistic mechanics is fault tolerant, this problem is not
very pressing for molecular dynamics simulations with interests in statistical
results instead of individual dynamics. CHARMm's temperature control by use
of rescaling or reassigning of velocities is a rough approach, so nothing
should be conserved or maintained. But if one uses constraint methods or the
Nose-Hoover thermostat, the integration accuracy should be checked.) In
electron transfer dynamics, it is important not to violate the conservation
law too much, since we are simulating individual processes and the
accuracy of the conclusions
will be drawn on the basis of that of these individual processes.
Because of this consideration, we impose a rescaling scheme that rectifies
the population distribution once the violation of conservation law reaches
some sort of tolerance. This rescaling procedure will renormalize the
orbital populations from time to time, hence (hopefully) diligently prevent
the numerical error from propogating.
Quantum mechanics requires that
the integration algorithm should also be time reversible. But this
is not strictly needed in our simulations.
In the code: To know what is saved, @See
In our program, the intermediate Hamiltonian matrix elments
are obtained by using the cubic spline interpolation method
(see subroutine
Because we have used SHAKE to constrain the bondlengths of the covalent
bonds that involve hydrogen atoms in the MD simulations for azurin
(therefore actually remove motion of the highest frequency), the choice of the
interpolation interval, i.e. the MD time steplength, makes missing the
fastest MD motion of the protein less likely.
The spline interpolation method has essentially a boundary problem
with respect to where the starting point is to determine the
intermediate Hamiltonian matrix elements inside a given interval.
We know that the cubic spline interpolation coefficients are decided
based on the three nearest neighboring discrete points. Let's say we
have four discrete points: 1, 2, 3, 4. Let's first set the starting point
at point 1, we have a set of spline coefficents for the intervals
[1,2), [2,3) and [3,4). Now, let's select point 2 as the starting
point, we will have another set of spline coefficents for the intervals
[2,3)' and [3,4)' (prime for distinguishing the two resulting interpolated
Hamiltonian time series). We know [3,4)=[3,4)', but [2,3)'!=[2,3),
because the basis for determining the spline coefficents has been changed.
Here is a postscript picture
about how much the deviation is. In order to avoid this problem,
the program always reads the Hamiltonian at a step prior to the actual
ED starting time just for guaranteeing the agreement of interpolation
in the joint area between the present segment and the previous one.
(see © 2000, Qian Xie
Choose an integrator
In the program we offer two choices for integrating the time-dependent
Schroedinger equation:
Both methods have been well tested and are proven numerically stable.
The Runge-Kutta method is widely used, but we found that the
predictor-corrector method is slightly faster.
ruku
and
gear
. @See
Considerations on integration steplength
Of the most importance, integration of the Schroedinger equation
of motion should satisfy the conservation law of particle population.
If the steplength is too big, the conservation law will be violated,
and one will observe the number of particles flies off rapidly.
(The program will exit in such a situation.)
If the steplength is too short,
it will take too long time to finish a simulation job of certain time
length.
The magnitude of the Hamiltonian matrix elements is the factor that
dictates the steplength of integration. Therefore, there is not much
we can do to change the steplength, which should be 0.001~0.005 femtosecond,
according to our experience.
nstep
to change the integration steplength,
which is then obtained by the total MD time of this segment
divided by it. @See
Saving a restart file
A new run can either start from scratch or continue with a saved
state of the system. Before exiting, the program always saves
a status file: SAVE.CONT
for NXN and
SAVE2S.CONT
for 2X2. When invoking a new run, it
will ask for a command whether to continue from a previous state.
If the answer is yes, it will read the wave function information
stored in the above restart files and continue the simulation
from that breaking point.
save(n,time,dotsa)
readrst(n,time0,psi0,dotsa)
saverkns(n,time,psi,dotsa)
readrkns(n,time0,psi0,dotsa)
Interpolation between adjacent Hamiltonians
The integration steplength for the Schroedinger equation
has to be of the magnitude of 0.001 femtosecond, whereas the
time step of MD simulations is normally 1~2 femtoseconds. It
is apparently not possible to compute the Hamiltonian time series
every 0.001 femtosecond, because it will take almost forever to
complete MD and BONDO calculations for a time series with the
total length of a few nanoseconds. But the Hamiltonian matrix
elements at arbitary time have to be obtained from interpolating
between the known ones, in order to integrate the Schroedinger
equation.
interpol(nstp,ndim,tmd,h,cof)
in util.f
,
where nstp
is the number of discret input points, ndim
is the dimension of the matrix to be interpolated h
,
cof
is the array that stores the cubic spline coefficients).
An interpolation coefficients table (the array cof
)
is prepared before integrating
the equation of motion, and used in the integration procedure.
nstp0
in hamiltonian.f.)
Propogation on the nonorthogonal basis
Electronic dynamics on nonorthogonal basis is usually more time-consuming,
and less accurate, because much more times of matrix multiplications
(due to the S matrix) are performed in such calculations (hence
undoubtedly leading to more numerical errors).
See the section Extended-Huckel calculation
for the subroutines.