Basic Improvements
The following improvements were made:
- The random number generator is appended to the end of the coord.d
file. This ensures that after a restart, the same results are obtained
as if the code would not have been stopped.
- I gave control of flushing I/O back to the operating system.
- I set the third Nordsieck parameter from the forces if it is
undefined (i.e. all zero). This should reduce startup-transients.
- I write output for the initial state too, as you would normally like.
The program only did output after a step was taken.
- I added a, currently trivial, subroutine step_end_hook, which can be
used to perform desired custom output after each time step, or whatever.
- I also wrote the potential energy per atom out to output.d.
- I reduced the screen output frequency, but increased the amount of
info written to the screen.
- I put in smoothing of the cut-off in the rotational potential.
- I put in removal of the jump in the Lennard-Jones potential.
- The files are ready to run.
Files
Unzipping mdmod.zip will create a directory mdexe with the
following modified or new files:
- check_box.f
-
- Checks the box size to verify that atoms do not interact with more than
one periodic image of another atom. This would make the code misbehave.
- close.inc
-
- Added comments.
- Cleaned up.
- common_files.inc
-
- Ready to run, set directories appropriately.
- Added common_leon.inc. (See below.)
- common_leon.inc
-
- Common block for the random number generator data.
- coord_read_hook.f
-
- Restores the random number generator from the data written to coord.d
by coord_write_hook. (See below.)
- coord_write_hook.f
-
- Writes out the random number generator state at the end of the coord.d
file. This allows us to resume operation exactly where we left off.
- flush.f
-
- Created a trivial subroutine flush. Let the operating system do it.
- input.d
-
- Ready to run.
- Changed the comments a bit.
- main.f
-
- Added two parameter modification subroutines.
- Checked the periodic box size.
- Initialized Nordsieck parameter R2 from the forces if it was zero.
- Write out initial state too.
- Added a subroutine step_end_hook, which is currently trivial
but can be used to perform desired output after each time step.
- open.inc
-
- Added comments.
- Cleaned up.
- param_mod.f
-
- Change some key parameters more easily.
- parameters.inc
-
- No changes. It is just a file you want to have available for changing.
- random_numbers.f
-
- Added a link to setran_hook.f
- read_write.f
-
- Added a link to coord_read_hook to read_data.
- Wrote also the potential energy per atom out to output.d in write_data2.
- Reduced screen output frequency, increased info in write_data2.
- Added a link to coord_write_hook to write_data3.
- setin.f
-
- Changed the header printed in setmd to include potential energy.
- setr2.f
-
- In order to reduce startup transients, sets Nordsieck parameter R2 from
the forces if it is zero (which is what make_tube and chiral set it to.)
- setran_hook.f
-
- Restore random number generator from coord.d. This allows you to break
execution without affecting results.
- step_end-hook.f
-
- Currently blank subroutine. Use it to do custom output at the end of
time steps. Uncomment the include statement.
- subroutines.inc
-
- Ready to run: commented out stuff that was not used and set directories.
- Added new subroutines to the list.
Note: I initially wanted to create a version of main.f without
energy minimization and tight-binding, by making special crashing
subroutines minimize_bo.f and tight_bind_bo.f. But since the
executable was only 70 kb smaller, I concluded it was not worth it.
Return