![]() |
ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
|
For more information on particle_data, see particle_data.c. More...

Go to the source code of this file.
Data Structures | |
| struct | ParticleProperties |
| Properties of a particle which are not supposed to change during the integration, but have to be known for all ghosts. More... | |
| struct | ParticlePosition |
| Positional information on a particle. More... | |
| struct | ParticleForce |
| Force information on a particle. More... | |
| struct | ParticleMomentum |
| Momentum information on a particle. More... | |
| struct | ParticleLocal |
| Information on a particle that is needed only on the node the particle belongs to. More... | |
| struct | ParticleLatticeCoupling |
| Data related to the Lattice Boltzmann hydrodynamic coupling. More... | |
| struct | Particle |
| Struct holding all information for one particle. More... | |
| struct | ParticleList |
| List of particles. More... | |
| struct | IndexOfType |
| struct | TypeOfIndex |
| struct | TypeList |
Defines | |
| #define | ES_PART_OK 0 |
| ok code for place_particle | |
| #define | ES_PART_ERROR -1 |
| error code for place_particle | |
| #define | ES_PART_CREATED 1 |
| ok code for place_particle, particle is new | |
| #define | WITHOUT_BONDS 0 |
| bonds_flag "bonds_flag" value for updating particle config without bonding information | |
| #define | WITH_BONDS 1 |
| bonds_flag "bonds_flag" value for updating particle config with bonding information | |
| #define | PARTICLE_EXT_FORCE 1 |
| ext_flag value for particle subject to an external force. | |
| #define | COORD_FIXED(coord) (2L << coord) |
| ext_flag value for fixed coordinate coord. | |
| #define | COORDS_FIX_MASK (COORD_FIXED(0) | COORD_FIXED(1) | COORD_FIXED(2)) |
| ext_flag mask to check wether any of the coordinates is fixed. | |
| #define | PARTICLE_EXT_TORQUE 16 |
| ext_flag value for particle subject to an external torque. | |
| #define | NOT_INDEXED -3 |
Functions | |
| void | init_particle (Particle *part) |
| Initialize a particle. | |
| void | free_particle (Particle *part) |
| Deallocate the dynamic storage of a particle. | |
| void | init_particlelist (ParticleList *pList) |
| Initialize a particle list. | |
| int | realloc_particlelist (ParticleList *plist, int size) |
| Allocate storage for local particles and ghosts. | |
| Particle * | got_particle (ParticleList *plist, int id) |
| Search for a specific particle. | |
| Particle * | append_unindexed_particle (ParticleList *plist, Particle *part) |
| Append a particle at the end of a particle List. | |
| Particle * | append_indexed_particle (ParticleList *plist, Particle *part) |
| Append a particle at the end of a particle List. | |
| Particle * | move_unindexed_particle (ParticleList *destList, ParticleList *sourceList, int ind) |
| Remove a particle from one particle List and append it to another. | |
| Particle * | move_indexed_particle (ParticleList *destList, ParticleList *sourceList, int ind) |
| Remove a particle from one particle List and append it to another. | |
| void | update_local_particles (ParticleList *pl) |
| Update the entries in local_particles for all particles in the list pl. | |
| void | build_particle_node () |
| Rebuild particle_node from scratch. | |
| void | particle_invalidate_part_node () |
| Invalidate particle_node. | |
| void | realloc_local_particles () |
| Realloc local_particles. | |
| 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_solvation (int part, double *solvation) |
| Call only on the master node: set particle solvation free energy. | |
| 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_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[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[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_dip (int part, double dip[3]) |
| Call only on the master node: set particle dipole orientation. | |
| int | set_particle_dipm (int part, double dipm) |
| Call only on the master node: set particle dipole moment (absolut value). | |
| int | set_particle_virtual (int part, int isVirtual) |
| Call only on the master node: set particle dipole moment (absolut value). | |
| 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. | |
| int | change_exclusion (int part, int part2, int _delete) |
| Call only on the master node: change particle constraints. | |
| void | remove_all_exclusions () |
| remove all exclusions. | |
| int | remove_particle (int part) |
| remove particle with a given identity. | |
| void | remove_all_particles () |
| remove all particles. | |
| void | remove_all_bonds_to (int part) |
| for all local particles, remove bonds incorporating the specified particle. | |
| void | updatePartCfg (int bonds_flag) |
| Get the complete unsorted informations on all particles into partCfg if something's changed. | |
| void | freePartCfg () |
| release the partCfg array. | |
| int | sortPartCfg () |
| sorts the partCfg array. | |
| void | local_place_particle (int part, double p[3], int _new) |
| Used by mpi_place_particle, 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 | local_change_exclusion (int part1, int part2, int _delete) |
| Used for example by mpi_send_exclusion. | |
| void | local_remove_particle (int part) |
| Used by mpi_remove_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 | 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. | |
| MDINLINE int | do_nonbonded (Particle *p1, Particle *p2) |
| Determines if the non bonded interactions between p1 and p2 should be calculated. | |
| 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 | add_partner (IntList *il, int i, int j, int distance) |
| 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 | reallocate_global_type_list (int size) |
| make more type_arrays available | |
| int | free_particle_lists (void) |
| free particle lists | |
| int | update_particle_array (int type) |
| 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 | remove_id_type_array (int part_id, int type) |
| int | add_particle_to_list (int part_id, int type) |
| int | gc_status (int type) |
| int | number_of_particles_with_type (int type, int *number) |
Variables | |
| int | max_seen_particle |
| Highest particle number seen so far. | |
| int | n_total_particles |
| total number of particles on all nodes. | |
| int | max_particle_node |
| Capacity of the particle_node / local_particles. | |
| int * | particle_node |
| Used only on master node: particle->node mapping. | |
| Particle ** | local_particles |
| id->particle mapping on all nodes. | |
| Particle * | partCfg |
| Particles' current configuration. | |
| int | partCfgSorted |
| if non zero, partCfg is sorted by particle order, and the particles are stored consecutively starting with 0. | |
| int * | partBondPartners |
| Particles' current bond partners. | |
| TypeOfIndex | Type |
| IndexOfType | Index |
| TypeList * | type_array |
| int | number_of_type_lists |
| int | GC_init |
| int | Type_array_init |
For more information on particle_data, see particle_data.c.
Definition in file particle_data.h.
| #define COORD_FIXED | ( | coord | ) | (2L << coord) |
ext_flag value for fixed coordinate coord.
Definition at line 52 of file particle_data.h.
Referenced by calc_local_mol_info(), calc_trap_force(), friction_thermo_langevin(), get_local_trapped_mols(), lb_viscous_coupling(), propagate_pos(), propagate_press_box_pos_and_rescale_npt(), propagate_vel(), propagate_vel_pos(), rescale_forces_propagate_vel(), tclcommand_analyze_set_parse_trapmol(), tclcommand_part_parse_fix(), and tclcommand_part_print_fix().
| #define COORDS_FIX_MASK (COORD_FIXED(0) | COORD_FIXED(1) | COORD_FIXED(2)) |
ext_flag mask to check wether any of the coordinates is fixed.
Definition at line 54 of file particle_data.h.
Referenced by add_dpd_thermo_pair_force(), add_inter_dpd_pair_force(), maggs_sanity_checks(), set_molecule_trap(), set_particle_fix(), and tclprint_to_result_Particle().
| #define ES_PART_CREATED 1 |
ok code for place_particle, particle is new
Definition at line 41 of file particle_data.h.
Referenced by place_particle().
| #define ES_PART_ERROR -1 |
error code for place_particle
Definition at line 39 of file particle_data.h.
Referenced by counterionsC(), diamondC(), icosaederC(), place_particle(), polymerC(), saltC(), and tclcommand_part_parse_pos().
| #define ES_PART_OK 0 |
ok code for place_particle
Definition at line 37 of file particle_data.h.
Referenced by place_particle().
| #define NOT_INDEXED -3 |
Definition at line 793 of file particle_data.h.
Referenced by add_particle_to_list(), number_of_particles_with_type(), and part_parse_gc().
| #define PARTICLE_EXT_FORCE 1 |
ext_flag value for particle subject to an external force.
Definition at line 50 of file particle_data.h.
Referenced by init_local_particle_force(), mpi_send_ext_force(), mpi_send_ext_force_slave(), set_particle_ext_force(), tclcommand_part_parse_ext_force(), tclcommand_part_print_ext_force(), and tclprint_to_result_Particle().
| #define PARTICLE_EXT_TORQUE 16 |
ext_flag value for particle subject to an external torque.
Definition at line 58 of file particle_data.h.
Referenced by init_local_particle_force(), mpi_send_ext_torque(), mpi_send_ext_torque_slave(), set_particle_ext_torque(), tclcommand_part_parse_ext_torque(), tclcommand_part_print_ext_torque(), and tclprint_to_result_Particle().
| #define WITH_BONDS 1 |
bonds_flag "bonds_flag" value for updating particle config with bonding information
Definition at line 46 of file particle_data.h.
Referenced by auto_exclusion(), tclcommand_analyze_parse_get_folded_positions(), tclcommand_imd_parse_pos(), tclcommand_part_print_bond_partners(), and updatePartCfg().
| #define WITHOUT_BONDS 0 |
bonds_flag "bonds_flag" value for updating particle config without bonding information
Definition at line 44 of file particle_data.h.
Referenced by angularmomentum(), 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_holes(), tclcommand_analyze_parse_nbhood(), tclcommand_analyze_parse_rdfchain(), tclcommand_analyze_parse_structurefactor(), tclcommand_analyze_parse_vel_distr(), tclcommand_analyze_wallstuff(), and update_particle_array().
| int add_particle_to_list | ( | int | part_id, |
| int | type | ||
| ) |
Definition at line 1909 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 1536 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 1257 of file particle_data.c.
References i, max_seen_particle, n_total_particles, 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 450 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 439 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 1572 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 381 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_solvation(), 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 1550 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 1066 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, 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 1875 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().
Determines if the non bonded interactions between p1 and p2 should be calculated.
Definition at line 759 of file particle_data.h.
References IntList::e, Particle::el, i, ParticleProperties::identity, IntList::n, and Particle::p.
Referenced by build_verlet_lists(), build_verlet_lists_and_calc_verlet_ia(), build_verlet_lists_and_calc_verlet_ia_iccp3m(), calc_force_between_mol(), calc_link_cell(), calculate_link_cell_energies(), calculate_link_cell_virials(), layered_calculate_energies(), layered_calculate_ia(), layered_calculate_ia_iccp3m(), layered_calculate_virials(), nsq_calculate_energies(), nsq_calculate_ia(), and nsq_calculate_virials().
| int find_particle_type | ( | int | type, |
| int * | id | ||
| ) |
Definition at line 1820 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 1841 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 279 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 1991 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 339 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 1971 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 512 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_recv_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 427 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 1648 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, LB_COMPONENTS, 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::solvation, 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 387 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 1666 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 1272 of file particle_data.c.
References Particle::bl, bonded_ia_params, IntList::e, ES_OK, i, IntList::n, Bonded_ia_parameters::num, 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 1362 of file particle_data.c.
References CellPList::cell, local_cells, CellPList::n, ParticleList::n, 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 1171 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, 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 1217 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 1133 of file particle_data.c.
References CellPList::cell, errexit(), free_particle(), ParticleProperties::identity, local_cells, CellPList::n, ParticleList::n, Particle::p, 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 1235 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 483 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 467 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 2005 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 371 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 528 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(), 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 | ( | ) |
Realloc local_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 394 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 1809 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 1734 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 1470 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 1324 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, ParticleList::part, realloc_intlist(), and this_node.
Referenced by mpi_remove_particle_slave().
| void remove_all_exclusions | ( | ) |
remove all exclusions.
Definition at line 1566 of file particle_data.c.
References mpi_send_exclusion().
Referenced by tclcommand_part().
| void remove_all_particles | ( | ) |
remove all particles.
Definition at line 1091 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 1743 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 1097 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, 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 1426 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 695 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_dip(), 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 679 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_dipm(), 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 1031 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_force(), 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 1013 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_torque(), 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 588 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_f(), 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 1048 of file particle_data.c.
References build_particle_node(), COORDS_FIX_MASK, ES_ERROR, ES_OK, max_seen_particle, mpi_send_ext_force(), 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 991 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_set_particle_gamma(), 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 624 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mass(), 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 836 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mol_id(), 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 771 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_mu_E(), 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 901 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_omega(), 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 870 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(), 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 754 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_q(), 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 854 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_quat(), 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 661 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_rotation(), 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 642 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_rotational_inertia(), and particle_node.
Referenced by tclcommand_part_parse_rotational_inertia().
| int set_particle_solvation | ( | int | part, |
| double * | solvation | ||
| ) |
Call only on the master node: set particle solvation free energy.
| part | the particle. |
| solvation | its new solvation free energy. |
Definition at line 605 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_solvation(), and particle_node.
Referenced by tclcommand_part_parse_solvation(), and tclcommand_readmd().
| 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 973 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_set_particle_temperature(), 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 951 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_torque(), 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 920 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(), 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 788 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, 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 572 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_v(), 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 716 of file particle_data.c.
References build_particle_node(), ES_ERROR, ES_OK, max_seen_particle, mpi_send_virtual(), and particle_node.
Referenced by tclcommand_part_parse_virtual().
| 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 314 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 1399 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 1291 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 1410 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 419 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 1787 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 291 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().
| int GC_init |
Definition at line 826 of file particle_data.h.
Referenced by init_gc().
Definition at line 810 of file particle_data.h.
Referenced by add_particle_to_list(), delete_particle_of_type(), find_particle_type(), find_particle_type_id(), free_particle_lists(), gc_status(), init_gc(), init_type_array(), number_of_particles_with_type(), part_parse_gc(), reallocate_type_array(), remove_id_type_array(), and update_particle_array().
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_solvation(), mpi_send_solvation_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().
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().
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_solvation(), 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().
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(), gpu_change_number_of_part_to_comm(), init_g123(), init_type_array(), lb_realloc_particles_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().
Definition at line 823 of file particle_data.h.
Referenced by init_gc(), init_type_array(), and reallocate_global_type_list().
| int* partBondPartners |
Particles' current bond partners.
partBondPartners is sorted by particle order, and the particles are stored consecutively starting with 0. This array is global to all nodes
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().
| int partCfgSorted |
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 |
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_solvation(), 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().
Definition at line 806 of file particle_data.h.
Referenced by add_particle_to_list(), find_particle_type(), find_particle_type_id(), free_particle_lists(), gc_status(), init_gc(), init_type_array(), number_of_particles_with_type(), part_parse_gc(), and remove_id_type_array().
Definition at line 822 of file particle_data.h.
Referenced by add_particle_to_list(), delete_particle_of_type(), find_particle_type(), find_particle_type_id(), free_particle_lists(), gc_status(), init_gc(), init_type_array(), number_of_particles_with_type(), part_parse_gc(), reallocate_global_type_list(), reallocate_type_array(), remove_id_type_array(), and update_particle_array().
| int Type_array_init |
Definition at line 829 of file particle_data.h.
Referenced by init_gc(), init_type_array(), part_parse_gc(), and set_particle_type().
1.7.5.1