crystal_coordinates


crystal_coordinates, a Fortran90 code 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 (FCC) 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.

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.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

crystal_coordinates is available in a Fortran90 version.

Related Programs:

crystal_coordinates_test

md1, a Fortran90 code which is a molecular dynamics simulation program.

md2, a Fortran90 code which is a molecular dynamics simulation program.

md3, a Fortran90 code which is a molecular dynamics simulation program.

md3glue, a Fortran90 code which is a molecular dynamics simulation program.

mdbnch, a Fortran77 code which carries out a molecular dynamics benchmark.

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

xyz_display_opengl, a C++ code 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
  3. Dennis Rapaport,
    The Art of Molecular Dynamics Simulation,
    Cambridge University Press, 2004,
    ISBN: 0521825687.

Source Code:


Last revised on 16 June 2024.