![]() |
ESPResSo 3.2.0-11-g9950804-git
Extensible Simulation Package for Soft Matter Research
|
This file contains everything related to particle storage. More...
#include <stdlib.h>#include <string.h>#include <math.h>#include <mpi.h>#include "utils.h"#include "particle_data.h"#include "global.h"#include "communication.h"#include "grid.h"#include "interaction_data.h"#include "integrate.h"#include "cells.h"#include "rotation.h"#include "virtual_sites.h"
Go to the source code of this file.
Defines | |
| #define | PART_INCREMENT 8 |
| granularity of the particle buffers in particles | |
| #define | REQ_SNDRCV_PART 0xaa |
| my magic MPI code for send/recv_particles | |
Functions | |
| int | try_delete_bond (Particle *part, int *bond) |
| Remove bond from particle if possible. | |
| void | try_delete_exclusion (Particle *part, int part2) |
| Remove exclusion from particle if possible. | |
| void | try_add_exclusion (Particle *part, int part2) |
| Insert an exclusion if not already set. | |
| void | auto_exclusion (int distance) |
| Automatically add the next <distance> neighbors in each molecule to the exclusion list. | |
| void | init_particle (Particle *part) |
| Initialize a particle. | |
| void | free_particle (Particle *part) |
| Deallocate the dynamic storage of a particle. | |
| void | updatePartCfg (int bonds_flag) |
| Get the complete unsorted informations on all particles into partCfg if something's changed. | |
| int | sortPartCfg () |
| sorts the partCfg array. | |
| void | freePartCfg () |
| release the partCfg array. | |
| void | realloc_local_particles (int part) |
| resize local_particles. | |
| static void | realloc_particle_node (int part) |
| resize particle_node. | |
| void | particle_invalidate_part_node () |
| Invalidate particle_node. | |
| void | build_particle_node () |
| Rebuild particle_node from scratch. | |
| void | init_particlelist (ParticleList *pList) |
| Initialize a particle list. | |
| int | realloc_particlelist (ParticleList *l, int size) |
| Allocate storage for local particles and ghosts. | |
| void | update_local_particles (ParticleList *pl) |
| Update the entries in local_particles for all particles in the list pl. | |
| Particle * | got_particle (ParticleList *l, int id) |
| Search for a specific particle. | |
| Particle * | append_unindexed_particle (ParticleList *l, Particle *part) |
| Append a particle at the end of a particle List. | |
| Particle * | append_indexed_particle (ParticleList *l, Particle *part) |
| Append a particle at the end of a particle List. | |
| Particle * | move_unindexed_particle (ParticleList *dl, ParticleList *sl, int i) |
| Remove a particle from one particle List and append it to another. | |
| Particle * | move_indexed_particle (ParticleList *dl, ParticleList *sl, int i) |
| Remove a particle from one particle List and append it to another. | |
| int | get_particle_data (int part, Particle *data) |
| Get particle data. | |
| int | place_particle (int part, double p[3]) |
| Call only on the master node. | |
| int | set_particle_v (int part, double v[3]) |
| Call only on the master node: set particle velocity. | |
| int | set_particle_f (int part, double F[3]) |
| Call only on the master node: set particle force. | |
| int | set_particle_mass (int part, double mass) |
| Call only on the master node: set particle mass. | |
| int | set_particle_rotational_inertia (int part, double rinertia[3]) |
| Call only on the master node: set particle rotational inertia. | |
| int | set_particle_rotation (int part, int rot) |
| Call only on the master node: Specifies whether a particle's rotational degrees of freedom are integrated or not. | |
| int | set_particle_dipm (int part, double dipm) |
| Call only on the master node: set particle dipole moment (absolut value). | |
| int | set_particle_dip (int part, double dip[3]) |
| Call only on the master node: set particle dipole orientation. | |
| int | set_particle_virtual (int part, int isVirtual) |
| Call only on the master node: set particle dipole moment (absolut value). | |
| int | set_particle_vs_relative (int part, int vs_relative_to, double vs_distance) |
| int | set_particle_q (int part, double q) |
| Call only on the master node: set particle charge. | |
| int | set_particle_mu_E (int part, double mu_E[3]) |
| Call only on the master node: set particle electrophoretic mobility. | |
| int | set_particle_type (int part, int type) |
| Call only on the master node: set particle type. | |
| int | set_particle_mol_id (int part, int mid) |
| Call only on the master node: set particle's molecule id. | |
| int | set_particle_quat (int part, double quat[4]) |
| Call only on the master node: set particle orientation using quaternions. | |
| int | set_particle_omega_lab (int part, double omega_lab[3]) |
| Call only on the master node: set particle angular velocity from lab frame. | |
| int | set_particle_omega_body (int part, double omega[3]) |
| Call only on the master node: set particle angular velocity in body frame. | |
| int | set_particle_torque_lab (int part, double torque_lab[3]) |
| Call only on the master node: set particle torque from lab frame. | |
| int | set_particle_torque_body (int part, double torque[3]) |
| Call only on the master node: set particle torque in body frame. | |
| int | set_particle_temperature (int part, double T) |
| Call only on the master node: set particle temperature. | |
| int | set_particle_gamma (int part, double gamma) |
| Call only on the master node: set particle frictional coefficient. | |
| int | set_particle_ext_torque (int part, int flag, double torque[3]) |
| Call only on the master node: set particle external torque. | |
| int | set_particle_ext_force (int part, int flag, double force[3]) |
| Call only on the master node: set particle external force. | |
| int | set_particle_fix (int part, int flag) |
| Call only on the master node: set coordinate axes for which the particles motion is fixed. | |
| int | change_particle_bond (int part, int *bond, int delete) |
| Call only on the master node: change particle bond. | |
| void | remove_all_particles () |
| remove all particles. | |
| int | remove_particle (int part) |
| remove particle with a given identity. | |
| void | local_remove_particle (int part) |
| Used by mpi_remove_particle, should not be used elsewhere. | |
| void | local_place_particle (int part, double p[3], int new) |
| Used by mpi_place_particle, should not be used elsewhere. | |
| void | local_remove_all_particles () |
| Used by mpi_remove_particle, should not be used elsewhere. | |
| void | local_rescale_particles (int dir, double scale) |
| Used by mpi_rescale_particles, should not be used elsewhere. | |
| void | added_particle (int part) |
| Used by mpi_place_particle, should not be used elsewhere. | |
| int | local_change_bond (int part, int *bond, int delete) |
| Used by mpi_send_bond, should not be used elsewhere. | |
| void | remove_all_bonds_to (int identity) |
| for all local particles, remove bonds incorporating the specified particle. | |
| void | local_change_exclusion (int part1, int part2, int delete) |
| Used for example by mpi_send_exclusion. | |
| void | send_particles (ParticleList *particles, int node) |
| Synchronous send of a particle buffer to another node. | |
| void | recv_particles (ParticleList *particles, int node) |
| Synchronous receive of a particle buffer from another node. | |
| void | add_partner (IntList *il, int i, int j, int distance) |
| int | change_exclusion (int part1, int part2, int delete) |
| Call only on the master node: change particle constraints. | |
| void | remove_all_exclusions () |
| remove all exclusions. | |
| int | init_gc (void) |
| linked list for particles of a given type | |
| int | init_type_array (int type) |
| init particle lists | |
| int | reallocate_type_array (int type) |
| resize the array for the list of ids for a certain type | |
| int | remove_id_type_array (int part_id, int type) |
| int | update_particle_array (int type) |
| int | reallocate_global_type_list (int size) |
| make more type_arrays available | |
| int | find_particle_type (int type, int *id) |
| int | find_particle_type_id (int type, int *id, int *in_id) |
| return an array with real particle id and the corresponding index of typelist | |
| int | delete_particle_of_type (int type) |
| delete one randomly chosen particle of given type returns ES_OK if succesful or else ES_ERROR | |
| int | add_particle_to_list (int part_id, int type) |
| int | gc_status (int type) |
| int | free_particle_lists (void) |
| free particle lists | |
| int | number_of_particles_with_type (int type, int *number) |
Variables | |
| int | max_seen_particle = -1 |
| Highest particle number seen so far. | |
| int | n_total_particles = 0 |
| total number of particles on all nodes. | |
| int | max_particle_node = 0 |
| Capacity of the particle_node / local_particles. | |
| int * | particle_node = NULL |
| Used only on master node: particle->node mapping. | |
| int | max_local_particles = 0 |
| Particle ** | local_particles = NULL |
| id->particle mapping on all nodes. | |
| Particle * | partCfg = NULL |
| Particles' current configuration. | |
| int | partCfgSorted = 0 |
| if non zero, partCfg is sorted by particle order, and the particles are stored consecutively starting with 0. | |
| IntList | partCfg_bl = { NULL, 0, 0 } |
| bondlist for partCfg, if bonds are needed | |
This file contains everything related to particle storage.
If you want to add a new property to the particles, it is probably a good idea to modify Particle to give scripts access to that property. You always have to modify two positions: first the print section, where you should add your new data at the end, and second the read section where you have to find a nice and short name for your property to appear in the Tcl code. Then you just parse your part out of argc and argv.
The corresponding header file is particle_data.h.
Definition in file particle_data.c.
| #define PART_INCREMENT 8 |
granularity of the particle buffers in particles
Definition at line 51 of file particle_data.c.
Referenced by realloc_local_particles(), realloc_particle_node(), and realloc_particlelist().
| #define REQ_SNDRCV_PART 0xaa |
my magic MPI code for send/recv_particles
Definition at line 54 of file particle_data.c.
Referenced by recv_particles(), and send_particles().
| int add_particle_to_list | ( | int | part_id, |
| int | type | ||
| ) |
Definition at line 1883 of file particle_data.c.
References ES_ERROR, ES_OK, i, TypeList::id_list, TypeOfIndex::index, Index, max(), TypeOfIndex::max_entry, TypeList::max_entry, NOT_INDEXED, reallocate_type_array(), IndexOfType::type, Type, and type_array.
Referenced by set_particle_type().
| void add_partner | ( | IntList * | il, |
| int | i, | ||
| int | j, | ||
| int | distance | ||
| ) |
Definition at line 1510 of file particle_data.c.
References distance(), IntList::e, IntList::n, and realloc_intlist().
Referenced by auto_exclusion(), and tclcommand_part_print_bond_partners().
| void added_particle | ( | int | part | ) |
Used by mpi_place_particle, should not be used elsewhere.
Called if on a different node a new particle was added.
| part | the identity of the particle added |
Definition at line 1231 of file particle_data.c.
References i, max_seen_particle, n_total_particles, part, and realloc_local_particles().
Referenced by mpi_place_new_particle(), and mpi_place_new_particle_slave().
| Particle* append_indexed_particle | ( | ParticleList * | plist, |
| Particle * | part | ||
| ) |
Append a particle at the end of a particle List.
reallocates particles if necessary! This procedure cares for local_particles.
| plist | List to append the particle to. |
| part | Particle to append. |
Definition at line 443 of file particle_data.c.
References ParticleProperties::identity, ParticleList::n, Particle::p, ParticleList::part, realloc_particlelist(), and update_local_particles().
Referenced by dd_append_particles().
| Particle* append_unindexed_particle | ( | ParticleList * | plist, |
| Particle * | part | ||
| ) |
Append a particle at the end of a particle List.
reallocates particles if necessary! This procedure does not care for local_particles.
| plist | List to append the particle to. |
| part | Particle to append. |
Definition at line 432 of file particle_data.c.
References ParticleList::n, ParticleList::part, and realloc_particlelist().
Referenced by dd_topology_init(), layered_topology_init(), and nsq_topology_init().
| void auto_exclusion | ( | int | distance | ) |
Automatically add the next <distance> neighbors in each molecule to the exclusion list.
This uses the bond topology obtained directly from the particles, since only this contains the full topology, in contrast to topology::topology. To easily setup the bonds, all data should be on a single node, therefore the partCfg array is used. With large amounts of particles, you should avoid this function and setup exclusions manually.
Definition at line 1546 of file particle_data.c.
References add_partner(), Particle::bl, bonded_ia_params, change_exclusion(), distance(), IntList::e, free, i, ia_params, ParticleProperties::identity, init_intlist(), malloc, max_seen_particle, IntList::n, n_total_particles, Bonded_ia_parameters::num, Particle::p, realloc_intlist(), updatePartCfg(), and WITH_BONDS.
Referenced by tclcommand_part().
| void build_particle_node | ( | ) |
Rebuild particle_node from scratch.
After a simulation step particle_node has to be rebuild since the particles might have gone to a different node.
Definition at line 374 of file particle_data.c.
References max_seen_particle, mpi_who_has(), and realloc_particle_node().
Referenced by change_exclusion(), change_particle_bond(), get_particle_data(), place_particle(), remove_particle(), set_particle_dip(), set_particle_dipm(), set_particle_ext_force(), set_particle_ext_torque(), set_particle_f(), set_particle_fix(), set_particle_gamma(), set_particle_mass(), set_particle_mol_id(), set_particle_mu_E(), set_particle_omega_body(), set_particle_omega_lab(), set_particle_q(), set_particle_quat(), set_particle_rotation(), set_particle_rotational_inertia(), set_particle_temperature(), set_particle_torque_body(), set_particle_torque_lab(), set_particle_type(), set_particle_v(), set_particle_virtual(), set_particle_vs_relative(), tclcommand_part_parse_bond(), tclcommand_part_parse_cmd(), tclcommand_part_parse_exclusion(), tclcommand_part_print_all(), tclcommand_readmd(), and tclcommand_writemd().
| int change_exclusion | ( | int | part, |
| int | part2, | ||
| int | delete | ||
| ) |
Call only on the master node: change particle constraints.
| part | identity of particle for which the exclusion is set. |
| part2 | identity of particle for which the exclusion is set. If -1, delete all exclusions. |
| delete | if true, do not add the exclusion, rather delete it if found |
Definition at line 1524 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_exclusion(), and particle_node.
Referenced by auto_exclusion(), and tclcommand_part_parse_exclusion().
| int change_particle_bond | ( | int | part, |
| int * | bond, | ||
| int | delete | ||
| ) |
Call only on the master node: change particle bond.
| part | identity of principal atom of the bond. |
| bond | field containing the bond type number and the identity of all bond partners (secundary atoms of the bond). If NULL, delete all bonds. |
| delete | if true, do not add the bond, rather delete it if found |
Definition at line 1040 of file particle_data.c.
References build_particle_node(), ERROR_SPRINTF, ES_ERROR, ES_INTEGER_SPACE, max_seen_particle, mpi_send_bond(), n_bonded_ia, part, particle_node, and runtime_error().
Referenced by crosslinkC(), diamondC(), icosaederC(), polymerC(), and tclcommand_part_parse_bond().
| int delete_particle_of_type | ( | int | type | ) |
delete one randomly chosen particle of given type returns ES_OK if succesful or else ES_ERROR
Definition at line 1849 of file particle_data.c.
References ES_ERROR, ES_OK, find_particle_type_id(), Index, malloc, max(), TypeList::max_entry, remove_particle(), IndexOfType::type, and type_array.
Referenced by part_parse_gc().
| int find_particle_type | ( | int | type, |
| int * | id | ||
| ) |
Definition at line 1794 of file particle_data.c.
References ES_ERROR, ES_OK, i, i_random(), TypeList::id_list, TypeOfIndex::index, Index, TypeOfIndex::max_entry, TypeList::max_entry, IndexOfType::type, Type, and type_array.
Referenced by part_parse_gc().
| int find_particle_type_id | ( | int | type, |
| int * | id, | ||
| int * | in_id | ||
| ) |
return an array with real particle id and the corresponding index of typelist
Definition at line 1815 of file particle_data.c.
References ES_ERROR, ES_OK, i, i_random(), TypeList::id_list, TypeOfIndex::index, Index, TypeOfIndex::max_entry, TypeList::max_entry, IndexOfType::type, Type, and type_array.
Referenced by delete_particle_of_type().
| void free_particle | ( | Particle * | part | ) |
Deallocate the dynamic storage of a particle.
Definition at line 272 of file particle_data.c.
References Particle::bl, Particle::el, and realloc_intlist().
Referenced by local_remove_particle(), send_particles(), tclcommand_analyze_parse_reference_point(), tclcommand_part_parse_print(), tclcommand_writemd(), and tclprint_to_result_Particle().
| int free_particle_lists | ( | void | ) |
free particle lists
Definition at line 1965 of file particle_data.c.
References ES_OK, free, i, TypeOfIndex::index, Index, TypeOfIndex::max_entry, IndexOfType::type, Type, and type_array.
| void freePartCfg | ( | ) |
release the partCfg array.
Use this function, since it also frees the bonds, if they are used.
Definition at line 332 of file particle_data.c.
References free, and realloc_intlist().
Referenced by on_integration_start(), on_particle_change(), tclcommand_analyze_parse_get_folded_positions(), and updatePartCfg().
| int gc_status | ( | int | type | ) |
Definition at line 1945 of file particle_data.c.
References ES_ERROR, ES_OK, i, TypeOfIndex::index, Index, TypeOfIndex::max_entry, TypeList::max_entry, IndexOfType::type, Type, and type_array.
| int get_particle_data | ( | int | part, |
| Particle * | data | ||
| ) |
Get particle data.
Note that the bond intlist is allocated so that you are responsible to free it later.
| part | the identity of the particle to fetch |
| data | where to store its contents. |
Definition at line 505 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_recv_part(), part, and particle_node.
Referenced by remove_particle(), set_particle_omega_lab(), set_particle_torque_lab(), set_particle_type(), tclcommand_analyze_parse_and_print_check_mol(), tclcommand_analyze_parse_reference_point(), tclcommand_part_parse_print(), tclcommand_writemd(), tclprint_to_result_Particle(), and vs_relate_to().
| Particle* got_particle | ( | ParticleList * | plist, |
| int | id | ||
| ) |
Search for a specific particle.
| plist | the list on which to operate |
| id | the identity of the particle to search |
Definition at line 420 of file particle_data.c.
References i, ParticleProperties::identity, ParticleList::n, Particle::p, and ParticleList::part.
| int init_gc | ( | void | ) |
linked list for particles of a given type
vars and fields
Definition at line 1622 of file particle_data.c.
References ES_ERROR, ES_OK, GC_init, Index, malloc, IndexOfType::max_entry, TypeOfIndex::max_entry, number_of_type_lists, Type, type_array, and Type_array_init.
Referenced by init_type_array().
| void init_particle | ( | Particle * | part | ) |
Initialize a particle.
This function just sets all values to the defaults (mostly zeros)! Do NOT use this without setting the values of the identity and position to reasonable values. Also make sure that you update local_particles.
Add here all initializations you need to be done !!! If dynamic memory allocation is involved, also look at free_particle.
Definition at line 96 of file particle_data.c.
References ParticleProperties::adress_weight, Particle::bl, ParticleProperties::catalyzer_count, ParticlePosition::dip, ParticleProperties::dipm, Particle::el, ParticleLocal::ext_flag, ParticleLocal::ext_force, ParticleLocal::ext_torque, ParticleForce::f, Particle::f, ParticleProperties::gamma, ParticleLocal::i, ParticleProperties::identity, init_intlist(), ParticleProperties::isVirtual, Particle::l, Particle::m, ParticleLocal::m_ls, ParticleProperties::mass, ParticleProperties::mol_id, ParticleProperties::mu_E, ParticleMomentum::omega, ParticlePosition::p, Particle::p, ParticlePosition::p_old, ParticleLocal::p_old, ParticleProperties::q, ParticlePosition::quat, ParticlePosition::quatu, Particle::r, ParticleLocal::r_ls, ParticleProperties::rinertia, ParticleProperties::rotation, ParticleProperties::T, ParticleForce::torque, ParticleProperties::type, ParticleMomentum::v, ParticleProperties::vs_relative_distance, and ParticleProperties::vs_relative_to_particle_id.
Referenced by local_place_particle().
| void init_particlelist | ( | ParticleList * | pList | ) |
Initialize a particle list.
Use with care and ONLY for initialization!
Definition at line 380 of file particle_data.c.
References ParticleList::max, ParticleList::n, and ParticleList::part.
Referenced by dd_exchange_and_sort_particles(), layered_exchange_and_sort_particles(), nsq_balance_particles(), and realloc_cells().
| int init_type_array | ( | int | type | ) |
init particle lists
Definition at line 1640 of file particle_data.c.
References TypeList::cur_size, ES_ERROR, ES_OK, i, TypeList::id_list, ParticleProperties::identity, TypeOfIndex::index, Index, init_gc(), malloc, IndexOfType::max_entry, TypeOfIndex::max_entry, TypeList::max_entry, n_total_particles, number_of_type_lists, Particle::p, realloc, reallocate_global_type_list(), IndexOfType::type, Type, type_array, Type_array_init, updatePartCfg(), and WITHOUT_BONDS.
Referenced by number_of_particles_with_type(), and part_parse_gc().
| int local_change_bond | ( | int | part, |
| int * | bond, | ||
| int | delete | ||
| ) |
Used by mpi_send_bond, should not be used elsewhere.
Modify a bond.
| part | the identity of the particle to change |
| bond | the bond to do |
| delete | if true, delete the bond instead of add |
Definition at line 1246 of file particle_data.c.
References Particle::bl, bonded_ia_params, IntList::e, ES_OK, i, IntList::n, Bonded_ia_parameters::num, part, realloc_intlist(), and try_delete_bond().
Referenced by detect_collision(), handle_collisions(), mpi_send_bond(), and mpi_send_bond_slave().
| void local_change_exclusion | ( | int | part1, |
| int | part2, | ||
| int | delete | ||
| ) |
Used for example by mpi_send_exclusion.
Locally add a exclusion to a particle.
| part1 | the identity of the first exclusion partner |
| part2 | the identity of the second exclusion partner |
| delete | if true, delete the exclusion instead of add |
Definition at line 1336 of file particle_data.c.
References CellPList::cell, local_cells, CellPList::n, ParticleList::n, part, ParticleList::part, realloc_intlist(), try_add_exclusion(), and try_delete_exclusion().
Referenced by mpi_send_exclusion(), and mpi_send_exclusion_slave().
| void local_place_particle | ( | int | part, |
| double | p[3], | ||
| int | new | ||
| ) |
Used by mpi_place_particle, should not be used elsewhere.
Move a particle to a new position. If it does not exist, it is created. the position must be on the local node!
| part | the identity of the particle to move |
| p | its new position |
| new | if true, the particle is allocated, else has to exists already |
Definition at line 1145 of file particle_data.c.
References cell_structure, errexit(), fold_position(), i, ParticleLocal::i, ParticleProperties::identity, init_particle(), Particle::l, ParticleList::n, ParticlePosition::p, Particle::p, ParticlePosition::p_old, part, ParticleList::part, PART_TRACE, CellStructure::position_to_cell, Particle::r, realloc_particlelist(), this_node, and update_local_particles().
Referenced by mpi_place_new_particle(), mpi_place_new_particle_slave(), mpi_place_particle(), and mpi_place_particle_slave().
| void local_remove_all_particles | ( | ) |
Used by mpi_remove_particle, should not be used elsewhere.
Locally remove all particles.
Definition at line 1191 of file particle_data.c.
References CellPList::cell, i, local_cells, max_seen_particle, CellPList::n, ParticleList::n, n_total_particles, ParticleList::part, and realloc_intlist().
Referenced by mpi_remove_particle_slave().
| void local_remove_particle | ( | int | part | ) |
Used by mpi_remove_particle, should not be used elsewhere.
Remove a particle on this node.
| part | the identity of the particle to remove |
Definition at line 1107 of file particle_data.c.
References CellPList::cell, errexit(), free_particle(), ParticleProperties::identity, local_cells, CellPList::n, ParticleList::n, Particle::p, part, ParticleList::part, and this_node.
Referenced by mpi_remove_particle_slave().
| void local_rescale_particles | ( | int | dir, |
| double | scale | ||
| ) |
Used by mpi_rescale_particles, should not be used elsewhere.
Locally rescale all particles on current node.
| dir | direction to scale (0/1/2 = x/y/z, 3 = x+y+z isotropically) |
| scale | factor by which to rescale (>1: stretch, <1: contract) |
Definition at line 1209 of file particle_data.c.
References CellPList::cell, local_cells, CellPList::n, ParticleList::n, ParticlePosition::p, ParticleList::part, and Particle::r.
Referenced by mpi_rescale_particles(), and mpi_rescale_particles_slave().
| Particle* move_indexed_particle | ( | ParticleList * | destList, |
| ParticleList * | sourceList, | ||
| int | ind | ||
| ) |
Remove a particle from one particle List and append it to another.
Refill the sourceList with last particle and update its entry in local_particles. Reallocates particles if necessary. This procedure cares for local_particles.
| destList | List where the particle is appended. |
| sourceList | List where the particle will be removed. |
| ind | Index of the particle in the sourceList. |
Definition at line 476 of file particle_data.c.
References i, ParticleProperties::identity, ParticleList::n, Particle::p, ParticleList::part, realloc_particlelist(), and update_local_particles().
Referenced by dd_exchange_and_sort_particles(), layered_append_particles(), and layered_exchange_and_sort_particles().
| Particle* move_unindexed_particle | ( | ParticleList * | destList, |
| ParticleList * | sourceList, | ||
| int | ind | ||
| ) |
Remove a particle from one particle List and append it to another.
Refill the sourceList with last particle and update its entry in local_particles. reallocates particles if necessary. This procedure does not care for local_particles. NOT IN USE AT THE MOMENT.
| destList | List where the particle is appended. |
| sourceList | List where the particle will be removed. |
| ind | Index of the particle in the sourceList. |
Definition at line 460 of file particle_data.c.
References i, ParticleList::n, ParticleList::part, and realloc_particlelist().
| int number_of_particles_with_type | ( | int | type, |
| int * | number | ||
| ) |
Definition at line 1979 of file particle_data.c.
References ES_OK, i, TypeOfIndex::index, Index, init_type_array(), TypeOfIndex::max_entry, TypeList::max_entry, NOT_INDEXED, IndexOfType::type, Type, and type_array.
Referenced by part_parse_gc().
| void particle_invalidate_part_node | ( | ) |
Invalidate particle_node.
This has to be done at the beginning of the integration.
Definition at line 364 of file particle_data.c.
References free, max_particle_node, and particle_node.
Referenced by cells_re_init(), and cells_resort_particles().
| int place_particle | ( | int | part, |
| double | p[3] | ||
| ) |
Call only on the master node.
Move a particle to a new position. If it does not exist, it is created.
| part | the identity of the particle to move |
| p | its new position |
Definition at line 521 of file particle_data.c.
References build_particle_node(), cell_structure, ES_PART_CREATED, ES_PART_ERROR, ES_PART_OK, i, max_seen_particle, mpi_place_new_particle(), mpi_place_particle(), part, particle_node, CellStructure::position_to_node, and realloc_particle_node().
Referenced by analyze_activate(), counterionsC(), diamondC(), handle_collisions(), icosaederC(), polymerC(), saltC(), tclcommand_part_parse_pos(), and tclcommand_readmd().
| void realloc_local_particles | ( | int | part | ) |
resize local_particles.
| part | the highest existing particle |
Definition at line 342 of file particle_data.c.
References max_local_particles, PART_INCREMENT, and realloc.
Referenced by added_particle().
| static void realloc_particle_node | ( | int | part | ) | [static] |
resize particle_node.
This procedure is only used on the master node in Tcl mode.
| part | the highest existing particle |
Definition at line 355 of file particle_data.c.
References max_particle_node, PART_INCREMENT, particle_node, and realloc.
Referenced by build_particle_node(), place_particle(), and remove_all_particles().
| int realloc_particlelist | ( | ParticleList * | plist, |
| int | size | ||
| ) |
Allocate storage for local particles and ghosts.
This version does not care for the bond information to be freed if necessary.
| plist | the list on which to operate |
| size | the size to provide at least. It is rounded up to multiples of PART_INCREMENT. |
Definition at line 387 of file particle_data.c.
References max(), ParticleList::max, ParticleList::n, ParticleList::part, PART_INCREMENT, PART_TRACE, realloc, and this_node.
Referenced by append_indexed_particle(), append_unindexed_particle(), cell_cell_transfer(), cells_re_init(), dd_exchange_and_sort_particles(), layered_exchange_and_sort_particles(), local_place_particle(), move_indexed_particle(), move_unindexed_particle(), nsq_balance_particles(), put_recv_buffer(), realloc_cells(), recv_particles(), and send_particles().
| int reallocate_global_type_list | ( | int | size | ) |
make more type_arrays available
Definition at line 1783 of file particle_data.c.
References ES_ERROR, ES_OK, number_of_type_lists, realloc, and type_array.
Referenced by init_type_array().
| int reallocate_type_array | ( | int | type | ) |
resize the array for the list of ids for a certain type
Definition at line 1708 of file particle_data.c.
References TypeList::cur_size, ES_ERROR, ES_OK, TypeList::id_list, Index, realloc, IndexOfType::type, and type_array.
Referenced by add_particle_to_list(), and update_particle_array().
| void recv_particles | ( | ParticleList * | particles, |
| int | node | ||
| ) |
Synchronous receive of a particle buffer from another node.
The other node MUST call send_particles when this is called. The particles are APPENDED to the list, so it has to be a valid one
Definition at line 1444 of file particle_data.c.
References alloc_intlist(), Particle::bl, comm_cart, IntList::e, Particle::el, errexit(), ParticleProperties::identity, init_intlist(), MPI_BYTE, MPI_INT, MPI_Recv(), MPI_STATUS_IGNORE, IntList::n, ParticleList::n, Particle::p, ParticleList::part, PART_TRACE, realloc_intlist(), realloc_particlelist(), REQ_SNDRCV_PART, this_node, and update_local_particles().
Referenced by dd_exchange_and_sort_particles(), layered_exchange_and_sort_particles(), and nsq_balance_particles().
| void remove_all_bonds_to | ( | int | part | ) |
for all local particles, remove bonds incorporating the specified particle.
| part | identity of the particle to free from bonds |
Definition at line 1298 of file particle_data.c.
References Particle::bl, bonded_ia_params, CellPList::cell, IntList::e, errexit(), i, local_cells, IntList::n, CellPList::n, ParticleList::n, Bonded_ia_parameters::num, part, ParticleList::part, realloc_intlist(), and this_node.
Referenced by mpi_remove_particle_slave().
| void remove_all_exclusions | ( | ) |
remove all exclusions.
Definition at line 1540 of file particle_data.c.
References mpi_send_exclusion().
Referenced by tclcommand_part().
| void remove_all_particles | ( | ) |
remove all particles.
Definition at line 1065 of file particle_data.c.
References mpi_remove_particle(), and realloc_particle_node().
Referenced by tclcommand_part().
| int remove_id_type_array | ( | int | part_id, |
| int | type | ||
| ) |
Definition at line 1717 of file particle_data.c.
References ES_OK, i, TypeList::id_list, TypeOfIndex::index, Index, max(), TypeOfIndex::max_entry, TypeList::max_entry, IndexOfType::type, Type, and type_array.
Referenced by remove_particle(), and set_particle_type().
| int remove_particle | ( | int | part | ) |
remove particle with a given identity.
Also removes all bonds to the particle.
| part | identity of the particle to remove |
Definition at line 1071 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, FIELD_MAXPART, free, get_particle_data(), malloc, max_seen_particle, mpi_bcast_parameter(), mpi_remove_particle(), Particle::p, part, particle_node, remove_id_type_array(), and ParticleProperties::type.
Referenced by delete_particle_of_type(), and tclcommand_part_parse_delete().
| void send_particles | ( | ParticleList * | particles, |
| int | node | ||
| ) |
Synchronous send of a particle buffer to another node.
The other node MUST call recv_particles when this is called. The particles data is freed.
Definition at line 1400 of file particle_data.c.
References Particle::bl, comm_cart, IntList::e, Particle::el, free_particle(), ParticleProperties::identity, init_intlist(), MPI_BYTE, MPI_INT, MPI_Send(), IntList::n, ParticleList::n, Particle::p, ParticleList::part, PART_TRACE, realloc_intlist(), realloc_particlelist(), REQ_SNDRCV_PART, and this_node.
Referenced by dd_exchange_and_sort_particles(), layered_exchange_and_sort_particles(), and nsq_balance_particles().
| int set_particle_dip | ( | int | part, |
| double | dip[3] | ||
| ) |
Call only on the master node: set particle dipole orientation.
| part | the particle. |
| dip | its new dipole orientation. |
Definition at line 669 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_dip(), part, and particle_node.
Referenced by tclcommand_part_parse_dip(), and tclcommand_readmd().
| int set_particle_dipm | ( | int | part, |
| double | dipm | ||
| ) |
Call only on the master node: set particle dipole moment (absolut value).
| part | the particle. |
| dipm | its new dipole moment. |
Definition at line 653 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_dipm(), part, and particle_node.
Referenced by tclcommand_part_parse_dipm().
| int set_particle_ext_force | ( | int | part, |
| int | flag, | ||
| double | force[3] | ||
| ) |
Call only on the master node: set particle external force.
| part | the particle. |
| flag | new value for ext_flag. |
| force | new value for ext_force. |
Definition at line 1005 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_force(), part, PARTICLE_EXT_FORCE, and particle_node.
Referenced by tclcommand_part_parse_ext_force().
| int set_particle_ext_torque | ( | int | part, |
| int | flag, | ||
| double | torque[3] | ||
| ) |
Call only on the master node: set particle external torque.
| part | the particle. |
| flag | new value for ext_flag. |
| torque | new value for ext_torque. |
Definition at line 987 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_torque(), part, PARTICLE_EXT_TORQUE, and particle_node.
Referenced by tclcommand_part_parse_ext_torque().
| int set_particle_f | ( | int | part, |
| double | F[3] | ||
| ) |
Call only on the master node: set particle force.
| part | the particle. |
| F | its new force. |
Definition at line 581 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_f(), part, and particle_node.
Referenced by tclcommand_part_parse_f(), and tclcommand_readmd().
| int set_particle_fix | ( | int | part, |
| int | flag | ||
| ) |
Call only on the master node: set coordinate axes for which the particles motion is fixed.
| part | the particle. |
| flag | new value for flagged coordinate axes to be fixed |
Definition at line 1022 of file particle_data.c.
References build_particle_node(), COORDS_FIX_MASK, ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_force(), part, and particle_node.
Referenced by tclcommand_part_parse_fix(), and tclcommand_part_parse_unfix().
| int set_particle_gamma | ( | int | part, |
| double | gamma | ||
| ) |
Call only on the master node: set particle frictional coefficient.
| part | the particle. |
| gamma | its new frictional coefficient. |
Definition at line 965 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_set_particle_gamma(), part, and particle_node.
Referenced by part_parse_gamma().
| int set_particle_mass | ( | int | part, |
| double | mass | ||
| ) |
Call only on the master node: set particle mass.
| part | the particle. |
| mass | its new mass. |
Definition at line 598 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mass(), part, and particle_node.
Referenced by tclcommand_part_parse_mass(), and tclcommand_readmd().
| int set_particle_mol_id | ( | int | part, |
| int | mid | ||
| ) |
Call only on the master node: set particle's molecule id.
| part | the particle. |
| mid | its new mol id. |
Definition at line 810 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mol_id(), part, and particle_node.
Referenced by tclcommand_part_parse_mol_id().
| int set_particle_mu_E | ( | int | part, |
| double | mu_E[3] | ||
| ) |
Call only on the master node: set particle electrophoretic mobility.
| part | the particle. |
| mu_E | its new mobility. |
Definition at line 745 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mu_E(), part, and particle_node.
Referenced by tclcommand_part_parse_mu_E().
| int set_particle_omega_body | ( | int | part, |
| double | omega[3] | ||
| ) |
Call only on the master node: set particle angular velocity in body frame.
| part | the particle. |
| omega | its new angular velocity. |
Definition at line 875 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_omega(), part, and particle_node.
Referenced by tclcommand_part_parse_omega_body().
| int set_particle_omega_lab | ( | int | part, |
| double | omega[3] | ||
| ) |
Call only on the master node: set particle angular velocity from lab frame.
| part | the particle. |
| omega | its new angular velocity. |
Definition at line 844 of file particle_data.c.
References build_particle_node(), define_rotation_matrix(), ES_ERROR, ES_OK, get_particle_data(), max_seen_particle, mpi_send_omega(), part, and particle_node.
Referenced by tclcommand_part_parse_omega_lab().
| int set_particle_q | ( | int | part, |
| double | q | ||
| ) |
Call only on the master node: set particle charge.
| part | the particle. |
| q | its new charge. |
Definition at line 728 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_q(), part, and particle_node.
Referenced by counterionsC(), diamondC(), icosaederC(), polymerC(), saltC(), tclcommand_part_parse_q(), and tclcommand_readmd().
| int set_particle_quat | ( | int | part, |
| double | quat[4] | ||
| ) |
Call only on the master node: set particle orientation using quaternions.
| part | the particle. |
| quat | its new value for quaternions. |
Definition at line 828 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_quat(), part, and particle_node.
Referenced by tclcommand_part_parse_quat(), and vs_relate_to().
| int set_particle_rotation | ( | int | part, |
| int | rot | ||
| ) |
Call only on the master node: Specifies whether a particle's rotational degrees of freedom are integrated or not.
If set to zero, the content of the torque and omega variables are meaningless
| part | the particle. |
| rot | the degrees of freedom flag. |
Definition at line 635 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_rotation(), part, and particle_node.
Referenced by tclcommand_part_parse_rotation().
| int set_particle_rotational_inertia | ( | int | part, |
| double | rinertia[3] | ||
| ) |
Call only on the master node: set particle rotational inertia.
| part | the particle. |
| rinertia | its new inertia. |
Definition at line 616 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_rotational_inertia(), part, and particle_node.
Referenced by tclcommand_part_parse_rotational_inertia().
| int set_particle_temperature | ( | int | part, |
| double | T | ||
| ) |
Call only on the master node: set particle temperature.
| part | the particle. |
| T | its new temperature. |
Definition at line 947 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_set_particle_temperature(), part, and particle_node.
Referenced by part_parse_temp().
| int set_particle_torque_body | ( | int | part, |
| double | torque[3] | ||
| ) |
Call only on the master node: set particle torque in body frame.
| part | the particle. |
| torque | its new torque. |
Definition at line 925 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_torque(), part, and particle_node.
Referenced by tclcommand_part_parse_torque_body().
| int set_particle_torque_lab | ( | int | part, |
| double | torque[3] | ||
| ) |
Call only on the master node: set particle torque from lab frame.
| part | the particle. |
| torque | its new torque. |
Definition at line 894 of file particle_data.c.
References build_particle_node(), define_rotation_matrix(), ES_ERROR, ES_OK, get_particle_data(), max_seen_particle, mpi_send_torque(), part, and particle_node.
Referenced by tclcommand_part_parse_torque_lab().
| int set_particle_type | ( | int | part, |
| int | type | ||
| ) |
Call only on the master node: set particle type.
| part | the particle. |
| type | its new type. |
Definition at line 762 of file particle_data.c.
References add_particle_to_list(), build_particle_node(), ES_ERROR, ES_OK, free, get_particle_data(), make_particle_type_exist(), malloc, max_seen_particle, mpi_send_type(), Particle::p, part, particle_node, remove_id_type_array(), ParticleProperties::type, and Type_array_init.
Referenced by counterionsC(), diamondC(), icosaederC(), polymerC(), saltC(), tclcommand_part_parse_type(), and tclcommand_readmd().
| int set_particle_v | ( | int | part, |
| double | v[3] | ||
| ) |
Call only on the master node: set particle velocity.
| part | the particle. |
| v | its new velocity. |
Definition at line 565 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_v(), part, and particle_node.
Referenced by maxwell_velocitiesC(), tclcommand_part_parse_v(), tclcommand_readmd(), and velocitiesC().
| int set_particle_virtual | ( | int | part, |
| int | isVirtual | ||
| ) |
Call only on the master node: set particle dipole moment (absolut value).
| part | the particle. |
| isVirtual | its new dipole moment. |
Definition at line 690 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_virtual(), part, and particle_node.
Referenced by tclcommand_part_parse_virtual().
| int set_particle_vs_relative | ( | int | part, |
| int | vs_relative_to, | ||
| double | vs_distance | ||
| ) |
Definition at line 708 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_vs_relative(), part, and particle_node.
Referenced by part_parse_vs_relative(), and vs_relate_to().
| int sortPartCfg | ( | ) |
sorts the partCfg array.
This is indicated by setting partCfgSorted to 1. Note that for this to work the particles have to be stored consecutively starting with 0. This function is lazy.
Definition at line 307 of file particle_data.c.
References free, i, malloc, max_seen_particle, n_total_particles, partCfgSorted, updatePartCfg(), and WITHOUT_BONDS.
Referenced by analyze_fold_molecules(), bilayer_density_profile_sphere(), calc_fluctuations(), convert_types_to_ids(), get_lipid_orients(), modes2d(), observable_blocked_com_force(), observable_blocked_com_position(), observable_blocked_com_velocity(), observable_com_force(), observable_com_position(), observable_com_velocity(), observable_currents(), observable_density_profile(), observable_dipole_moment(), observable_flux_density_profile(), observable_interacts_with(), observable_particle_angular_momentum(), observable_particle_currents(), observable_particle_forces(), observable_particle_positions(), observable_particle_velocities(), observable_radial_density_profile(), observable_radial_flux_density_profile(), observable_stress_tensor(), observable_stress_tensor_acf_obs(), observable_structure_factor(), orient_order(), tclcommand_analyze_parse_activate(), tclcommand_analyze_parse_and_print_dipmom_mol(), tclcommand_analyze_parse_and_print_dipole(), tclcommand_analyze_parse_and_print_energy_kinetic_mol(), tclcommand_analyze_parse_and_print_pressure_mol(), tclcommand_analyze_parse_append(), tclcommand_analyze_parse_density_profile_av(), tclcommand_analyze_parse_diffusion_profile(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_necklace(), tclcommand_analyze_parse_push(), tclcommand_analyze_parse_rdf(), tclcommand_analyze_parse_remove(), tclcommand_analyze_parse_replace(), tclcommand_analyze_parse_vanhove(), tclcommand_analyze_print_MSD(), tclcommand_analyze_set_parse_chain_topology_check(), and updatePartCfg().
| void try_add_exclusion | ( | Particle * | part, |
| int | part2 | ||
| ) |
Insert an exclusion if not already set.
Definition at line 1373 of file particle_data.c.
References IntList::e, Particle::el, i, IntList::n, and realloc_intlist().
Referenced by local_change_exclusion().
| int try_delete_bond | ( | Particle * | part, |
| int * | bond | ||
| ) |
Remove bond from particle if possible.
Definition at line 1265 of file particle_data.c.
References Particle::bl, bonded_ia_params, IntList::e, ES_ERROR, ES_OK, i, IntList::n, Bonded_ia_parameters::num, and realloc_intlist().
Referenced by local_change_bond().
| void try_delete_exclusion | ( | Particle * | part, |
| int | part2 | ||
| ) |
Remove exclusion from particle if possible.
Definition at line 1384 of file particle_data.c.
References IntList::e, Particle::el, i, IntList::n, and realloc_intlist().
Referenced by local_change_exclusion().
| void update_local_particles | ( | ParticleList * | pl | ) |
Update the entries in local_particles for all particles in the list pl.
| pl | the list to put in. |
Definition at line 412 of file particle_data.c.
References i, ParticleList::n, and ParticleList::part.
Referenced by append_indexed_particle(), dd_topology_init(), layered_topology_init(), local_place_particle(), move_indexed_particle(), nsq_balance_particles(), nsq_topology_init(), and recv_particles().
| int update_particle_array | ( | int | type | ) |
Definition at line 1761 of file particle_data.c.
References TypeList::cur_size, ES_ERROR, ES_OK, i, TypeList::id_list, ParticleProperties::identity, Index, TypeList::max_entry, n_total_particles, Particle::p, reallocate_type_array(), IndexOfType::type, type_array, updatePartCfg(), and WITHOUT_BONDS.
| void updatePartCfg | ( | int | bonds_flag | ) |
Get the complete unsorted informations on all particles into partCfg if something's changed.
This is a severe performance drawback and might even fail for lack of memory for large systems. If you need the particle info sorted, call sortPartCfg instead. This function is lazy. If you would like the bonding information in partCfg to be valid you should set the value of to WITH_BONDS.
Definition at line 284 of file particle_data.c.
References freePartCfg(), ParticleLocal::i, Particle::l, malloc, mpi_get_particles(), n_total_particles, Particle::p, partCfgSorted, sortPartCfg(), unfold_position(), update_mol_pos_cfg(), and WITH_BONDS.
Referenced by angularmomentum(), auto_exclusion(), bilayer_density_profile_sphere(), calc_fluctuations(), calc_gyration_tensor(), calc_radial_density_map(), centermass(), centermass_vel(), distto(), get_lipid_orients(), init_type_array(), mindist(), modes2d(), momentofinertiamatrix(), nbhood(), orient_order(), sortPartCfg(), tclcommand_analyze_current(), 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_kinetic(), tclcommand_analyze_parse_and_print_energy_kinetic_mol(), tclcommand_analyze_parse_and_print_pressure_mol(), tclcommand_analyze_parse_cluster_size_dist(), tclcommand_analyze_parse_cwvac(), tclcommand_analyze_parse_distribution(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_holes(), tclcommand_analyze_parse_nbhood(), tclcommand_analyze_parse_rdfchain(), tclcommand_analyze_parse_structurefactor(), tclcommand_analyze_parse_vel_distr(), tclcommand_analyze_wallstuff(), tclcommand_imd_parse_pos(), tclcommand_part_print_bond_partners(), and update_particle_array().
| Particle** local_particles = NULL |
id->particle mapping on all nodes.
This is used to find partners of bonded interactions.
Definition at line 65 of file particle_data.c.
Referenced by add_area_global_force(), add_bonded_energy(), add_bonded_force(), add_bonded_virials(), add_ljangle_pair_force(), add_three_body_bonded_stress(), add_volume_force(), calc_area_global(), calc_mol_pos(), calc_mol_vel(), calc_volume(), check_particle_consistency(), check_particles(), compute_pos_corr_vec(), compute_vel_corr_vec(), dd_exchange_and_sort_particles(), detect_collision(), force_and_velocity_display(), get_mol_com_particle(), handle_collisions(), init_local_particle_force(), invalidate_ghosts(), ljangle_pair_energy(), local_stress_tensor_calc(), mpi_recv_part(), mpi_recv_part_slave(), mpi_send_dip(), mpi_send_dip_slave(), mpi_send_dipm(), mpi_send_dipm_slave(), mpi_send_ext_force(), mpi_send_ext_force_slave(), mpi_send_ext_torque(), mpi_send_ext_torque_slave(), mpi_send_f(), mpi_send_f_slave(), mpi_send_mass(), mpi_send_mass_slave(), mpi_send_mol_id(), mpi_send_mol_id_slave(), mpi_send_mu_E(), mpi_send_mu_E_slave(), mpi_send_omega(), mpi_send_omega_slave(), mpi_send_q(), mpi_send_q_slave(), mpi_send_quat(), mpi_send_quat_slave(), mpi_send_rotation(), mpi_send_rotation_slave(), mpi_send_rotational_inertia(), mpi_send_rotational_inertia_slave(), mpi_send_torque(), mpi_send_torque_slave(), mpi_send_type(), mpi_send_type_slave(), mpi_send_v(), mpi_send_v_slave(), mpi_send_virtual(), mpi_send_virtual_slave(), mpi_send_vs_relative(), mpi_send_vs_relative_slave(), mpi_set_particle_gamma(), mpi_set_particle_gamma_slave(), mpi_set_particle_temperature(), mpi_set_particle_temperature_slave(), nemd_change_momentum(), nemd_get_velocity(), print_bond_len(), put_mol_force_on_parts(), put_recv_buffer(), sync_topo_part_info(), and vs_relative_get_real_particle().
| int max_local_particles = 0 |
Definition at line 64 of file particle_data.c.
Referenced by realloc_local_particles().
| int max_particle_node = 0 |
Capacity of the particle_node / local_particles.
Definition at line 62 of file particle_data.c.
Referenced by particle_invalidate_part_node(), and realloc_particle_node().
| int max_seen_particle = -1 |
Highest particle number seen so far.
If you leave out some particle numbers, this number might be higher than the true number of particles. On the other hand, if you start your particle numbers at 0, the total number of particles is larger by 1.
Definition at line 60 of file particle_data.c.
Referenced by added_particle(), auto_exclusion(), build_particle_node(), change_exclusion(), change_particle_bond(), check_particle_consistency(), check_particles(), get_particle_data(), handle_collisions(), local_remove_all_particles(), mpi_who_has(), place_particle(), remove_particle(), set_particle_dip(), set_particle_dipm(), set_particle_ext_force(), set_particle_ext_torque(), set_particle_f(), set_particle_fix(), set_particle_gamma(), set_particle_mass(), set_particle_mol_id(), set_particle_mu_E(), set_particle_omega_body(), set_particle_omega_lab(), set_particle_q(), set_particle_quat(), set_particle_rotation(), set_particle_rotational_inertia(), set_particle_temperature(), set_particle_torque_body(), set_particle_torque_lab(), set_particle_type(), set_particle_v(), set_particle_virtual(), set_particle_vs_relative(), sortPartCfg(), tclcommand_imd_parse_pos(), tclcommand_metadynamics_parse_distance(), tclcommand_metadynamics_parse_relative_z(), tclcommand_part_parse_bond(), tclcommand_part_parse_print(), tclcommand_part_print_all(), tclcommand_part_print_bond_partners(), tclcommand_readmd(), and tclcommand_writemd().
| int n_total_particles = 0 |
total number of particles on all nodes.
Definition at line 61 of file particle_data.c.
Referenced by add_ljangle_pair_force(), add_mdlc_force_corrections(), added_particle(), analyze_activate(), analyze_append(), analyze_cwvac(), analyze_push(), analyze_replace(), angularmomentum(), auto_exclusion(), bilayer_density_profile(), bilayer_density_profile_sphere(), build_verlet_lists(), build_verlet_lists_and_calc_verlet_ia(), build_verlet_lists_and_calc_verlet_ia_iccp3m(), calc_diffusion_profile(), calc_fluctuations(), calc_gyration_tensor(), calc_part_distribution(), calc_radial_density_map(), calc_rdf(), calc_rdf_adress(), calc_rdf_av(), calc_rdf_intermol_av(), calc_structurefactor(), calc_vanhove(), calc_zref(), centermass(), centermass_conf(), centermass_vel(), check_particle_consistency(), check_particles(), collectBonds(), convert_types_to_ids(), crosslinkC(), density_profile_av(), distto(), fold_all(), init_g123(), init_type_array(), lb_calc_particle_lattice_ia_gpu(), lb_realloc_particles_gpu(), lb_send_forces_gpu(), ljangle_pair_energy(), local_remove_all_particles(), magnetic_dipolar_direct_sum_calculations(), mark_neighbours(), mdlc_tune(), mindist(), mindist3(), mindist4(), momentofinertiamatrix(), mpi_get_particles(), mpi_remove_particle_slave(), nbhood(), nsq_balance_particles(), observable_blocked_com_force(), observable_blocked_com_position(), observable_blocked_com_velocity(), observable_com_force(), observable_com_position(), observable_com_velocity(), observable_currents(), observable_density_profile(), observable_dipole_moment(), observable_flux_density_profile(), observable_interacts_with(), observable_particle_angular_momentum(), observable_particle_currents(), observable_particle_forces(), observable_particle_positions(), observable_particle_velocities(), observable_radial_density_profile(), observable_radial_flux_density_profile(), observable_structure_factor(), parse_id_list(), sortPartCfg(), tclcommand_analyze_current(), tclcommand_analyze_parse_activate(), tclcommand_analyze_parse_and_print_check_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_pressure(), tclcommand_analyze_parse_and_print_stress_tensor(), tclcommand_analyze_parse_append(), tclcommand_analyze_parse_cluster_size_dist(), tclcommand_analyze_parse_distribution(), tclcommand_analyze_parse_distto(), tclcommand_analyze_parse_g123(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_lipid_orient_order(), tclcommand_analyze_parse_mindist(), tclcommand_analyze_parse_modes2d(), tclcommand_analyze_parse_nbhood(), tclcommand_analyze_parse_necklace(), tclcommand_analyze_parse_push(), tclcommand_analyze_parse_replace(), tclcommand_analyze_print_MSD(), tclcommand_analyze_print_vel_distr(), tclcommand_analyze_set_parse_topo_part_sync(), tclcommand_counterions(), tclcommand_crosslink(), tclcommand_imd_parse_pos(), tclcommand_maxwell_velocities(), tclcommand_part_print_bond_partners(), tclcommand_salt(), tclcommand_velocities(), test_mesh_elements(), tscale_momentum_update(), update_mol_pos_cfg(), update_particle_array(), updatePartCfg(), and wall_sort_particles().
Particles' current configuration.
Before using that call updatePartCfg or sortPartCfg to allocate the data if necessary (which is decided by updatePartCfg).
Definition at line 66 of file particle_data.c.
Referenced by analyze_append(), analyze_cwvac(), analyze_formfactor(), analyze_push(), analyze_rdfchain(), analyze_replace(), angularmomentum(), bilayer_density_profile(), bilayer_density_profile_sphere(), calc_bond_dist(), calc_bond_l(), calc_diffusion_profile(), calc_dipole_of_molecule(), calc_fluctuations(), calc_force_between_mol(), calc_g123(), calc_g2_av(), calc_g3_av(), calc_gyration_tensor(), calc_internal_dist(), calc_mol_center_of_mass(), calc_mol_gyr_radius2(), calc_mol_hydro_radius(), calc_mol_pos_cfg(), calc_part_distribution(), calc_radial_density_map(), calc_rdf(), calc_rdf_adress(), calc_rdf_av(), calc_rdf_intermol_av(), calc_re(), calc_rg(), calc_rg_av(), calc_rh(), calc_scaling(), calc_scaling2(), calc_structurefactor(), calc_vanhove(), calc_wallbondyz(), calc_wallrdfyz(), calc_zref(), centermass(), centermass_conf(), centermass_vel(), convert_types_to_ids(), density_profile_av(), distto(), fold_all(), get_lipid_orients(), get_mol_com_particle_from_molid_cfg(), init_g123(), mark_neighbours(), mindist(), momentofinertiamatrix(), nbhood(), observable_blocked_com_force(), observable_blocked_com_position(), observable_blocked_com_velocity(), observable_com_force(), observable_com_position(), observable_com_velocity(), observable_currents(), observable_density_profile(), observable_dipole_moment(), observable_flux_density_profile(), observable_interacts_with(), observable_particle_angular_momentum(), observable_particle_currents(), observable_particle_forces(), observable_particle_positions(), observable_particle_velocities(), observable_radial_density_profile(), observable_radial_flux_density_profile(), observable_structure_factor(), orient_order(), tclcommand_analyze_current(), tclcommand_analyze_parse_and_print_check_mol(), tclcommand_analyze_parse_and_print_dipole(), tclcommand_analyze_parse_and_print_energy_kinetic(), tclcommand_analyze_parse_cluster_size_dist(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_analyze_parse_necklace(), tclcommand_analyze_print_MSD(), tclcommand_analyze_print_vel_distr(), tclcommand_imd_parse_pos(), tclcommand_part_print_bond_partners(), test_mesh_elements(), update_mol_pos_cfg(), and wall_sort_particles().
| IntList partCfg_bl = { NULL, 0, 0 } |
bondlist for partCfg, if bonds are needed
Definition at line 70 of file particle_data.c.
| int partCfgSorted = 0 |
if non zero, partCfg is sorted by particle order, and the particles are stored consecutively starting with 0.
Definition at line 67 of file particle_data.c.
Referenced by sortPartCfg(), and updatePartCfg().
| int* particle_node = NULL |
Used only on master node: particle->node mapping.
Definition at line 63 of file particle_data.c.
Referenced by change_exclusion(), change_particle_bond(), check_particles(), get_particle_data(), mpi_who_has(), particle_invalidate_part_node(), place_particle(), realloc_particle_node(), remove_particle(), set_particle_dip(), set_particle_dipm(), set_particle_ext_force(), set_particle_ext_torque(), set_particle_f(), set_particle_fix(), set_particle_gamma(), set_particle_mass(), set_particle_mol_id(), set_particle_mu_E(), set_particle_omega_body(), set_particle_omega_lab(), set_particle_q(), set_particle_quat(), set_particle_rotation(), set_particle_rotational_inertia(), set_particle_temperature(), set_particle_torque_body(), set_particle_torque_lab(), set_particle_type(), set_particle_v(), set_particle_virtual(), set_particle_vs_relative(), tclcommand_part_parse_bond(), tclcommand_part_parse_cmd(), tclcommand_part_parse_exclusion(), tclcommand_part_print_all(), tclcommand_readmd(), and tclcommand_writemd().
1.7.5.1