CP2K 2.4 (Revision 12889)
Classes | Functions | Variables

particle_types Namespace Reference

Define the data structure for the particle information. More...

Classes

struct  particle_type

Functions

subroutine, public allocate_particle_set (particle_set, nparticle, error)
 Allocate a particle set.
subroutine, public deallocate_particle_set (particle_set, error)
 Deallocate a particle set.
subroutine, public get_particle_set (particle_set, first_sgf, last_sgf, nsgf, basis_set_id, basis, error)
 Get the components of a particle set.
subroutine, public write_particle_coordinates (particle_set, iunit, output_format, content, title, cell, array, unit_conv, charge_occup, charge_beta, charge_extended, error)
 Should be able to write a few formats e.g. xmol, and some binary format (dcd) some format can be used for x,v,f.
subroutine, public write_fist_particle_coordinates (particle_set, subsys_section, charges, error)
 Write the atomic coordinates to the output unit.
subroutine, public write_qs_particle_coordinates (particle_set, subsys_section, label, error)
 Write the atomic coordinates to the output unit.
subroutine, public write_particle_distances (particle_set, cell, subsys_section, error)
 Write the matrix of the particle distances to the output unit.
subroutine, public write_particle_matrix (matrix, particle_set, iw, el_per_part, Ilist, error)
subroutine, public write_structure_data (particle_set, cell, input_section, error)
 Write structure data requested by a separate structure data input section to the output unit. input_section can be either motion_section or subsys_section.
subroutine, public update_particle_set (particle_set, int_group, pos, vel, for, add, error)
REAL(KIND=dp), dimension(3), public get_particle_pos_or_vel (iatom, particle_set, vector)
 Return the atomic position or velocity of atom iatom in x from a packed vector even if core-shell particles are present.
subroutine, public update_particle_pos_or_vel (iatom, particle_set, x, vector)
 Update the atomic position or velocity by x and return the updated atomic position or velocity in x even if core-shell particles are present.

Variables

CHARACTER(len=*), parameter,
private 
moduleN = 'particle_types'

Detailed Description

Define the data structure for the particle information.

History
  • Atomic kind added in particle_type (MK,08.01.2002)
  • Functionality for particle_type added (MK,14.01.2002)
  • Allow for general coordinate input (MK,13.09.2003)
  • Molecule concept introduced (MK,26.09.2003)
  • Last atom information added (jgh,23.05.2004)
  • particle_type cleaned (MK,03.02.2005)
Author:
CJM, MK

Function Documentation

subroutine,public particle_types::allocate_particle_set ( TYPE(particle_type),dimension(:),pointer  particle_set,
INTEGER,intent(in)  nparticle,
TYPE(cp_error_type),intent(inout)  error 
)

Allocate a particle set.

Author:
MK
Date:
14.01.2002
Version:
1.0

Definition at line 106 of file particle_types.f90.

References CPPostcondition, and deallocate_particle_set().

Referenced by qmmm_types::create_add_set_type(), force_fields_all::force_field_pack_shell(), qs_loc_methods::print_wannier_traj(), topology_coordinate_util::topology_coordinate_pack(), and topology_generate_util::topology_generate_bond().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public particle_types::deallocate_particle_set ( TYPE(particle_type),dimension(:),pointer  particle_set,
TYPE(cp_error_type),intent(inout)  error 
)

Deallocate a particle set.

Author:
MK
Date:
14.01.2002
Version:
1.0

Definition at line 143 of file particle_types.f90.

References CPPostcondition, and termination::stop_program().

Referenced by allocate_particle_set(), and particle_list_types::particle_list_release().

Here is the call graph for this function:

Here is the caller graph for this function:

REAL(KIND=dp),dimension(3),public particle_types::get_particle_pos_or_vel ( INTEGER,intent(in)  iatom,
TYPE(particle_type),dimension(:),pointer  particle_set,
REAL(KIND=dp),dimension(:),intent(in)  vector 
)

Return the atomic position or velocity of atom iatom in x from a packed vector even if core-shell particles are present.

Author:
Matthias Krack
Date:
25.11.2010
Version:
1.0

Definition at line 1120 of file particle_types.f90.

Referenced by neb_io::dump_replica_coordinates(), neb_md_utils::get_temperatures(), neb_md_utils::neb_initialize_velocity(), input_cp2k_restarts::section_neb_coord_val_set(), and write_particle_coordinates().

Here is the caller graph for this function:

subroutine,public particle_types::get_particle_set ( TYPE(particle_type),dimension(:),pointer  particle_set,
INTEGER,dimension(:),intent(inout),optional  first_sgf,
INTEGER,dimension(:),intent(inout),optional  last_sgf,
INTEGER,dimension(:),intent(inout),optional  nsgf,
INTEGER,intent(in),optional  basis_set_id,
TYPE(gto_basis_set_p_type),dimension(:),optional,pointer  basis,
TYPE(cp_error_type),intent(inout)  error 
)
subroutine,public particle_types::update_particle_pos_or_vel ( INTEGER,intent(in)  iatom,
TYPE(particle_type),dimension(:),pointer  particle_set,
REAL(KIND=dp),dimension(3),intent(inout)  x,
REAL(KIND=dp),dimension(:),intent(inout)  vector 
)

Update the atomic position or velocity by x and return the updated atomic position or velocity in x even if core-shell particles are present.

Author:
Matthias Krack
Date:
26.11.2010
Version:
1.0
Note:
particle-set is not changed, only the positions or velocities in the packed vector are updated

Definition at line 1154 of file particle_types.f90.

subroutine,public particle_types::update_particle_set ( TYPE(particle_type),dimension( : ),pointer  particle_set,
INTEGER,intent(in)  int_group,
REAL(KIND=dp),dimension( :, : ),intent(inout),optional  pos,
REAL(KIND=dp),dimension( :, : ),intent(inout),optional  vel,
REAL(KIND=dp),dimension(:,:),intent(inout),optional  for,
LOGICAL,intent(in),optional  add,
TYPE(cp_error_type),intent(inout)  error 
)

Definition at line 1046 of file particle_types.f90.

References timings::timeset().

Referenced by force_env_utils::force_env_rattle(), and force_env_utils::force_env_shake().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public particle_types::write_fist_particle_coordinates ( TYPE(particle_type),dimension(:),pointer  particle_set,
TYPE(section_vals_type),pointer  subsys_section,
REAL(KIND=dp),dimension(:),pointer  charges,
TYPE(cp_error_type),intent(inout)  error 
)

Write the atomic coordinates to the output unit.

Author:
MK
Date:
05.06.2000
Version:
1.0

Definition at line 548 of file particle_types.f90.

References cp_output_handling::cp_print_key_finished_output(), cp_units::cp_unit_from_cp2k(), error, and physcon::massunit.

Here is the call graph for this function:

subroutine,public particle_types::write_particle_coordinates ( TYPE(particle_type),dimension(:),pointer  particle_set,
INTEGER  iunit,
INTEGER  output_format,
CHARACTER(LEN=*)  content,
CHARACTER(LEN=*)  title,
TYPE(cell_type),optional,pointer  cell,
REAL(KIND=dp),dimension(:),intent(in),optional  array,
REAL(KIND=dp),intent(in),optional  unit_conv,
LOGICAL,intent(in),optional  charge_occup,
LOGICAL,intent(in),optional  charge_beta,
LOGICAL,intent(in),optional  charge_extended,
TYPE(cp_error_type),intent(inout)  error 
)

Should be able to write a few formats e.g. xmol, and some binary format (dcd) some format can be used for x,v,f.

FORMAT CONTENT UNITS x, v, f XMOL POS, VEL, FORCE, POS_VEL, POS_VEL_FORCE Angstrom, a.u., a.u.

Author:
MK
Date:
14.01.2002
Version:
1.0

Definition at line 242 of file particle_types.f90.

References cell, CPPostcondition, input_constants::dump_atomic, error, get_particle_pos_or_vel(), shell_potential_types::get_shell(), qmmm_ff_fist::qmmm_ff_precond_only_qm(), termination::stop_program(), and timings::timeset().

Referenced by mc_ge_moves::mc_Quickstep_move(), mc_ensembles::mc_run_ensemble(), pint_io::pint_write_centroids(), and pint_io::pint_write_trajectory().

Here is the call graph for this function:

Here is the caller graph for this function:

subroutine,public particle_types::write_particle_distances ( TYPE(particle_type),dimension(:),pointer  particle_set,
TYPE(cell_type),pointer  cell,
TYPE(section_vals_type),pointer  subsys_section,
TYPE(cp_error_type),intent(inout)  error 
)

Write the matrix of the particle distances to the output unit.

Author:
Matthias Krack
Date:
06.10.2000
Version:
1.0

Definition at line 670 of file particle_types.f90.

References cp_output_handling::cp_print_key_finished_output(), cp_units::cp_unit_from_cp2k(), CPPostcondition, timings::timeset(), and write_particle_matrix().

Here is the call graph for this function:

subroutine,public particle_types::write_particle_matrix ( REAL(KIND=dp),dimension(:, :)  matrix,
TYPE(particle_type),dimension(:),pointer  particle_set,
INTEGER,intent(in)  iw,
INTEGER,intent(in),optional  el_per_part,
INTEGER,dimension(:),optional,pointer  Ilist,
TYPE(cp_error_type),intent(inout)  error 
)

Definition at line 733 of file particle_types.f90.

Referenced by write_particle_distances().

Here is the caller graph for this function:

subroutine,public particle_types::write_qs_particle_coordinates ( TYPE(particle_type),dimension(:),pointer  particle_set,
TYPE(section_vals_type),pointer  subsys_section,
CHARACTER(LEN=*),intent(in)  label,
TYPE(cp_error_type),intent(inout)  error 
)

Write the atomic coordinates to the output unit.

Author:
MK
Date:
05.06.2000
Version:
1.0

Definition at line 606 of file particle_types.f90.

References cp_output_handling::cp_print_key_finished_output(), cp_units::cp_unit_from_cp2k(), physcon::massunit, and timings::timeset().

Here is the call graph for this function:

subroutine,public particle_types::write_structure_data ( TYPE(particle_type),dimension(:),pointer  particle_set,
TYPE(cell_type),pointer  cell,
TYPE(section_vals_type),pointer  input_section,
TYPE(cp_error_type),intent(inout)  error 
)

Write structure data requested by a separate structure data input section to the output unit. input_section can be either motion_section or subsys_section.

Author:
MK
Date:
11.03.04
Version:
1.0
History
Recovered (23.03.06,MK)

Definition at line 795 of file particle_types.f90.

References mathlib::angle(), cp_output_handling::cp_print_key_finished_output(), cp_units::cp_unit_from_cp2k(), CPPostcondition, mathconstants::degree, input_section_types::section_vals_get_subs_vals(), timings::timeset(), and string_utilities::uppercase().

Referenced by cp_eval_at(), and md_energies::md_write_output().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

CHARACTER(len=*),parameter,private particle_types::moduleN = 'particle_types'

Definition at line 65 of file particle_types.f90.