m_trajectory Module


Uses

  • module~~m_trajectory~~UsesGraph module~m_trajectory m_trajectory module~m_precision m_precision module~m_trajectory->module~m_precision iso_fortran_env iso_fortran_env module~m_precision->iso_fortran_env

Used by

  • module~~m_trajectory~~UsedByGraph module~m_trajectory m_trajectory module~m_globals m_globals module~m_globals->module~m_trajectory module~m_config_io m_config_io module~m_config_io->module~m_globals module~m_control_io m_control_io module~m_control_io->module~m_globals module~m_interaction m_interaction module~m_interaction->module~m_globals module~m_nbr_lists m_nbr_lists module~m_interaction->module~m_nbr_lists module~m_mc_moves m_mc_moves module~m_mc_moves->module~m_globals module~m_mc_moves->module~m_interaction module~m_mc_moves->module~m_nbr_lists module~m_mc_solver m_mc_solver module~m_mc_solver->module~m_globals module~m_mc_solver->module~m_config_io module~m_mc_solver->module~m_interaction module~m_mc_solver->module~m_mc_moves module~m_mc_solver->module~m_nbr_lists module~m_stats_io m_stats_io module~m_mc_solver->module~m_stats_io module~m_nbr_lists->module~m_globals module~m_setup m_setup module~m_setup->module~m_globals module~m_setup->module~m_config_io module~m_setup->module~m_interaction module~m_setup->module~m_mc_solver module~m_setup->module~m_stats_io module~m_stats_io->module~m_globals program~main main program~main->module~m_globals program~main->module~m_control_io program~main->module~m_mc_solver program~main->module~m_setup

Derived Types

type, public ::  trajectory_t

Components

Type Visibility Attributes Name Initial
integer, public :: frame_size = 0
integer, public :: header_size = 0
integer, public :: num_frames = 0
character(len=:), public, allocatable :: fn
integer, public :: file_id = 0
logical, public :: isopen = .false.

Type-Bound Procedures

procedure, public :: create => traj_create
procedure, public :: open => traj_open
procedure, public :: clear => traj_clear
procedure, public :: close => traj_close
procedure, public :: read => traj_read
procedure, public :: append_frame => traj_append_frame
procedure, public :: write_frame => traj_write_frame
generic, public :: init => create, open

Subroutines

public subroutine traj_create(this, fn, na)

Creates a trajectory_t object with a new underlying file named fn. If fn already exists, it will be truncated. The file fn is opened for both reading and writing.

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(out) :: this
character(len=*), intent(in) :: fn
integer, intent(in) :: na

public subroutine traj_open(this, fn, mode)

Creates a trajectory_t object with a prexisting underlying file named fn. If fn does not exist, an error will be generated. If mode == 'rw', the file fn is opened for both reading and writing. If mode == 'r', the file fn is opened only for reading.

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(out) :: this
character(len=*), intent(in) :: fn
character(len=*), intent(in) :: mode

public subroutine traj_clear(this)

After a call to this subroutine, all memory within this is deallocated, all components of this are reset to zero, and the underlying file is closed (if open).

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(inout) :: this

public subroutine traj_close(this)

Closes the underlying file of a trajectory_t.

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(inout) :: this

public subroutine traj_read(this, ver, iframe, istage, nblks, nts, coordinates, ierr)

Read from an open trajectory.

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(in) :: this
integer, intent(in) :: ver

Trajectory file version. 0: brushpak-0.5, 1: mcpak-0.1, 2: mcpak-0.2

integer, intent(in) :: iframe
integer, intent(out) :: istage
integer, intent(out) :: nblks
integer, intent(out) :: nts
real(kind=rp), intent(out), dimension(:,:) :: coordinates
integer, intent(out) :: ierr

public subroutine traj_append_frame(this, nblks, coordinates)

Write a frame to an open trajectory

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(inout) :: this
integer, intent(in) :: nblks
real(kind=rp), intent(in), dimension(:,:) :: coordinates

public subroutine traj_write_frame(this, iframe, nblks, coordinates)

Write a frame to an open trajectory

Arguments

Type IntentOptional Attributes Name
class(trajectory_t), intent(inout) :: this
integer, intent(in) :: iframe
integer, intent(in) :: nblks
real(kind=rp), intent(in), dimension(:,:) :: coordinates