ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
Defines | Functions | Variables
statistics_tcl.c File Reference
#include <tcl.h>
#include <stdlib.h>
#include <string.h>
#include "utils.h"
#include "statistics.h"
#include "statistics_chain_tcl.h"
#include "statistics_molecule.h"
#include "statistics_cluster_tcl.h"
#include "statistics_fluid_tcl.h"
#include "statistics_wallstuff_tcl.h"
#include "energy.h"
#include "modes.h"
#include "pressure_tcl.h"
#include "communication.h"
#include "grid.h"
#include "parser.h"
#include "particle_data.h"
#include "interaction_data.h"
#include "domain_decomposition.h"
#include "verlet.h"
#include "lb.h"
#include "virtual_sites_com_tcl.h"
#include "initialize.h"
Include dependency graph for statistics_tcl.c:

Go to the source code of this file.

Defines

#define REGISTER_ANALYZE_OPTION(name, parser)   else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)
#define REGISTER_ANALYZE_STORAGE(name, parser)   else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)
#define REGISTER_ANALYSIS(name, parser)   else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)
#define REGISTER_ANALYSIS_W_ARG(name, parser, arg)   else if (ARG1_IS_S(name)) err = parser(interp, arg, argc - 2, argv + 2)

Functions

int tclcommand_analyze_parse_set (Tcl_Interp *interp, int argc, char **argv)
 Set the topology.
int tclcommand_analyze_parse_and_print_energy (Tcl_Interp *interp, int argc, char **argv)
 write out energy.
static int tclcommand_analyze_parse_reference_point (Tcl_Interp *interp, int *argc, char ***argv, double pos[3], int *pid)
 Parses a reference point, i.e.
void tclcommand_analyze_print_vel_distr (Tcl_Interp *interp, int type, int bins, double given_max)
static int tclcommand_analyze_parse_get_folded_positions (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_get_lipid_orients (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_modes2d (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_bilayer_set (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_radial_density_map (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_bilayer_density_profile (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_lipid_orient_order (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_aggregation (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_mindist (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_centermass (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_angularmomentum (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_cluster_size_dist (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_momentofinertiamatrix (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_gyration_tensor (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_find_principal_axis (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_nbhood (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_distto (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_cell_gpb (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_Vkappa (Tcl_Interp *interp, int argc, char **argv)
 Has something to do with computing compressibility from volume fluctuations.
static int tclcommand_analyze_parse_distribution (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_vel_distr (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_rdf (Tcl_Interp *interp, int average, int argc, char **argv)
int tclcommand_analyze_parse_structurefactor (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_density_profile_av (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_diffusion_profile (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_vanhove (Tcl_Interp *interp, int argc, char **argv)
int tclcommand_analyze_current (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_append (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_push (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_replace (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_remove (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_stored (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_configs (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_activate (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_mol (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_and_print_momentum (Tcl_Interp *interp, int argc, char **argv)
static int acf_parse_init (Tcl_Interp *interp, int argc, char **argv, int slot_num)
 EXPERIMENTAL [uschille].
static int acf_parse_append (Tcl_Interp *interp, int argc, char **argv, int slot_num)
 EXPERIMENTAL [uschille].
static int acf_print (Tcl_Interp *interp, int slot_num)
int acf_cmd (ClientData data, Tcl_Interp *interp, int argc, char **argv)
 EXPERIMENTAL [uschille].
double tclcommand_analyze_print_MSD (Tcl_Interp *interp, int type_m, int n_time_steps, int n_conf)
 return the approx diffusion constant of a special type of particle FIXME: this is not a smart way to compute D (very error-prone)!
static int tclcommand_analyze_parse_and_print_dipole (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_MSD (Tcl_Interp *interp, int argc, char **argv)
static int tclcommand_analyze_parse_and_print_energy_kinetic (Tcl_Interp *interp, int argc, char **argv)
int tclcommand_analyze (ClientData data, Tcl_Interp *interp, int argc, char **argv)
 Implements the Tcl command tclcommand_analyze.

Variables

Vkappa_struct Vkappa = { 0.0, 0.0, 0.0 }

Define Documentation

#define REGISTER_ANALYSIS (   name,
  parser 
)    else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)

Referenced by tclcommand_analyze().

#define REGISTER_ANALYSIS_W_ARG (   name,
  parser,
  arg 
)    else if (ARG1_IS_S(name)) err = parser(interp, arg, argc - 2, argv + 2)

Referenced by tclcommand_analyze().

#define REGISTER_ANALYZE_OPTION (   name,
  parser 
)    else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)

Referenced by tclcommand_analyze().

#define REGISTER_ANALYZE_STORAGE (   name,
  parser 
)    else if (ARG1_IS_S(name)) err = parser(interp, argc - 2, argv + 2)

Referenced by tclcommand_analyze().


Function Documentation

int acf_cmd ( ClientData  data,
Tcl_Interp *  interp,
int  argc,
char **  argv 
)

EXPERIMENTAL [uschille].

Definition at line 2174 of file statistics_tcl.c.

References acf_parse_append(), acf_parse_init(), acf_print(), ARG1_IS_I, ARG_IS_S, and err.

static int acf_parse_append ( Tcl_Interp *  interp,
int  argc,
char **  argv,
int  slot_num 
) [static]

EXPERIMENTAL [uschille].

Definition at line 2165 of file statistics_tcl.c.

Referenced by acf_cmd().

static int acf_parse_init ( Tcl_Interp *  interp,
int  argc,
char **  argv,
int  slot_num 
) [static]

EXPERIMENTAL [uschille].

Definition at line 2159 of file statistics_tcl.c.

Referenced by acf_cmd().

static int acf_print ( Tcl_Interp *  interp,
int  slot_num 
) [static]

Definition at line 2169 of file statistics_tcl.c.

Referenced by acf_cmd().

int tclcommand_analyze ( ClientData  data,
Tcl_Interp *  interp,
int  argc,
char **  argv 
)

Implements the Tcl command tclcommand_analyze.

This allows for basic system analysis, both online and offline.

Definition at line 2397 of file statistics_tcl.c.

References err, gather_runtime_errors(), REGISTER_ANALYSIS, REGISTER_ANALYSIS_W_ARG, REGISTER_ANALYZE_OPTION, REGISTER_ANALYZE_STORAGE, tclcommand_analyze_current(), tclcommand_analyze_parse_activate(), tclcommand_analyze_parse_aggregation(), tclcommand_analyze_parse_and_print_check_mol(), tclcommand_analyze_parse_and_print_dipmom_mol(), tclcommand_analyze_parse_and_print_dipole(), tclcommand_analyze_parse_and_print_energy(), tclcommand_analyze_parse_and_print_energy_kinetic(), tclcommand_analyze_parse_and_print_energy_kinetic_mol(), tclcommand_analyze_parse_and_print_momentum(), tclcommand_analyze_parse_and_print_p_IK1(), tclcommand_analyze_parse_and_print_pressure(), tclcommand_analyze_parse_and_print_pressure_mol(), tclcommand_analyze_parse_and_print_stress_tensor(), tclcommand_analyze_parse_angularmomentum(), tclcommand_analyze_parse_append(), tclcommand_analyze_parse_bilayer_density_profile(), tclcommand_analyze_parse_bilayer_set(), tclcommand_analyze_parse_bins(), tclcommand_analyze_parse_bond_dist(), tclcommand_analyze_parse_bond_l(), tclcommand_analyze_parse_cell_gpb(), tclcommand_analyze_parse_centermass(), tclcommand_analyze_parse_cluster_size_dist(), tclcommand_analyze_parse_configs(), tclcommand_analyze_parse_cwvac(), tclcommand_analyze_parse_density_profile_av(), tclcommand_analyze_parse_diffusion_profile(), tclcommand_analyze_parse_distribution(), tclcommand_analyze_parse_distto(), tclcommand_analyze_parse_find_principal_axis(), tclcommand_analyze_parse_fluid(), tclcommand_analyze_parse_formfactor(), tclcommand_analyze_parse_g123(), tclcommand_analyze_parse_g_av(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_get_lipid_orients(), tclcommand_analyze_parse_gyration_tensor(), tclcommand_analyze_parse_holes(), tclcommand_analyze_parse_internal_dist(), tclcommand_analyze_parse_lipid_orient_order(), tclcommand_analyze_parse_local_stress_tensor(), tclcommand_analyze_parse_mindist(), tclcommand_analyze_parse_modes2d(), tclcommand_analyze_parse_mol(), tclcommand_analyze_parse_momentofinertiamatrix(), tclcommand_analyze_parse_MSD(), tclcommand_analyze_parse_nbhood(), tclcommand_analyze_parse_necklace(), tclcommand_analyze_parse_push(), tclcommand_analyze_parse_radial_density_map(), tclcommand_analyze_parse_rdf(), tclcommand_analyze_parse_rdfchain(), tclcommand_analyze_parse_re(), tclcommand_analyze_parse_remove(), tclcommand_analyze_parse_replace(), tclcommand_analyze_parse_rg(), tclcommand_analyze_parse_rh(), tclcommand_analyze_parse_set(), tclcommand_analyze_parse_stored(), tclcommand_analyze_parse_structurefactor(), tclcommand_analyze_parse_vanhove(), tclcommand_analyze_parse_vel_distr(), tclcommand_analyze_parse_Vkappa(), and tclcommand_analyze_wallstuff().

Referenced by register_tcl_commands().

int tclcommand_analyze_current ( Tcl_Interp *  interp,
int  argc,
char **  argv 
)
static int tclcommand_analyze_parse_activate ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_aggregation ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_and_print_dipole ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
int tclcommand_analyze_parse_and_print_energy ( Tcl_Interp *  interp,
int  argc,
char **  argv 
)
static int tclcommand_analyze_parse_and_print_energy_kinetic ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_and_print_momentum ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 2125 of file statistics_tcl.c.

References ARG0_IS_S, momentum(), momentum_calc(), and mpi_gather_stats().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_angularmomentum ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 939 of file statistics_tcl.c.

References angularmomentum(), and ARG0_IS_I.

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_append ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1885 of file statistics_tcl.c.

References analyze_append(), n_configs, n_part_conf, n_total_particles, and sortPartCfg().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_bilayer_density_profile ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_bilayer_set ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_cell_gpb ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1260 of file statistics_tcl.c.

References ARG_IS_D, ARG_IS_I, and calc_cell_gpb().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_centermass ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 913 of file statistics_tcl.c.

References ARG0_IS_I, and centermass().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_cluster_size_dist ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_configs ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1995 of file statistics_tcl.c.

References analyze_configs(), ARG0_IS_I, ARG_IS_D, configs, free, i, malloc, n_configs, and n_part_conf.

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_density_profile_av ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1636 of file statistics_tcl.c.

References ARG0_IS_I, ARG1_IS_D, box_l, density_profile_av(), free, i, malloc, n_configs, and sortPartCfg().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_diffusion_profile ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1704 of file statistics_tcl.c.

References ARG0_IS_D, ARG0_IS_I, ARG1_IS_D, box_l, calc_diffusion_profile(), free, i, malloc, and sortPartCfg().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_distribution ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_distto ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_find_principal_axis ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_get_folded_positions ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_get_lipid_orients ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_gyration_tensor ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1070 of file statistics_tcl.c.

References ARG0_IS_I, calc_gyration_tensor(), free, and n_particle_types.

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_lipid_orient_order ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 703 of file statistics_tcl.c.

References ARG0_IS_S, free, i, malloc, n_molecules, n_total_particles, and orient_order().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_mindist ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_modes2d ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_mol ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 2067 of file statistics_tcl.c.

References ARG0_IS_I, ARG0_IS_S, Molecule::fav, Molecule::favcounter, i, n_molecules, and topology.

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_momentofinertiamatrix ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1043 of file statistics_tcl.c.

References ARG0_IS_I, and momentofinertiamatrix().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_MSD ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 2311 of file statistics_tcl.c.

References ARG0_IS_I, ARG1_IS_I, n_configs, and tclcommand_analyze_print_MSD().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_nbhood ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_push ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_radial_density_map ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_rdf ( Tcl_Interp *  interp,
int  average,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_reference_point ( Tcl_Interp *  interp,
int *  argc,
char ***  argv,
double  pos[3],
int *  pid 
) [static]

Parses a reference point, i.e.

either three doubles representing a position, or a particle id.

Definition at line 75 of file statistics_tcl.c.

References free_particle(), get_particle_data(), ParticlePosition::p, and Particle::r.

Referenced by tclcommand_analyze_parse_distto(), and tclcommand_analyze_parse_nbhood().

static int tclcommand_analyze_parse_remove ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1957 of file statistics_tcl.c.

References analyze_remove(), ARG0_IS_I, i, n_configs, and sortPartCfg().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_replace ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
int tclcommand_analyze_parse_set ( Tcl_Interp *  interp,
int  argc,
char **  argv 
)
static int tclcommand_analyze_parse_stored ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1981 of file statistics_tcl.c.

References n_configs.

Referenced by tclcommand_analyze().

int tclcommand_analyze_parse_structurefactor ( Tcl_Interp *  interp,
int  argc,
char **  argv 
)

Definition at line 1604 of file statistics_tcl.c.

References ARG0_IS_I, ARG1_IS_I, box_l, calc_structurefactor(), free, i, PI, updatePartCfg(), and WITHOUT_BONDS.

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_vanhove ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Definition at line 1763 of file statistics_tcl.c.

References ARG0_IS_D, ARG0_IS_I, calc_vanhove(), free, i, malloc, n_configs, and sortPartCfg().

Referenced by tclcommand_analyze().

static int tclcommand_analyze_parse_vel_distr ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]
static int tclcommand_analyze_parse_Vkappa ( Tcl_Interp *  interp,
int  argc,
char **  argv 
) [static]

Has something to do with computing compressibility from volume fluctuations.

Docs missing.

Definition at line 1310 of file statistics_tcl.c.

References ARG0_IS_S, ARG_IS_D, box_l, SQR(), and Vkappa.

Referenced by tclcommand_analyze().

double tclcommand_analyze_print_MSD ( Tcl_Interp *  interp,
int  type_m,
int  n_time_steps,
int  n_conf 
)

return the approx diffusion constant of a special type of particle FIXME: this is not a smart way to compute D (very error-prone)!

Parameters:
interpTCL interpreter handle
type_mtype of the particle, -1 for all
n_time_stepsnumber of timestep between saved configurations
n_confnumber of saved contributions taken into account

Definition at line 2216 of file statistics_tcl.c.

References centermass_conf(), configs, distance2(), i, n_configs, n_total_particles, partCfg, sortPartCfg(), and time_step.

Referenced by tclcommand_analyze_parse_MSD().

void tclcommand_analyze_print_vel_distr ( Tcl_Interp *  interp,
int  type,
int  bins,
double  given_max 
)

Variable Documentation

Vkappa_struct Vkappa = { 0.0, 0.0, 0.0 }

Definition at line 64 of file statistics_tcl.c.

Referenced by tclcommand_analyze_parse_Vkappa().