We can think of the action of the operators in the factorization considered above in a different and very useful way with respect to developing code.
Looking at
we see that the action of the first operator on (x,p) can be regarded
as producing a new phase space vector (x',p'). The new values,
(x',p') can be thought of inputs to the next operator
which acts to produce a new phase space vector (x'',p''), which is
then the input to the last operator
.
This is summarized as follows:
Using the expressions for
and
, we find that this gives
Now, back substituting, we have
and
which reproduces the velocity Verlet method derived in the previous section.
The advantage of this approach is that we can now interpret each operator in a factorization as an independent update step on a phase space vector in which the output from the action of one operator is the input for the action of the next. Thus, once we know how the operators act, we may simply look at an operator factorization and create a set of update steps that can be turned into pseudocode or code.
To see how this works, we start by creating a dictionary of operators and their ``translations'' into update steps:
where
indicates that the quantity on the left is
``overwritten'' by the quantity on the right.
Thus, the operators in the factorization
can be ``directly translated'' into the set of update steps expressible in pseudocode as
where the symbol Dt designates the time step
. The reason the call
to a ``routine'' which gets the new force is needed after the position update
step is that the position changes there, and so must the force.