CRYSTAL_COORDINATES
Coordinates of a 3D "Slab" of points


CRYSTAL_COORDINATES is a FORTRAN90 program which generates the coordinates of a set of 4 * NX * NY * NZ points in a rectangular block of NX * NY * NZ cells, with face-centered cubic symmetry.

The user is allowed to specify the width of a cell, and the maximum magnitude of a random displacement of each point.

The coordinate data is written to a file that can be used for visualization, or more likely as the initial condition for the coordinates of molecules in a molecular dynamics simulation.

If the initial line of the output file is removed, the remainder becomes an "XYZ" file which can be plotted by several programs.

Usage:

crystal_coordinates
begins the program.

Inputs:

a
the lattice spacing, or cell width, in Angstroms.
nx
the number of cells in the X direction.
ny
the number of cells in the Y direction.
nz
the number of cells in the Z direction.
displac
the maximum magnitude of a random displacement applied to every node coordinate.
file_name
the name of the file into which the coordinate data is to be stored.

The output file has a single initial line of the form

        % F n x-width y-width z-width
      
where
n
is the number of points.
x-width, y-width, z-width
are the total widths of the slab in the X, Y and Z directions.
followed by n lines, each containing the (X,Y,Z) coordinates of a point.

Languages:

CRYSTAL_COORDINATES is available in a FORTRAN90 version.

Related Programs:

MD1, a FORTRAN90 program which is a molecular dynamics simulation program.

MD2, a FORTRAN90 program which is a molecular dynamics simulation program.

MD3, a FORTRAN90 program which is a molecular dynamics simulation program.

MD3GLUE, a FORTRAN90 program which is a molecular dynamics simulation program.

MDBNCH, a FORTRAN77 program which carries out a molecular dynamics benchmark.

XYZ_DISPLAY, a MATLAB program which reads XYZ information defining points in 3D, and displays an image in the MATLAB graphics window.

XYZ_DISPLAY_OPENGL, a C++ program which reads XYZ information defining points in 3D, and displays an image using OpenGL.

Reference:

  1. Matthew Allen, DJ Tildesley,
    Computer Simulation of Liquids,
    Oxford University Press, 1987,
    ISBN: 0198556454,
    LC: QC145.2.
  2. Furio Ercolessi,
    A Molecular Dynamics Primer,
    ercolessi.pdf
  3. Dennis Rapaport,
    The Art of Molecular Dynamics Simulation,
    Cambridge University Press, 2004,
    ISBN: 0521825687.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 17 October 2005.