simbox_m Module

Implements a simulation box with appropriate boundary conditions.


Uses

  • module~~simbox_m~~UsesGraph module~simbox_m simbox_m module~constants_m constants_m module~simbox_m->module~constants_m module~random_m random_m module~simbox_m->module~random_m iso_fortran_env iso_fortran_env module~constants_m->iso_fortran_env module~random_m->module~constants_m mkl_vsl_type mkl_vsl_type module~random_m->mkl_vsl_type mkl_vsl mkl_vsl module~random_m->mkl_vsl

Used by

  • module~~simbox_m~~UsedByGraph module~simbox_m simbox_m module~setup_m setup_m module~setup_m->module~simbox_m module~config_io_m config_io_m module~setup_m->module~config_io_m module~stats_m stats_m module~setup_m->module~stats_m module~interaction_m interaction_m module~setup_m->module~interaction_m module~bd_solver_m bd_solver_m module~setup_m->module~bd_solver_m module~pairtab_m pairtab_m module~pairtab_m->module~simbox_m module~cell_list_m cell_list_m module~pairtab_m->module~cell_list_m module~config_io_m->module~simbox_m module~cell_list_m->module~simbox_m module~stats_m->module~simbox_m module~interaction_m->module~simbox_m module~interaction_m->module~pairtab_m module~interaction_m->module~stats_m module~bd_solver_m->module~config_io_m module~bd_solver_m->module~stats_m module~bd_solver_m->module~interaction_m program~main main program~main->module~setup_m

Contents


Derived Types

type, public :: smbx_t

Components

TypeVisibility AttributesNameInitial
integer, public :: imcon
real(kind=rp), public, dimension(3,3):: basis
real(kind=rp), public, dimension(3,3):: dl_basis
real(kind=rp), public :: volume
logical, public :: is_deforming
logical, public :: is_aligned

Whether the basis vectors are aligned with the laboratory frame

Type-Bound Procedures

procedure, public :: init => smbx_init
procedure, public :: set_basis => smbx_set_basis
procedure, public :: freeze => smbx_freeze
procedure, public :: unfreeze => smbx_unfreeze
procedure, public :: get_image => smbx_get_image
procedure, public :: wrap_all => smbx_wrap_all
procedure, public :: to_center => smbx_to_center
procedure, public :: to_origin => smbx_to_origin
procedure, public :: get_rnd_points => smbx_get_rnd_points

Subroutines

public subroutine smbx_init(this, imcon)

Initializes an instance of smbx_t. Can also be called to reset.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(out) :: this

An instance of smbx_t.

integer, intent(in) :: imcon

Flag specifying boundary conditions on the simulation box.

Read more…

public subroutine smbx_set_basis(this, bv)

Sets all three basis vectors.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(inout) :: this
real(kind=rp), intent(in), dimension(3,3):: bv

public subroutine smbx_freeze(this)

Specifies this as non-deforming.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(inout) :: this

public subroutine smbx_unfreeze(this)

Specifies this as deforming.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(inout) :: this

public subroutine smbx_get_image(this, r)

Returns the image of r under PBC.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(in) :: this
real(kind=rp), intent(inout), dimension(3):: r

public subroutine smbx_wrap_all(this, coords)

Wraps atom positions w.r.t. periodic boundary conditions.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(in) :: this
real(kind=rp), intent(inout), dimension(:,:):: coords

public subroutine smbx_to_center(this, coords, com)

Adjusts atom positions such that the c.o.m. of the atoms is at the center of the box. Assumes all atoms to have the same mass and aligned axis. Optionally returns the original c.o.m.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(in) :: this
real(kind=rp), intent(inout), dimension(:,:):: coords
real(kind=rp), intent(out), optional dimension(3):: com

public subroutine smbx_to_origin(this, coords, com)

Adjusts atom positions such that the c.o.m. of the atoms is at the origin. Assumes all atoms to have the same mass and aligned axis. Optionally returns the original c.o.m.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(in) :: this
real(kind=rp), intent(inout), dimension(:,:):: coords
real(kind=rp), intent(out), optional dimension(3):: com

public subroutine smbx_get_rnd_points(this, coords)

Returns uniformly distributed points within the box.

Arguments

Type IntentOptional AttributesName
class(smbx_t), intent(in) :: this
real(kind=rp), intent(out), dimension(:,:):: coords