Hawaii Hybrid
Loading...
Searching...
No Matches
trajectory.c File Reference
#include "trajectory.h"
Include dependency graph for trajectory.c:

Macros

#define TOLERANCE_FACTOR   1000

Functions

Trajectory init_trajectory (MoleculeSystem *ms, double reltol)
 init_trajectory initializes a Trajectory structure for propagating Hamilton's equations of motion for the provided molecule system. The trajectory will be configured with the specified with the specified relative tolerance for numerical integration. The returned Trajectory should be properly freed using free_trajectory after use to avoid memory leaks.
void free_trajectory (Trajectory *traj)
 free_trajectory
bool trajectory_apply_requantization (Trajectory *traj)
void trajectory_reinit (Trajectory *traj)
 free_trajectory
int make_step (Trajectory *traj, double tout, double *t)
 make_step Invokes the main function of CVode and, if enabled, applies requantization to the monomers' angular momenta. When the apply_requantization flag within the MoleculeSystem is set, * the momenta in qp are rescaled to adjust the angular momentum to the nearest half-integer or integer, according to the requantization rule which is represented within the Monomer type. Subsequently, the function synchronizes the internal trajectory phase-space vector with the MoleculeSystem's phase-space vector, and reinitializes the state of CVode to reset its state since a sudden change of phase-point has occured.
void set_initial_condition (Trajectory *traj, Array qp)
 set_initial_condition
N_Vector make_vector (int size)
 make_vector
void set_tolerance (Trajectory *traj, double tolerance)
 set_tolerance
void reinit_trajectory (Trajectory *traj, double t)

Macro Definition Documentation

◆ TOLERANCE_FACTOR

#define TOLERANCE_FACTOR   1000

Function Documentation

◆ free_trajectory()

void free_trajectory ( Trajectory * traj)

◆ init_trajectory()

Trajectory init_trajectory ( MoleculeSystem * ms,
double reltol )

init_trajectory initializes a Trajectory structure for propagating Hamilton's equations of motion for the provided molecule system. The trajectory will be configured with the specified with the specified relative tolerance for numerical integration. The returned Trajectory should be properly freed using free_trajectory after use to avoid memory leaks.

◆ make_step()

int make_step ( Trajectory * traj,
double tout,
double * t )

make_step Invokes the main function of CVode and, if enabled, applies requantization to the monomers' angular momenta. When the apply_requantization flag within the MoleculeSystem is set, * the momenta in qp are rescaled to adjust the angular momentum to the nearest half-integer or integer, according to the requantization rule which is represented within the Monomer type. Subsequently, the function synchronizes the internal trajectory phase-space vector with the MoleculeSystem's phase-space vector, and reinitializes the state of CVode to reset its state since a sudden change of phase-point has occured.

◆ make_vector()

N_Vector make_vector ( int size)

◆ reinit_trajectory()

void reinit_trajectory ( Trajectory * traj,
double t )

◆ set_initial_condition()

void set_initial_condition ( Trajectory * traj,
Array qp )

◆ set_tolerance()

void set_tolerance ( Trajectory * traj,
double tolerance )

◆ trajectory_apply_requantization()

bool trajectory_apply_requantization ( Trajectory * traj)

◆ trajectory_reinit()

void trajectory_reinit ( Trajectory * traj)