git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13100 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2015-02-13 16:54:23 +00:00
parent 8f818715f4
commit 85bae27407
42 changed files with 3976 additions and 1295 deletions

View File

@ -399,20 +399,20 @@ This is indicated by additional letters in parenthesis: c = USER-CUDA,
g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "fix_adapt.html">adapt</A></TD><TD ><A HREF = "fix_addforce.html">addforce (c)</A></TD><TD ><A HREF = "fix_append_atoms.html">append/atoms</A></TD><TD ><A HREF = "fix_atom_swap.html">atom/swap</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce (c)</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_correlate.html">ave/correlate</A></TD><TD ><A HREF = "fix_ave_histo.html">ave/histo</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_balance.html">balance</A></TD><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD><TD ><A HREF = "fix_box_relax.html">box/relax</A></TD><TD ><A HREF = "fix_deform.html">deform</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d (c)</A></TD><TD ><A HREF = "fix_evaporate.html">evaporate</A></TD><TD ><A HREF = "fix_external.html">external</A></TD><TD ><A HREF = "fix_freeze.html">freeze (c)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD><TD ><A HREF = "fix_gld.html">gld</A></TD><TD ><A HREF = "fix_gravity.html">gravity (co)</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin (k)</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD><TD ><A HREF = "fix_momentum.html">momentum</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_move.html">move</A></TD><TD ><A HREF = "fix_msst.html">msst</A></TD><TD ><A HREF = "fix_neb.html">neb</A></TD><TD ><A HREF = "fix_nh.html">nph (o)</A></TD><TD ><A HREF = "fix_nphug.html">nphug (o)</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere (o)</A></TD><TD ><A HREF = "fix_nph_sphere.html">nph/sphere (o)</A></TD><TD ><A HREF = "fix_nh.html">npt (co)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_npt_asphere.html">npt/asphere (o)</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere (o)</A></TD><TD ><A HREF = "fix_nve.html">nve (cko)</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A></TD><TD ><A HREF = "fix_nve_body.html">nve/body</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD><TD ><A HREF = "fix_nve_line.html">nve/line</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere (o)</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt (co)</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere (o)</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod (o)</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere (o)</A></TD><TD ><A HREF = "fix_oneway.html">oneway</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_property_atom.html">property/atom</A></TD><TD ><A HREF = "fix_qeq_comb.html">qeq/comb (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_qeq.html">qeq/dynamic</A></TD><TD ><A HREF = "fix_qeq.html">qeq/point</A></TD><TD ><A HREF = "fix_qeq.html">qeq/shielded</A></TD><TD ><A HREF = "fix_qeq.html">qeq/slater</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/bonds</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_restrain.html">restrain</A></TD><TD ><A HREF = "fix_rigid.html">rigid (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/nph (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/npt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nvt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nph</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/npt</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nve</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/small/nvt</A></TD><TD ><A HREF = "fix_setforce.html">setforce (c)</A></TD><TD ><A HREF = "fix_shake.html">shake (c)</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_srd.html">srd</A></TD><TD ><A HREF = "fix_store_force.html">store/force</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_store_state.html">store/state</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen (c)</A></TD><TD ><A HREF = "fix_temp_csvr.html">temp/csvr</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale (c)</A></TD><TD ><A HREF = "fix_tfmc.html">tfmc</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD><TD ><A HREF = "fix_ttm.html">ttm</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_tune_kspace.html">tune/kspace</A></TD><TD ><A HREF = "fix_vector.html">vector</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous (c)</A></TD><TD ><A HREF = "fix_wall.html">wall/colloid</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall.html">wall/harmonic</A></TD><TD ><A HREF = "fix_wall.html">wall/lj1043</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_piston.html">wall/piston</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wall_region.html">wall/region</A></TD><TD ><A HREF = "fix_wall_srd.html">wall/srd</A>
<TR ALIGN="center"><TD ><A HREF = "fix_adapt.html">adapt</A></TD><TD ><A HREF = "fix_addforce.html">addforce (c)</A></TD><TD ><A HREF = "fix_append_atoms.html">append/atoms</A></TD><TD ><A HREF = "fix_atom_swap.html">atom/swap</A></TD><TD ><A HREF = "fix_aveforce.html">aveforce (c)</A></TD><TD ><A HREF = "fix_ave_atom.html">ave/atom</A></TD><TD ><A HREF = "fix_ave_chunk.html">ave/chunk</A></TD><TD ><A HREF = "fix_ave_correlate.html">ave/correlate</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_ave_histo.html">ave/histo</A></TD><TD ><A HREF = "fix_ave_spatial.html">ave/spatial</A></TD><TD ><A HREF = "fix_ave_time.html">ave/time</A></TD><TD ><A HREF = "fix_balance.html">balance</A></TD><TD ><A HREF = "fix_bond_break.html">bond/break</A></TD><TD ><A HREF = "fix_bond_create.html">bond/create</A></TD><TD ><A HREF = "fix_bond_swap.html">bond/swap</A></TD><TD ><A HREF = "fix_box_relax.html">box/relax</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_deform.html">deform</A></TD><TD ><A HREF = "fix_deposit.html">deposit</A></TD><TD ><A HREF = "fix_drag.html">drag</A></TD><TD ><A HREF = "fix_dt_reset.html">dt/reset</A></TD><TD ><A HREF = "fix_efield.html">efield</A></TD><TD ><A HREF = "fix_enforce2d.html">enforce2d (c)</A></TD><TD ><A HREF = "fix_evaporate.html">evaporate</A></TD><TD ><A HREF = "fix_external.html">external</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_freeze.html">freeze (c)</A></TD><TD ><A HREF = "fix_gcmc.html">gcmc</A></TD><TD ><A HREF = "fix_gld.html">gld</A></TD><TD ><A HREF = "fix_gravity.html">gravity (co)</A></TD><TD ><A HREF = "fix_heat.html">heat</A></TD><TD ><A HREF = "fix_indent.html">indent</A></TD><TD ><A HREF = "fix_langevin.html">langevin (k)</A></TD><TD ><A HREF = "fix_lineforce.html">lineforce</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_momentum.html">momentum</A></TD><TD ><A HREF = "fix_move.html">move</A></TD><TD ><A HREF = "fix_msst.html">msst</A></TD><TD ><A HREF = "fix_neb.html">neb</A></TD><TD ><A HREF = "fix_nh.html">nph (o)</A></TD><TD ><A HREF = "fix_nphug.html">nphug (o)</A></TD><TD ><A HREF = "fix_nph_asphere.html">nph/asphere (o)</A></TD><TD ><A HREF = "fix_nph_sphere.html">nph/sphere (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nh.html">npt (co)</A></TD><TD ><A HREF = "fix_npt_asphere.html">npt/asphere (o)</A></TD><TD ><A HREF = "fix_npt_sphere.html">npt/sphere (o)</A></TD><TD ><A HREF = "fix_nve.html">nve (cko)</A></TD><TD ><A HREF = "fix_nve_asphere.html">nve/asphere</A></TD><TD ><A HREF = "fix_nve_asphere_noforce.html">nve/asphere/noforce</A></TD><TD ><A HREF = "fix_nve_body.html">nve/body</A></TD><TD ><A HREF = "fix_nve_limit.html">nve/limit</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_nve_line.html">nve/line</A></TD><TD ><A HREF = "fix_nve_noforce.html">nve/noforce</A></TD><TD ><A HREF = "fix_nve_sphere.html">nve/sphere (o)</A></TD><TD ><A HREF = "fix_nve_tri.html">nve/tri</A></TD><TD ><A HREF = "fix_nh.html">nvt (co)</A></TD><TD ><A HREF = "fix_nvt_asphere.html">nvt/asphere (o)</A></TD><TD ><A HREF = "fix_nvt_sllod.html">nvt/sllod (o)</A></TD><TD ><A HREF = "fix_nvt_sphere.html">nvt/sphere (o)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_oneway.html">oneway</A></TD><TD ><A HREF = "fix_orient_fcc.html">orient/fcc</A></TD><TD ><A HREF = "fix_planeforce.html">planeforce</A></TD><TD ><A HREF = "fix_poems.html">poems</A></TD><TD ><A HREF = "fix_pour.html">pour</A></TD><TD ><A HREF = "fix_press_berendsen.html">press/berendsen</A></TD><TD ><A HREF = "fix_print.html">print</A></TD><TD ><A HREF = "fix_property_atom.html">property/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_qeq_comb.html">qeq/comb (o)</A></TD><TD ><A HREF = "fix_qeq.html">qeq/dynamic</A></TD><TD ><A HREF = "fix_qeq.html">qeq/point</A></TD><TD ><A HREF = "fix_qeq.html">qeq/shielded</A></TD><TD ><A HREF = "fix_qeq.html">qeq/slater</A></TD><TD ><A HREF = "fix_reax_bonds.html">reax/bonds</A></TD><TD ><A HREF = "fix_recenter.html">recenter</A></TD><TD ><A HREF = "fix_restrain.html">restrain</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nph (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/npt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nve (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/nvt (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small (o)</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nph</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/npt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_rigid.html">rigid/small/nve</A></TD><TD ><A HREF = "fix_rigid.html">rigid/small/nvt</A></TD><TD ><A HREF = "fix_setforce.html">setforce (c)</A></TD><TD ><A HREF = "fix_shake.html">shake (c)</A></TD><TD ><A HREF = "fix_spring.html">spring</A></TD><TD ><A HREF = "fix_spring_rg.html">spring/rg</A></TD><TD ><A HREF = "fix_spring_self.html">spring/self</A></TD><TD ><A HREF = "fix_srd.html">srd</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_store_force.html">store/force</A></TD><TD ><A HREF = "fix_store_state.html">store/state</A></TD><TD ><A HREF = "fix_temp_berendsen.html">temp/berendsen (c)</A></TD><TD ><A HREF = "fix_temp_csvr.html">temp/csvr</A></TD><TD ><A HREF = "fix_temp_rescale.html">temp/rescale (c)</A></TD><TD ><A HREF = "fix_tfmc.html">tfmc</A></TD><TD ><A HREF = "fix_thermal_conductivity.html">thermal/conductivity</A></TD><TD ><A HREF = "fix_tmd.html">tmd</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_ttm.html">ttm</A></TD><TD ><A HREF = "fix_tune_kspace.html">tune/kspace</A></TD><TD ><A HREF = "fix_vector.html">vector</A></TD><TD ><A HREF = "fix_viscosity.html">viscosity</A></TD><TD ><A HREF = "fix_viscous.html">viscous (c)</A></TD><TD ><A HREF = "fix_wall.html">wall/colloid</A></TD><TD ><A HREF = "fix_wall_gran.html">wall/gran</A></TD><TD ><A HREF = "fix_wall.html">wall/harmonic</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "fix_wall.html">wall/lj1043</A></TD><TD ><A HREF = "fix_wall.html">wall/lj126</A></TD><TD ><A HREF = "fix_wall.html">wall/lj93</A></TD><TD ><A HREF = "fix_wall_piston.html">wall/piston</A></TD><TD ><A HREF = "fix_wall_reflect.html">wall/reflect</A></TD><TD ><A HREF = "fix_wall_region.html">wall/region</A></TD><TD ><A HREF = "fix_wall_srd.html">wall/srd</A>
</TD></TR></TABLE></DIV>
<P>These are additional fix styles in USER packages, which can be used if
@ -441,17 +441,17 @@ letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "compute_angle_local.html">angle/local</A></TD><TD ><A HREF = "compute_atom_molecule.html">atom/molecule</A></TD><TD ><A HREF = "compute_body_local.html">body/local</A></TD><TD ><A HREF = "compute_bond_local.html">bond/local</A></TD><TD ><A HREF = "compute_centro_atom.html">centro/atom</A></TD><TD ><A HREF = "compute_cluster_atom.html">cluster/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_cna_atom.html">cna/atom</A></TD><TD ><A HREF = "compute_com.html">com</A></TD><TD ><A HREF = "compute_com_molecule.html">com/molecule</A></TD><TD ><A HREF = "compute_contact_atom.html">contact/atom</A></TD><TD ><A HREF = "compute_coord_atom.html">coord/atom</A></TD><TD ><A HREF = "compute_damage_atom.html">damage/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_angle_local.html">angle/local</A></TD><TD ><A HREF = "compute_body_local.html">body/local</A></TD><TD ><A HREF = "compute_bond_local.html">bond/local</A></TD><TD ><A HREF = "compute_centro_atom.html">centro/atom</A></TD><TD ><A HREF = "compute_chunk_atom.html">chunk/atom</A></TD><TD ><A HREF = "compute_cluster_atom.html">cluster/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_cna_atom.html">cna/atom</A></TD><TD ><A HREF = "compute_com.html">com</A></TD><TD ><A HREF = "compute_com_chunk.html">com/chunk</A></TD><TD ><A HREF = "compute_contact_atom.html">contact/atom</A></TD><TD ><A HREF = "compute_coord_atom.html">coord/atom</A></TD><TD ><A HREF = "compute_damage_atom.html">damage/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_dihedral_local.html">dihedral/local</A></TD><TD ><A HREF = "compute_dilatation_atom.html">dilatation/atom</A></TD><TD ><A HREF = "compute_displace_atom.html">displace/atom</A></TD><TD ><A HREF = "compute_erotate_asphere.html">erotate/asphere</A></TD><TD ><A HREF = "compute_erotate_rigid.html">erotate/rigid</A></TD><TD ><A HREF = "compute_erotate_sphere.html">erotate/sphere</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_erotate_sphere_atom.html">erotate/sphere/atom</A></TD><TD ><A HREF = "compute_event_displace.html">event/displace</A></TD><TD ><A HREF = "compute_group_group.html">group/group</A></TD><TD ><A HREF = "compute_gyration.html">gyration</A></TD><TD ><A HREF = "compute_gyration_molecule.html">gyration/molecule</A></TD><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_inertia_molecule.html">inertia/molecule</A></TD><TD ><A HREF = "compute_ke.html">ke</A></TD><TD ><A HREF = "compute_ke_atom.html">ke/atom</A></TD><TD ><A HREF = "compute_ke_rigid.html">ke/rigid</A></TD><TD ><A HREF = "compute_msd.html">msd</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_msd_molecule.html">msd/molecule</A></TD><TD ><A HREF = "compute_msd_nongauss.html">msd/nongauss</A></TD><TD ><A HREF = "compute_pair.html">pair</A></TD><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD><TD ><A HREF = "compute_pe.html">pe (c)</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_plasticity_atom.html">plasticity/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure (c)</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><TD ><A HREF = "compute_property_local.html">property/local</A></TD><TD ><A HREF = "compute_property_molecule.html">property/molecule</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_erotate_sphere_atom.html">erotate/sphere/atom</A></TD><TD ><A HREF = "compute_event_displace.html">event/displace</A></TD><TD ><A HREF = "compute_group_group.html">group/group</A></TD><TD ><A HREF = "compute_gyration.html">gyration</A></TD><TD ><A HREF = "compute_gyration_chunk.html">gyration/chunk</A></TD><TD ><A HREF = "compute_heat_flux.html">heat/flux</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_improper_local.html">improper/local</A></TD><TD ><A HREF = "compute_inertia_chunk.html">inertia/chunk</A></TD><TD ><A HREF = "compute_ke.html">ke</A></TD><TD ><A HREF = "compute_ke_atom.html">ke/atom</A></TD><TD ><A HREF = "compute_ke_rigid.html">ke/rigid</A></TD><TD ><A HREF = "compute_msd.html">msd</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_msd_chunk.html">msd/chunk</A></TD><TD ><A HREF = "compute_msd_nongauss.html">msd/nongauss</A></TD><TD ><A HREF = "compute_pair.html">pair</A></TD><TD ><A HREF = "compute_pair_local.html">pair/local</A></TD><TD ><A HREF = "compute_pe.html">pe (c)</A></TD><TD ><A HREF = "compute_pe_atom.html">pe/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_plasticity_atom.html">plasticity/atom</A></TD><TD ><A HREF = "compute_pressure.html">pressure (c)</A></TD><TD ><A HREF = "compute_property_atom.html">property/atom</A></TD><TD ><A HREF = "compute_property_local.html">property/local</A></TD><TD ><A HREF = "compute_property_chunk.html">property/chunk</A></TD><TD ><A HREF = "compute_rdf.html">rdf</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_reduce.html">reduce</A></TD><TD ><A HREF = "compute_reduce.html">reduce/region</A></TD><TD ><A HREF = "compute_slice.html">slice</A></TD><TD ><A HREF = "compute_sna.html">sna/atom</A></TD><TD ><A HREF = "compute_sna.html">snad/atom</A></TD><TD ><A HREF = "compute_sna.html">snav/atom</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD><TD ><A HREF = "compute_temp_partial.html">temp/partial (c)</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A></TD><TD ><A HREF = "compute_vacf.html">vacf</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_vcm_molecule.html">vcm/molecule</A></TD><TD ><A HREF = "compute_voronoi_atom.html">voronoi/atom</A>
<TR ALIGN="center"><TD ><A HREF = "compute_stress_atom.html">stress/atom</A></TD><TD ><A HREF = "compute_temp.html">temp (c)</A></TD><TD ><A HREF = "compute_temp_asphere.html">temp/asphere</A></TD><TD ><A HREF = "compute_temp_com.html">temp/com</A></TD><TD ><A HREF = "compute_temp_chunk.html">temp/chunk</A></TD><TD ><A HREF = "compute_temp_deform.html">temp/deform</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_temp_partial.html">temp/partial (c)</A></TD><TD ><A HREF = "compute_temp_profile.html">temp/profile</A></TD><TD ><A HREF = "compute_temp_ramp.html">temp/ramp</A></TD><TD ><A HREF = "compute_temp_region.html">temp/region</A></TD><TD ><A HREF = "compute_temp_sphere.html">temp/sphere</A></TD><TD ><A HREF = "compute_ti.html">ti</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "compute_torque_chunk.html">torque/chunk</A></TD><TD ><A HREF = "compute_vacf.html">vacf</A></TD><TD ><A HREF = "compute_vcm_chunk.html">vcm/chunk</A></TD><TD ><A HREF = "compute_voronoi_atom.html">voronoi/atom</A>
</TD></TR></TABLE></DIV>
<P>These are additional compute styles in USER packages, which can be

View File

@ -472,6 +472,7 @@ g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT.
"atom/swap"_fix_atom_swap.html,
"aveforce (c)"_fix_aveforce.html,
"ave/atom"_fix_ave_atom.html,
"ave/chunk"_fix_ave_chunk.html,
"ave/correlate"_fix_ave_correlate.html,
"ave/histo"_fix_ave_histo.html,
"ave/spatial"_fix_ave_spatial.html,
@ -627,14 +628,14 @@ letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k =
KOKKOS, o = USER-OMP, t = OPT.
"angle/local"_compute_angle_local.html,
"atom/molecule"_compute_atom_molecule.html,
"body/local"_compute_body_local.html,
"bond/local"_compute_bond_local.html,
"centro/atom"_compute_centro_atom.html,
"chunk/atom"_compute_chunk_atom.html,
"cluster/atom"_compute_cluster_atom.html,
"cna/atom"_compute_cna_atom.html,
"com"_compute_com.html,
"com/molecule"_compute_com_molecule.html,
"com/chunk"_compute_com_chunk.html,
"contact/atom"_compute_contact_atom.html,
"coord/atom"_compute_coord_atom.html,
"damage/atom"_compute_damage_atom.html,
@ -648,15 +649,15 @@ KOKKOS, o = USER-OMP, t = OPT.
"event/displace"_compute_event_displace.html,
"group/group"_compute_group_group.html,
"gyration"_compute_gyration.html,
"gyration/molecule"_compute_gyration_molecule.html,
"gyration/chunk"_compute_gyration_chunk.html,
"heat/flux"_compute_heat_flux.html,
"improper/local"_compute_improper_local.html,
"inertia/molecule"_compute_inertia_molecule.html,
"inertia/chunk"_compute_inertia_chunk.html,
"ke"_compute_ke.html,
"ke/atom"_compute_ke_atom.html,
"ke/rigid"_compute_ke_rigid.html,
"msd"_compute_msd.html,
"msd/molecule"_compute_msd_molecule.html,
"msd/chunk"_compute_msd_chunk.html,
"msd/nongauss"_compute_msd_nongauss.html,
"pair"_compute_pair.html,
"pair/local"_compute_pair_local.html,
@ -666,7 +667,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"pressure (c)"_compute_pressure.html,
"property/atom"_compute_property_atom.html,
"property/local"_compute_property_local.html,
"property/molecule"_compute_property_molecule.html,
"property/chunk"_compute_property_chunk.html,
"rdf"_compute_rdf.html,
"reduce"_compute_reduce.html,
"reduce/region"_compute_reduce.html,
@ -678,6 +679,7 @@ KOKKOS, o = USER-OMP, t = OPT.
"temp (c)"_compute_temp.html,
"temp/asphere"_compute_temp_asphere.html,
"temp/com"_compute_temp_com.html,
"temp/chunk"_compute_temp_chunk.html,
"temp/deform"_compute_temp_deform.html,
"temp/partial (c)"_compute_temp_partial.html,
"temp/profile"_compute_temp_profile.html,
@ -685,8 +687,9 @@ KOKKOS, o = USER-OMP, t = OPT.
"temp/region"_compute_temp_region.html,
"temp/sphere"_compute_temp_sphere.html,
"ti"_compute_ti.html,
"torque/chunk"_compute_torque_chunk.html,
"vacf"_compute_vacf.html,
"vcm/molecule"_compute_vcm_molecule.html,
"vcm/chunk"_compute_vcm_chunk.html,
"voronoi/atom"_compute_voronoi_atom.html :tb(c=6,ea=c)
These are additional compute styles in USER packages, which can be

View File

@ -2155,39 +2155,49 @@ and thus extract D.
<A NAME = "howto_23"></A><H4>6.23 Using chunks to calculate system properties
</H4>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a chunk (or to no chunk at all). The per-atom chunk assignments
can be used as input to two other kinds of commands, to calculate
various properties of a system:
<P>In LAMMS, "chunks" are collections of atoms, as defined by the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command, which assigns
each atom to a chunk ID (or to no chunk at all). The number of chunks
and the assignment of chunk IDs to atoms can be static or change over
time. Examples of "chunks" are molecules or spatial bins or atoms
with similar values (e.g. coordination number or potential energy).
</P>
<P>The per-atom chunk IDs can be used as input to two other kinds of
commands, to calculate various properties of a system:
</P>
<UL><LI><A HREF = "fix_ave_chunk.html">fix ave/chunk</A>
<LI>a variety of <A HREF = "compute.html">compute */chunk</A> commands
<LI>any of the <A HREF = "compute.html">compute */chunk</A> commands
</UL>
<P>Here, each of the 3 kinds of chunk-related commands is briefly
overviewed, and some examples given of how to compute
different properties with chunk commands.
overviewed. Then some examples are given of how to compute different
properties with chunk commands.
</P>
<H5><A HREF = "compute_chunk_atom.html">Compute chunk/atom</A> command
</H5>
<P>This compute assigns atoms to chunks of various styles. Only atoms in
the specified group and optional specified region are assigned to a
chunk. Here is a list of possible chunk definitions:
<P>This compute can assign atoms to chunks of various styles. Only atoms
in the specified group and optional specified region are assigned to a
chunk. Here are some possible chunk definitions:
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR><TD >atoms in same molecule </TD><TD > chunk ID = molecule ID </TD></TR>
<TR><TD >atoms with same atom type -</TD><TD > chunk ID = atom type </TD></TR>
<TR><TD >atoms of same atom type </TD><TD > chunk ID = atom type </TD></TR>
<TR><TD >all atoms with same atom property (charge, radius, etc) </TD><TD > chunk ID = output of compute property/atom </TD></TR>
<TR><TD >atoms in same cluster </TD><TD > chunk ID = output of compute cluster/atom command </TD></TR>
<TR><TD >atoms in same cluster </TD><TD > chunk ID = output of <A HREF = "compute_cluster_atom.html">compute cluster/atom</A> command </TD></TR>
<TR><TD >atoms in same spatial bin </TD><TD > chunk ID = bin ID </TD></TR>
<TR><TD >atoms in same rigid body </TD><TD > chunk ID = ID of an atom in the body </TD></TR>
<TR><TD >all atoms with same local defect structure </TD><TD > chunk ID = output of compute centro/atom or coord/atom command
<TR><TD >atoms in same rigid body </TD><TD > chunk ID = molecule ID used to define rigid bodies </TD></TR>
<TR><TD >atoms with similar potential energy </TD><TD > chunk ID = output of <A HREF = "compute_pe_atom.html">compute pe/atom</A> </TD></TR>
<TR><TD >atoms with same local defect structure </TD><TD > chunk ID = output of <A HREF = "compute_centro_atom.html">compute centro/atom</A> or <A HREF = "compute_coord_atom.html">compute coord/atom</A> command
</TD></TR></TABLE></DIV>
<P>Note that chunk IDs are integer values, so for atom properties or
computes that produce a floating point value, they will be truncated
to an integer. You could also use the compute in a variable that
scales the floating point value to spread it across multiple intergers.
</P>
<P>Spatial bins can be of various kinds, e.g. 1d bins = slabs, 2d bins =
pencils, 3d bins = boxes, spherical bins, cylindrical bins.
</P>
<P>This compute also calculates the number of chunks <I>Nchunk</I> which is
<P>This compute also calculates the number of chunks <I>Nchunk</I>, which is
used by other commands to tally per-chunk data. <I>Nchunk</I> can be a
static value or change over time (e.g. the number of clusters). The
chunk ID for an individual atom can also be static (e.g. a molecule
@ -2197,7 +2207,7 @@ ID), or dynamic (e.g. what spatial bin an atom is in as it moves).
<A HREF = "compute.html">computes</A>, <A HREF = "fix.html">fixes</A>, and
<A HREF = "variable.html">variables</A> to be used to define chunk IDs for each
atom. This means you can write your own compute or fix to output a
per-atom quantity to use as chunk ID; See
per-atom quantity to use as chunk ID. See
<A HREF = "Section_modify.html">Section_modify</A> of the documentation for how to
do this. You can also define a <A HREF = "variable.html">per-atom variable</A> in
the input script that uses a formula to generate a chunk ID for each
@ -2206,55 +2216,55 @@ atom.
<H5><A HREF = "fix_ave_chunk_atom.html">Fix ave/chunk</A> command
</H5>
<P>This fix takes the ID of a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command as input. For each chunk
chunk/atom</A> command as input. For each chunk,
it then sums one or more specified per-atom values over the atoms in
each chunk. The per-atom values can be any atom property, such as
force, charge, potential energy, kinetic energy, stress. Additional
keywords are allowed for per-chunk properties like density and
temperature. More generally any per-atom value generated by other
<A HREF = "compute.html">computes</A>, <A HREF = "fix.html">fixes</A>, and <A HREF = "variable.html">per-atom
velocity, force, charge, potential energy, kinetic energy, stress,
etc. Additional keywords are defined for per-chunk properties like
density and temperature. More generally any per-atom value generated
by other <A HREF = "compute.html">computes</A>, <A HREF = "fix.html">fixes</A>, and <A HREF = "variable.html">per-atom
variables</A>, can be summed over atoms in each chunk.
</P>
<P>Similar to other averaging fixes, this fix allows the summed per-chunk
values to be time-averaged in various ways, and output to a file. The
fix produces a global array as output with one row of values per
chunk. Global arrays or columns thereof can be used as input for
other commands, as described in the following section.
chunk.
</P>
<H5>Compute */chunk commands
</H5>
<P>Currently the following computes operate on chunks:
<P>Currently the following computes operate on chunks of atoms to produce
per-chunk values.
</P>
<UL><LI><A HREF = "compute_com_chunk.html">compute com/chunk</A>
<LI><A HREF = "compute_gyration_chunk.html">compute gyration/chunk</A>
<LI><A HREF = "compute_inertia_chunk.html">compute inertia/chunk</A>
<LI><A HREF = "compute_msd_chunk.html">compute msd/chunk</A>
<LI><A HREF = "compute_property_chunk.html">compute property/chunk</A>
<LI><A HREF = "compute_temp_chunk.html">compute temp/chunk</A>
<LI><A HREF = "compute_vcm_chunk.html">compute torque/chunk</A>
<LI><A HREF = "compute_vcm_chunk.html">compute vcm/chunk</A>
</UL>
<P>They each take the ID of a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command as input. As their names
indicate, they calculate the center-of-mass, radius of gyration,
moments of inertia, mean-squared displacement, and velocity of
center-of-mass for each chunk of atoms. The <A HREF = "compute_property_chunk.html">compute
property/chunk</A> command can be tally the
moments of inertia, mean-squared displacement, temperature, torque,
and velocity of center-of-mass for each chunk of atoms. The <A HREF = "compute_property_chunk.html">compute
property/chunk</A> command can tally the
count of atoms in each chunk and extract other per-chunk properties.
</P>
<P>The reason these various calculations are not part of the <A HREF = "fix_ave_chunk.html">fix
ave/chunk command</A>, is that each requires a more
complicated operation than simply summing and averaging over per-atom
values in each chunk. Most of them require calculation of a center of
mass, which requires summing mass*position over the atoms and dividing
by summed mass.
values in each chunk. For example, many of them require calculation
of a center of mass, which requires summing mass*position over the
atoms and then dividing by summed mass.
</P>
<P>All of these computes produce a global vector or global array as
output, wih one or more values per chunk. Global vectors or arrays
can be used as input for other commands, e.g.
output, wih one or more values per chunk. They can be used
in various ways:
</P>
<UL><LI>As input to the <A HREF = "fix_ave_time.html">fix ave/time</A> command, so the
per-chunk values output to a file it creates. The <A HREF = "fix_ave_time.html">fix
ave/time</A> command can also average the values for
each chunk over time if desired.
<UL><LI>As input to the <A HREF = "fix_ave_time.html">fix ave/time</A> command, which can
write the values to a file and optionally time average them.
<LI>As input to the <A HREF = "fix_ave_histo.html">fix ave/histo</A> command to
histogram values across chunks. E.g. a histogram of cluster sizes or
@ -2266,7 +2276,7 @@ largest cluster or fastest diffusing molecule.
</UL>
<H5>Example calculations with chunks
</H5>
<P>Here are chunk commands that can be used to calculate various
<P>Here are eaxmples using chunk commands to calculate various
properties:
</P>
<P>(1) Mimic the deprecated fix ave/spatial command, to average atom

View File

@ -2142,37 +2142,47 @@ and thus extract D.
6.23 Using chunks to calculate system properties :link(howto_23),h4
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a chunk (or to no chunk at all). The per-atom chunk assignments
can be used as input to two other kinds of commands, to calculate
various properties of a system:
In LAMMS, "chunks" are collections of atoms, as defined by the
"compute chunk/atom"_compute_chunk_atom.html command, which assigns
each atom to a chunk ID (or to no chunk at all). The number of chunks
and the assignment of chunk IDs to atoms can be static or change over
time. Examples of "chunks" are molecules or spatial bins or atoms
with similar values (e.g. coordination number or potential energy).
The per-atom chunk IDs can be used as input to two other kinds of
commands, to calculate various properties of a system:
"fix ave/chunk"_fix_ave_chunk.html
a variety of "compute */chunk"_compute.html commands :ul
any of the "compute */chunk"_compute.html commands :ul
Here, each of the 3 kinds of chunk-related commands is briefly
overviewed, and some examples given of how to compute
different properties with chunk commands.
overviewed. Then some examples are given of how to compute different
properties with chunk commands.
"Compute chunk/atom"_compute_chunk_atom.html command :h5
This compute assigns atoms to chunks of various styles. Only atoms in
the specified group and optional specified region are assigned to a
chunk. Here is a list of possible chunk definitions:
This compute can assign atoms to chunks of various styles. Only atoms
in the specified group and optional specified region are assigned to a
chunk. Here are some possible chunk definitions:
atoms in same molecule | chunk ID = molecule ID |
atoms with same atom type -| chunk ID = atom type |
atoms of same atom type | chunk ID = atom type |
all atoms with same atom property (charge, radius, etc) | chunk ID = output of compute property/atom |
atoms in same cluster | chunk ID = output of compute cluster/atom command |
atoms in same cluster | chunk ID = output of "compute cluster/atom"_compute_cluster_atom.html command |
atoms in same spatial bin | chunk ID = bin ID |
atoms in same rigid body | chunk ID = ID of an atom in the body |
all atoms with same local defect structure | chunk ID = output of compute centro/atom or coord/atom command :tb(s=|,c=2)
atoms in same rigid body | chunk ID = molecule ID used to define rigid bodies |
atoms with similar potential energy | chunk ID = output of "compute pe/atom"_compute_pe_atom.html |
atoms with same local defect structure | chunk ID = output of "compute centro/atom"_compute_centro_atom.html or "compute coord/atom"_compute_coord_atom.html command :tb(s=|,c=2)
Note that chunk IDs are integer values, so for atom properties or
computes that produce a floating point value, they will be truncated
to an integer. You could also use the compute in a variable that
scales the floating point value to spread it across multiple intergers.
Spatial bins can be of various kinds, e.g. 1d bins = slabs, 2d bins =
pencils, 3d bins = boxes, spherical bins, cylindrical bins.
This compute also calculates the number of chunks {Nchunk} which is
This compute also calculates the number of chunks {Nchunk}, which is
used by other commands to tally per-chunk data. {Nchunk} can be a
static value or change over time (e.g. the number of clusters). The
chunk ID for an individual atom can also be static (e.g. a molecule
@ -2182,7 +2192,7 @@ Note that this compute allows the per-atom output of other
"computes"_compute.html, "fixes"_fix.html, and
"variables"_variable.html to be used to define chunk IDs for each
atom. This means you can write your own compute or fix to output a
per-atom quantity to use as chunk ID; See
per-atom quantity to use as chunk ID. See
"Section_modify"_Section_modify.html of the documentation for how to
do this. You can also define a "per-atom variable"_variable.html in
the input script that uses a formula to generate a chunk ID for each
@ -2191,55 +2201,55 @@ atom.
"Fix ave/chunk"_fix_ave_chunk_atom.html command :h5
This fix takes the ID of a "compute
chunk/atom"_compute_chunk_atom.html command as input. For each chunk
chunk/atom"_compute_chunk_atom.html command as input. For each chunk,
it then sums one or more specified per-atom values over the atoms in
each chunk. The per-atom values can be any atom property, such as
force, charge, potential energy, kinetic energy, stress. Additional
keywords are allowed for per-chunk properties like density and
temperature. More generally any per-atom value generated by other
"computes"_compute.html, "fixes"_fix.html, and "per-atom
velocity, force, charge, potential energy, kinetic energy, stress,
etc. Additional keywords are defined for per-chunk properties like
density and temperature. More generally any per-atom value generated
by other "computes"_compute.html, "fixes"_fix.html, and "per-atom
variables"_variable.html, can be summed over atoms in each chunk.
Similar to other averaging fixes, this fix allows the summed per-chunk
values to be time-averaged in various ways, and output to a file. The
fix produces a global array as output with one row of values per
chunk. Global arrays or columns thereof can be used as input for
other commands, as described in the following section.
chunk.
Compute */chunk commands :h5
Currently the following computes operate on chunks:
Currently the following computes operate on chunks of atoms to produce
per-chunk values.
"compute com/chunk"_compute_com_chunk.html
"compute gyration/chunk"_compute_gyration_chunk.html
"compute inertia/chunk"_compute_inertia_chunk.html
"compute msd/chunk"_compute_msd_chunk.html
"compute property/chunk"_compute_property_chunk.html
"compute temp/chunk"_compute_temp_chunk.html
"compute torque/chunk"_compute_vcm_chunk.html
"compute vcm/chunk"_compute_vcm_chunk.html :ul
They each take the ID of a "compute
chunk/atom"_compute_chunk_atom.html command as input. As their names
indicate, they calculate the center-of-mass, radius of gyration,
moments of inertia, mean-squared displacement, and velocity of
center-of-mass for each chunk of atoms. The "compute
property/chunk"_compute_property_chunk.html command can be tally the
moments of inertia, mean-squared displacement, temperature, torque,
and velocity of center-of-mass for each chunk of atoms. The "compute
property/chunk"_compute_property_chunk.html command can tally the
count of atoms in each chunk and extract other per-chunk properties.
The reason these various calculations are not part of the "fix
ave/chunk command"_fix_ave_chunk.html, is that each requires a more
complicated operation than simply summing and averaging over per-atom
values in each chunk. Most of them require calculation of a center of
mass, which requires summing mass*position over the atoms and dividing
by summed mass.
values in each chunk. For example, many of them require calculation
of a center of mass, which requires summing mass*position over the
atoms and then dividing by summed mass.
All of these computes produce a global vector or global array as
output, wih one or more values per chunk. Global vectors or arrays
can be used as input for other commands, e.g.
output, wih one or more values per chunk. They can be used
in various ways:
As input to the "fix ave/time"_fix_ave_time.html command, so the
per-chunk values output to a file it creates. The "fix
ave/time"_fix_ave_time.html command can also average the values for
each chunk over time if desired. :ulb,l
As input to the "fix ave/time"_fix_ave_time.html command, which can
write the values to a file and optionally time average them. :ulb,l
As input to the "fix ave/histo"_fix_ave_histo.html command to
histogram values across chunks. E.g. a histogram of cluster sizes or
@ -2251,7 +2261,7 @@ largest cluster or fastest diffusing molecule. :l,ule
Example calculations with chunks :h5
Here are chunk commands that can be used to calculate various
Here are eaxmples using chunk commands to calculate various
properties:
(1) Mimic the deprecated fix ave/spatial command, to average atom

View File

@ -180,14 +180,13 @@ are given in the compute section of <A HREF = "Section_commands.html#cmd_5">this
page</A>.
</P>
<UL><LI><A HREF = "compute_bond_local.html">angle/local</A> - theta and energy of each angle
<LI><A HREF = "compute_atom_molecule.html">atom/molecule</A> - sum per-atom properties for each molecule
<LI><A HREF = "compute_body_local.html">body/local</A> - attributes of body sub-particles
<LI><A HREF = "compute_bond_local.html">bond/local</A> - distance and energy of each bond
<LI><A HREF = "compute_centro_atom.html">centro/atom</A> - centro-symmetry parameter for each atom
<LI><A HREF = "compute_cluster_atom.html">cluster/atom</A> - cluster ID for each atom
<LI><A HREF = "compute_cna_atom.html">cna/atom</A> - common neighbor analysis (CNA) for each atom
<LI><A HREF = "compute_com.html">com</A> - center-of-mass of group of atoms
<LI><A HREF = "compute_com_molecule.html">com/molecule</A> - center-of-mass for each molecule
<LI><A HREF = "compute_com_chunk.html">com/chunk</A> - center-of-mass for each chunk
<LI><A HREF = "compute_contact_atom.html">contact/atom</A> - contact count for each spherical particle
<LI><A HREF = "compute_coord_atom.html">coord/atom</A> - coordination number for each atom
<LI><A HREF = "compute_damage_atom.html">damage/atom</A> - Peridynamic damage for each atom
@ -201,15 +200,15 @@ page</A>.
<LI><A HREF = "compute_event_displace.html">event/displace</A> - detect event on atom displacement
<LI><A HREF = "compute_group_group.html">group/group</A> - energy/force between two groups of atoms
<LI><A HREF = "compute_gyration.html">gyration</A> - radius of gyration of group of atoms
<LI><A HREF = "compute_gyration_molecule.html">gyration/molecule</A> - radius of gyration for each molecule
<LI><A HREF = "compute_gyration_chunk.html">gyration/chunk</A> - radius of gyration for each chunk
<LI><A HREF = "compute_heat_flux.html">heat/flux</A> - heat flux through a group of atoms
<LI><A HREF = "compute_improper_local.html">improper/local</A> - angle of each improper
<LI><A HREF = "compute_inertia_molecule.html">inertia/molecule</A> - inertia tensor for each molecule
<LI><A HREF = "compute_inertia_chunk.html">inertia/chunk</A> - inertia tensor for each chunk
<LI><A HREF = "compute_ke.html">ke</A> - translational kinetic energy
<LI><A HREF = "compute_ke_atom.html">ke/atom</A> - kinetic energy for each atom
<LI><A HREF = "compute_ke_rigid.html">ke/rigid</A> - translational kinetic energy of rigid bodies
<LI><A HREF = "compute_msd.html">msd</A> - mean-squared displacement of group of atoms
<LI><A HREF = "compute_msd_molecule.html">msd/molecule</A> - mean-squared displacement for each molecule
<LI><A HREF = "compute_msd_chunk.html">msd/chunk</A> - mean-squared displacement for each chunk
<LI><A HREF = "compute_msd_nongauss.html">msd/nongauss</A> - MSD and non-Gaussian parameter of group of atoms
<LI><A HREF = "compute_pair.html">pair</A> - values computed by a pair style
<LI><A HREF = "compute_pair_local.html">pair/local</A> - distance/energy/force of each pairwise interaction
@ -219,7 +218,7 @@ page</A>.
<LI><A HREF = "compute_pressure.html">pressure</A> - total pressure and pressure tensor
<LI><A HREF = "compute_property_atom.html">property/atom</A> - convert atom attributes to per-atom vectors/arrays
<LI><A HREF = "compute_property_local.html">property/local</A> - convert local attributes to localvectors/arrays
<LI><A HREF = "compute_property_molecule.html">property/molecule</A> - convert molecule attributes to localvectors/arrays
<LI><A HREF = "compute_property_chunk.html">property/chunk</A> - extract various per-chunk attributes
<LI><A HREF = "compute_rdf.html">rdf</A> - radial distribution function g(r) histogram of group of atoms
<LI><A HREF = "compute_reduce.html">reduce</A> - combine per-atom quantities into a single global value
<LI><A HREF = "compute_reduce.html">reduce/region</A> - same as compute reduce, within a region
@ -230,6 +229,7 @@ page</A>.
<LI><A HREF = "compute_stress_atom.html">stress/atom</A> - stress tensor for each atom
<LI><A HREF = "compute_temp.html">temp</A> - temperature of group of atoms
<LI><A HREF = "compute_temp_asphere.html">temp/asphere</A> - temperature of aspherical particles
<LI><A HREF = "compute_temp_chunk.html">temp/chunk</A> - temperature of each chunk
<LI><A HREF = "compute_temp_com.html">temp/com</A> - temperature after subtracting center-of-mass velocity
<LI><A HREF = "compute_temp_deform.html">temp/deform</A> - temperature excluding box deformation velocity
<LI><A HREF = "compute_temp_partial.html">temp/partial</A> - temperature excluding one or more dimensions of velocity
@ -238,7 +238,9 @@ page</A>.
<LI><A HREF = "compute_temp_region.html">temp/region</A> - temperature of a region of atoms
<LI><A HREF = "compute_temp_sphere.html">temp/sphere</A> - temperature of spherical particles
<LI><A HREF = "compute_ti.html">ti</A> - thermodyanmic integration free energy values
<LI><A HREF = "compute_torque_chunk.html">torque/chunk</A> - torque applied on each chunk
<LI><A HREF = "compute_vacf.html">vacf</A> - velocity-autocorrelation function of group of atoms
<LI><A HREF = "compute_vcm_chunk.html">vcm/chunk</A> - velocity of center-of-mass for each chunk
<LI><A HREF = "compute_voronoi_atom.html">voronoi/atom</A> - Voronoi volume and neighbors for each atom
</UL>
<P>There are also additional compute styles submitted by users which are

View File

@ -175,14 +175,13 @@ are given in the compute section of "this
page"_Section_commands.html#cmd_5.
"angle/local"_compute_bond_local.html - theta and energy of each angle
"atom/molecule"_compute_atom_molecule.html - sum per-atom properties for each molecule
"body/local"_compute_body_local.html - attributes of body sub-particles
"bond/local"_compute_bond_local.html - distance and energy of each bond
"centro/atom"_compute_centro_atom.html - centro-symmetry parameter for each atom
"cluster/atom"_compute_cluster_atom.html - cluster ID for each atom
"cna/atom"_compute_cna_atom.html - common neighbor analysis (CNA) for each atom
"com"_compute_com.html - center-of-mass of group of atoms
"com/molecule"_compute_com_molecule.html - center-of-mass for each molecule
"com/chunk"_compute_com_chunk.html - center-of-mass for each chunk
"contact/atom"_compute_contact_atom.html - contact count for each spherical particle
"coord/atom"_compute_coord_atom.html - coordination number for each atom
"damage/atom"_compute_damage_atom.html - Peridynamic damage for each atom
@ -196,15 +195,15 @@ page"_Section_commands.html#cmd_5.
"event/displace"_compute_event_displace.html - detect event on atom displacement
"group/group"_compute_group_group.html - energy/force between two groups of atoms
"gyration"_compute_gyration.html - radius of gyration of group of atoms
"gyration/molecule"_compute_gyration_molecule.html - radius of gyration for each molecule
"gyration/chunk"_compute_gyration_chunk.html - radius of gyration for each chunk
"heat/flux"_compute_heat_flux.html - heat flux through a group of atoms
"improper/local"_compute_improper_local.html - angle of each improper
"inertia/molecule"_compute_inertia_molecule.html - inertia tensor for each molecule
"inertia/chunk"_compute_inertia_chunk.html - inertia tensor for each chunk
"ke"_compute_ke.html - translational kinetic energy
"ke/atom"_compute_ke_atom.html - kinetic energy for each atom
"ke/rigid"_compute_ke_rigid.html - translational kinetic energy of rigid bodies
"msd"_compute_msd.html - mean-squared displacement of group of atoms
"msd/molecule"_compute_msd_molecule.html - mean-squared displacement for each molecule
"msd/chunk"_compute_msd_chunk.html - mean-squared displacement for each chunk
"msd/nongauss"_compute_msd_nongauss.html - MSD and non-Gaussian parameter of group of atoms
"pair"_compute_pair.html - values computed by a pair style
"pair/local"_compute_pair_local.html - distance/energy/force of each pairwise interaction
@ -214,7 +213,7 @@ page"_Section_commands.html#cmd_5.
"pressure"_compute_pressure.html - total pressure and pressure tensor
"property/atom"_compute_property_atom.html - convert atom attributes to per-atom vectors/arrays
"property/local"_compute_property_local.html - convert local attributes to localvectors/arrays
"property/molecule"_compute_property_molecule.html - convert molecule attributes to localvectors/arrays
"property/chunk"_compute_property_chunk.html - extract various per-chunk attributes
"rdf"_compute_rdf.html - radial distribution function g(r) histogram of group of atoms
"reduce"_compute_reduce.html - combine per-atom quantities into a single global value
"reduce/region"_compute_reduce.html - same as compute reduce, within a region
@ -225,6 +224,7 @@ page"_Section_commands.html#cmd_5.
"stress/atom"_compute_stress_atom.html - stress tensor for each atom
"temp"_compute_temp.html - temperature of group of atoms
"temp/asphere"_compute_temp_asphere.html - temperature of aspherical particles
"temp/chunk"_compute_temp_chunk.html - temperature of each chunk
"temp/com"_compute_temp_com.html - temperature after subtracting center-of-mass velocity
"temp/deform"_compute_temp_deform.html - temperature excluding box deformation velocity
"temp/partial"_compute_temp_partial.html - temperature excluding one or more dimensions of velocity
@ -233,7 +233,9 @@ page"_Section_commands.html#cmd_5.
"temp/region"_compute_temp_region.html - temperature of a region of atoms
"temp/sphere"_compute_temp_sphere.html - temperature of spherical particles
"ti"_compute_ti.html - thermodyanmic integration free energy values
"torque/chunk"_compute_torque_chunk.html - torque applied on each chunk
"vacf"_compute_vacf.html - velocity-autocorrelation function of group of atoms
"vcm/chunk"_compute_vcm_chunk.html - velocity of center-of-mass for each chunk
"voronoi/atom"_compute_voronoi_atom.html - Voronoi volume and neighbors for each atom :ul
There are also additional compute styles submitted by users which are

View File

@ -1,128 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute atom/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID atom/molecule input1 input2 ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>atom/molecule = style name of this compute command
<LI>one or more inputs can be listed
<LI>input = c_ID, c_ID[N], f_ID, f_ID[N], v_name
<PRE> c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all atom/molecule c_ke c_pe
compute 1 top atom/molecule v_myFormula c_stress[3]
</PRE>
<P><B>Description:</B>
</P>
<P>Define a calculation that sums per-atom values on a per-molecule
basis, one per listed input. The inputs can <A HREF = "compute.html">computes</A>,
<A HREF = "fix.html">fixes</A>, or <A HREF = "variable.html">variables</A> that generate per-atom
quantities. Note that attributes stored by atoms, such as mass or
force, can also be summed on a per-molecule basis, by accessing these
quantities via the <A HREF = "compute_property_atom.html">compute property/atom</A>
command.
</P>
<P>Each listed input is operated on independently. Only atoms within the
specified group contribute to the per-molecule sum. Note that compute
or fix inputs define their own group which may affect the quantities
they return. For example, if a compute is used as an input which
generates a per-atom vector, it will generate values of 0.0 for atoms
that are not in the group specified for that compute.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>If an input begins with "c_", a compute ID must follow which has been
previously defined in the input script and which generates per-atom
quantities. See the individual <A HREF = "compute.html">compute</A> doc page for
details. If no bracketed integer is appended, the vector calculated
by the compute is used. If a bracketed integer is appended, the Ith
column of the array calculated by the compute is used. Users can also
write code for their own compute styles and <A HREF = "Section_modify.html">add them to
LAMMPS</A>.
</P>
<P>If an input begins with "f_", a fix ID must follow which has been
previously defined in the input script and which generates per-atom
quantities. See the individual <A HREF = "fix.html">fix</A> doc page for details.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with when compute atom/molecule references
the values, else an error results. If no bracketed integer is
appended, the vector calculated by the fix is used. If a bracketed
integer is appended, the Ith column of the array calculated by the fix
is used. Users can also write code for their own fix style and <A HREF = "Section_modify.html">add
them to LAMMPS</A>.
</P>
<P>If an input begins with "v_", a variable name must follow which has
been previously defined in the input script. It must be an
<A HREF = "variable.html">atom-style variable</A>. Atom-style variables can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to sum
on a per-molecule basis.
</P>
<P>Here is an example of using this command to sum up the components of
total force on each molecule and print them to a file every 1000
timesteps. The printed values could also be time-averaged by the fix
ave/time command if desired, by changing "1000 1 1000" to "10 100
1000" (for example):
</P>
<PRE>compute 1 all property/atom fx fy fz
compute 2 all atom/molecule c_1[1] c_1[2] c_1[3]
fix 1 all ave/time 1000 1 1000 c_2 mode vector file tmp.molecule.force
</PRE>
<HR>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of molecules. If a single input is
specified, a global vector is produced. If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs. The vector or array can be accessed by any
command that uses global values from a compute as input. See <A HREF = "Section_howto.html#howto_15">this
section</A> for an overview of LAMMPS output
options.
</P>
<P>All the vector or array values calculated by this compute are
"extensive".
</P>
<P>The vector or array values will be in whatever <A HREF = "units.html">units</A> the
input quantities are in.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute.html">compute</A>, <A HREF = "fix.html">fix</A>, <A HREF = "variable.html">variable</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,118 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute atom/molecule command :h3
[Syntax:]
compute ID group-ID atom/molecule input1 input2 ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
atom/molecule = style name of this compute command :l
one or more inputs can be listed :l
input = c_ID, c_ID\[N\], f_ID, f_ID\[N\], v_name :l
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name :pre
:ule
[Examples:]
compute 1 all atom/molecule c_ke c_pe
compute 1 top atom/molecule v_myFormula c_stress\[3\] :pre
[Description:]
Define a calculation that sums per-atom values on a per-molecule
basis, one per listed input. The inputs can "computes"_compute.html,
"fixes"_fix.html, or "variables"_variable.html that generate per-atom
quantities. Note that attributes stored by atoms, such as mass or
force, can also be summed on a per-molecule basis, by accessing these
quantities via the "compute property/atom"_compute_property_atom.html
command.
Each listed input is operated on independently. Only atoms within the
specified group contribute to the per-molecule sum. Note that compute
or fix inputs define their own group which may affect the quantities
they return. For example, if a compute is used as an input which
generates a per-atom vector, it will generate values of 0.0 for atoms
that are not in the group specified for that compute.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
If an input begins with "c_", a compute ID must follow which has been
previously defined in the input script and which generates per-atom
quantities. See the individual "compute"_compute.html doc page for
details. If no bracketed integer is appended, the vector calculated
by the compute is used. If a bracketed integer is appended, the Ith
column of the array calculated by the compute is used. Users can also
write code for their own compute styles and "add them to
LAMMPS"_Section_modify.html.
If an input begins with "f_", a fix ID must follow which has been
previously defined in the input script and which generates per-atom
quantities. See the individual "fix"_fix.html doc page for details.
Note that some fixes only produce their values on certain timesteps,
which must be compatible with when compute atom/molecule references
the values, else an error results. If no bracketed integer is
appended, the vector calculated by the fix is used. If a bracketed
integer is appended, the Ith column of the array calculated by the fix
is used. Users can also write code for their own fix style and "add
them to LAMMPS"_Section_modify.html.
If an input begins with "v_", a variable name must follow which has
been previously defined in the input script. It must be an
"atom-style variable"_variable.html. Atom-style variables can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to sum
on a per-molecule basis.
Here is an example of using this command to sum up the components of
total force on each molecule and print them to a file every 1000
timesteps. The printed values could also be time-averaged by the fix
ave/time command if desired, by changing "1000 1 1000" to "10 100
1000" (for example):
compute 1 all property/atom fx fy fz
compute 2 all atom/molecule c_1\[1\] c_1\[2\] c_1\[3\]
fix 1 all ave/time 1000 1 1000 c_2 mode vector file tmp.molecule.force :pre
:line
[Output info:]
This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of molecules. If a single input is
specified, a global vector is produced. If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs. The vector or array can be accessed by any
command that uses global values from a compute as input. See "this
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
All the vector or array values calculated by this compute are
"extensive".
The vector or array values will be in whatever "units"_units.html the
input quantities are in.
[Restrictions:] none
[Related commands:]
"compute"_compute.html, "fix"_fix.html, "variable"_variable.html
[Default:] none

568
doc/compute_chunk_atom.html Normal file
View File

@ -0,0 +1,568 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute chunk/atom command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID chunk/atom style args keyword values ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>chunk/atom = style name of this compute command
<PRE>style = <I>bin/1d</I> or <I>bin/2d</I> or <I>bin/3d</I> or <I>type</I> or <I>molecule</I> or <I>compute/fix/variable</I>
<I>bin/1d</I> args = dim origin delta
dim = <I>x</I> or <I>y</I> or <I>z</I>
origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
<I>bin/2d</I> args = dim origin delta dim origin delta
dim = <I>x</I> or <I>y</I> or <I>z</I>
origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
<I>bin/3d</I> args = dim origin delta dim origin delta dim origin delta
dim = <I>x</I> or <I>y</I> or <I>z</I>
origin = <I>lower</I> or <I>center</I> or <I>upper</I> or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
<I>type</I> args = none
<I>molecule</I> args = none
<I>compute/fix/variable</I> = c_ID, c_ID[I], f_ID, f_ID[I], v_name with no args
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
</PRE>
<LI>zero or more keyword/values pairs may be appended
<LI>keyword = <I>region</I> or <I>nchunk</I> or <I>static</I> or <I>compress</I> or <I>bound</I> or <I>discard</I> or <I>units</I>
<PRE> <I>region</I> value = region-ID
region-ID = ID of region atoms must be in to be part of a chunk
<I>nchunk</I> value = <I>once</I> or <I>every</I>
once = only compute the number of chunks once
every = re-compute the number of chunks whenever invoked
<I>limit</I> values = 0 or Nc max or Nc exact
0 = no limit on the number of chunks
Nc max = limit number of chunks to be <= Nc
Nc exact = set number of chunks to exactly Nc
<I>ids</I> value = <I>once</I> or <I>nfreq</I> or <I>every</I>
once = assign chunk IDs to atoms only once, they persist thereafter
nfreq = assign chunk IDs to atoms only once every Nfreq steps (if invoked by <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> which sets Nfreq)
every = assign chunk IDs to atoms whenever invoked
<I>compress</I> value = <I>yes</I> or <I>no</I>
yes = compress chunk IDs to eliminate IDs with no atoms
no = do not compress chunk IDs even if some IDs have no atoms
<I>discard</I> value = <I>yes</I> or <I>no</I> or <I>mixed</I>
yes = discard atoms with out-of-range chunk IDs by assigning a chunk ID = 0
no = keep atoms with out-of-range chunk IDs by assigning a valid chunk ID
mixed = keep or discard such atoms according to spatial binning rule
<I>bound</I> values = x/y/z lo hi
x/y/z = <I>x</I> or <I>y</I> or <I>z</I> to bound sptial bins in this dimension
lo = <I>lower</I> or coordinate value (distance units)
hi = <I>upper</I> or coordinate value (distance units)
<I>units</I> value = <I>box</I> or <I>lattice</I> or <I>reduced</I>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all chunk/atom type
compute 1 all chunk/atom bin/1d z lower 0.02 units reduced
compute 1 all chunk/atom bin/2d z lower 1.0 y 0.0 2.5
compute 1 all chunk/atom molecule region sphere nchunk once ids once compress yes
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates an integer chunk ID from 1 to
Nchunk for each atom in the group. Values of chunk IDs are determined
by the <I>style</I> of chunk, which can be based on atom type or molecule
ID or spatial binning or a per-atom property or value calculated by
another <A HREF = "compute.html">compute</A>, <A HREF = "fix.html">fix</A>, or <A HREF = "variable.html">atom-style
variable</A>. Per-atom chunk IDs can be used by other
computes with "chunk" in their style name, such as <A HREF = "compute_com_chunk.html">compute
com/chunk</A> or <A HREF = "compute_msd_chunk.html">compute
msd/chunk</A>. Or they can be used by the <A HREF = "fix_ave_chunk.html">fix
ave/chunk</A> command to sum and time average a
variety of per-atom properties over the atoms in each chunk. Or they
can simply be accessed by any command that uses per-atom values from a
compute as input, as discussed in <A HREF = "Section_howto.html#howto_15">Section_howto
15</A>.
</P>
<P>See <A HREF = "Section_howto.html#howto_23">Section_howto 23</A> for an overview of
how this compute can be used with a variety of other commands to
tabulate properties of a simulation. The howto section gives several
examples of input script commands that can be used to calculate
interesting properties.
</P>
<P>Conceptually it is important to realize that this compute does two
simple things. First, it sets the value of <I>Nchunk</I> = the number of
chunks, which can be a constant value or change over time. Second, it
assigns each atom to a chunk via a chunk ID. Chunk IDs range from 1
to <I>Nchunk</I> inclusive; some chunks may have no atoms assigned to them.
Atoms that do not belong to any chunk are assigned a value of 0. Note
that the two operations are not always performed together. For
example, spatial bins can be setup once (which sets <I>Nchunk</I>), and
atoms assigned to those bins many times thereafter (setting their
chunk IDs).
</P>
<P>All other commands in LAMMPS that use chunk IDs assume there are
<I>Nchunk</I> number of chunks, and that every atom is assigned to one of
those chunks, or not assigned to any chunk.
</P>
<P>There are many options for specifying for how and when <I>Nchunk</I> is
calculated, and how and when chunk IDs are assigned to atoms. The
details depend on the chunk <I>style</I> and its <I>args</I>, as well as
optional keyword settings. They can also depend on whether a <A HREF = "fix_ave_chunk.html">fix
ave/chunk</A> command is using this compute, since
that command requires <I>Nchunk</I> to remain static across windows of
timesteps it specifies, while it accumulates per-chunk averages.
</P>
<P>The details are described below.
</P>
<HR>
<HR>
<P>The different chunk styles operate as follows. For each style, how it
calculates <I>Nchunk</I> and assigns chunk IDs to atoms is explained. Note
that using the optional keywords can change both of those actions, as
described further below where the keywords are discussed.
</P>
<HR>
<P>The <I>binning</I> styles perform a spatial binning of atoms, and assign an
atom the chunk ID corresponding to the bin number it is in. <I>Nchunk</I>
is set to the number of bins, which can change if the simulation box
size changes.
</P>
<P>The <I>bin/1d</I>, <I>bin/2d</I>, and <I>bin/3d</I> styles define bins as 1d layers
(slabs), 2d pencils, or 3d boxes. The <I>dim</I>, <I>origin</I>, and <I>delta</I>
settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is
no restriction on specifying dim = x before dim = y or z, or dim = y
before dim = z. Bins in a particular <I>dim</I> have a bin size in that
dimension given by <I>delta</I>. In each dimension, bins are defined
relative to a specified <I>origin</I>, which may be the lower/upper edge of
the simulation box (in that dimension), or its center point, or a
specified coordinate value. Starting at the origin, sufficient bins
are created in both directions to completely span the simulation box
or the bounds specified by the optional <I>bounds</I> keyword.
</P>
<P>For orthogonal simulation boxes, the bins are layers, pencils, or
boxes aligned with the xyz coordinate axes. For triclinic
(non-orthogonal) simulation boxes, the bin faces are parallel to the
tilted faces of the simulation box. See <A HREF = "Section_howto.html#howto_12">this
section</A> of the manual for a discussion of
the geometry of triclinic boxes in LAMMPS. As described there, a
tilted simulation box has edge vectors a,b,c. In that nomenclature,
bins in the x dimension have faces with normals in the "b" cross "c"
direction. Bins in y have faces normal to the "a" cross "c"
direction. And bins in z have faces normal to the "a" cross "b"
direction. Note that in order to define the size and position of
these bins in an unambiguous fashion, the <I>units</I> option must be set
to <I>reduced</I> when using a triclinic simulation box, as noted below.
</P>
<P>The meaning of <I>origin</I> and <I>delta</I> for triclinic boxes is as follows.
Consider a triclinic box with bins that are 1d layers or slabs in the
x dimension. No matter how the box is tilted, an <I>origin</I> of 0.0
means start layers at the lower "b" cross "c" plane of the simulation
box and an <I>origin</I> of 1.0 means to start layers at the upper "b"
cross "c" face of the box. A <I>delta</I> value of 0.1 in <I>reduced</I> units
means there will be 10 layers from 0.0 to 1.0, regardless of the
current size or shape of the simulation box.
</P>
<P>The created bins (and hence the chunk IDs) are numbered consecutively
from 1 to the number of bins = <I>Nchunk</I>. For 2d and 3d bins, the
numbering varies most rapidly in the first dimension (which could be
x, y, or z), next rapidly in the 2nd dimension, and most slowly in the
3rd dimension.
</P>
<P>Each time this compute is invoked, each atom is mapped to a bin based
on its current position. Note that between reneighboring timesteps,
atoms can move outside the current simulation box. If the box is
periodic (in that dimension) the atom is remapping into the periodic
box for purposes of binning. If the box in not periodic, the atom may
have moved outside the bounds of all bins. If an atom is not inside
any bin, the <I>discard</I> keyword is used to determine how a chunk ID is
assigned to the atom.
</P>
<HR>
<P>The <I>type</I> style uses the atom type as the chunk ID. <I>Nchunk</I> is set
to the number of atom types defined for the simulation, e.g. via the
<A HREF = "create_box.html">create_box</A> or <A HREF = "read_data.html">read_data</A> commands.
</P>
<HR>
<P>The <I>molecule</I> style uses the molecule ID of each atom as its chunk
ID. <I>Nchunk</I> is set to the largest chunk ID. Note that this excludes
molecule IDs for atoms which are not in the specified group or
optional region.
</P>
<P>There is no requirement that all atoms in a particular molecule are
assigned the same chunk ID (zero or non-zero), though you probably
want that to be the case, if you wish to compute a per-molecule
property. LAMMPS will issue a warning if that is not the case, but
only the first time that <I>Nchunk</I> is calculated.
</P>
<P>Note that atoms with a molecule ID = 0, which may be non-molecular
solvent atoms, have an out-of-range chunk ID. These atoms are
discarded (not assigned to any chunk) or assigned to <I>Nchunk</I>,
depending on the value of the <I>discard</I> keyword.
</P>
<HR>
<P>The <I>compute/fix/variable</I> styles set the chunk ID of each atom based
on a quantity calculated and stored by a compute, fix, or variable.
In each case, it must be a per-atom quantity. In each case the
referenced floating point values are converted to an integer chunk ID
as follows. The floating point value is truncated (rounded down) to
an integer value. If the integer value is <= 0, then a chunk ID of 0
is assigned to the atom. If the integer value is > 0, it becomes the
chunk ID to the atom. <I>Nchunk</I> is set to the largest chunk ID. Note
that this excludes atoms which are not in the specified group or
optional region.
</P>
<P>If the style begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>.
</P>
<P>If the style begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with the
timestep on which this compute accesses the fix, else an error
results. Users can also write code for their own fix styles and <A HREF = "Section_modify.html">add
them to LAMMPS</A>.
</P>
<P>If a value begins with "v_", a variable name for an <I>atom</I> or
<I>atomfile</I> style <A HREF = "variable.html">variable</A> must follow which has been
previously defined in the input script. Variables of style <I>atom</I> can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to
treat as a chunk ID.
</P>
<HR>
<HR>
<P>Normally, <I>Nchunk</I> = the number of chunks, is re-calculated every time
this fix is invoked, though the value may or may not change. As
explained below, the <I>nchunk</I> keyword can be set to <I>once</I> which means
<I>Nchunk</I> will never change.
</P>
<P>If a <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> command uses this compute, it
can also turn off the re-calculation of <I>Nchunk</I> for one or more
windows of timesteps. The extent of the windows, during which Nchunk
is held constant, are determined by the <I>Nevery</I>, <I>Nrepeat</I>, <I>Nfreq</I>
values and the <I>ave</I> keyword setting that are used by the <A HREF = "fix_ave_chunk.html">fix
ave/chunk</A> command.
</P>
<P>Specifically, if <I>ave</I> = <I>one</I>, then for each span of <I>Nfreq</I>
timesteps, <I>Nchunk</I> is held constant between the first timestep when
averaging is done (within the Nfreq-length window), and the last
timestep when averaging is done (multiple of Nfreq). If <I>ave</I> =
<I>running</I> or <I>window</I>, then <I>Nchunk</I> is held constant forever,
starting on the first timestep when the <A HREF = "fix_ave_chunk.html">fix
ave/chunk</A> command invokes this compute.
</P>
<P>Note that multiple <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> commands can use
the same compute chunk/atom compute. However, the time windows they
induce for holding <I>Nchunk</I> constant must be identical, else an error
will be generated.
</P>
<HR>
<HR>
<P>The various optional keywords operate as follows. Note that some of
them function differently or are ignored by different chunk styles.
Some of them also have different default values, depending on
the chunk style, as listed below.
</P>
<P>The <I>region</I> keyword applies to all chunk styles. If used, an atom
must be in both the specified group and the specified geometric
<A HREF = "region.html">region</A> to be assigned to a chunk.
</P>
<HR>
<P>The <I>nchunk</I> keyword applies to all chunk styles. It specifies how
often <I>Nchunk</I> is recalculated, which in turn can affect the chunk IDs
assigned to individual atoms.
</P>
<P>If <I>nchunk</I> is set to <I>once</I>, then <I>Nchunk</I> is only calculated once,
the first time this compute is invoked. If <I>nchunk</I> is set to
<I>every</I>, then <I>Nchunk</I> is re-calculated every time the compute is
invoked. Note that, as described above, the use of this compute
by the <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> command can override
the <I>every</I> setting.
</P>
<P>The default values for <I>nchunk</I> are listed below and depend on the
chunk style and other system and keyword settings. They attempt to
represent typical use cases for the various chunk styles. The
<I>nchunk</I> value can always be set explicitly if desired.
</P>
<HR>
<P>The <I>limit</I> keyword can be used to limit the calculated value of
<I>Nchunk</I> = the number of chunks. The limit is applied each time
<I>Nchunk</I> is calculated, which also limits the chunk IDs assigned to
any atom. The <I>limit</I> keyword is used by all chunk styles except the
<I>binning</I> styles, which ignore it. This is because the number of bins
can be tailored using the <I>bound</I> keyword (described below) which
effectively limits the size of <I>Nchunk</I>.
</P>
<P>If <I>limit</I> is set to <I>Nc</I> = 0, then no limit is imposed on <I>Nchunk</I>,
though the <I>compress</I> keyword can still be used to reduce <I>Nchunk</I>, as
described below.
</P>
<P>If <I>Nc</I> > 0, then the effect of the <I>limit</I> keyword depends on whether
the <I>compress</I> keyword is also used with a setting of <I>yes</I>, and
whether the <I>compress</I> keyword is specified before the <I>limit</I> keyword
or after.
</P>
<P>In all cases, <I>Nchunk</I> is first calculated in the usual way for each
chunk style, as described above.
</P>
<P>First, here is what occurs if <I>compress yes</I> is not set. If <I>limit</I>
is set to <I>Nc max</I>, then <I>Nchunk</I> is reset to the smaller of <I>Nchunk</I>
and <I>Nc</I>. If <I>limit</I> is set to <I>Nc exact</I>, then <I>Nchunk</I> is reset to
<I>Nc</I>, whether the original <I>Nchunk</I> was larger or smaller than <I>Nc</I>.
If <I>Nchunk</I> shrank due to the <I>limit</I> setting, then atom chunk IDs >
<I>Nchunk</I> will be reset to 0 or <I>Nchunk</I>, depending on the setting of
the <I>discard</I> keyword. If <I>Nchunk</I> grew, there will simply be some
chunks with no atoms assigned to them.
</P>
<P>If <I>compress yes</I> is set, and the <I>compress</I> keyword comes before the
<I>limit</I> keyword, the compression operation is performed first, as
described below, which resets <I>Nchunk</I>. The <I>limit</I> keyword is then
applied to the new <I>Nchunk</I> value, exactly as described in the
preceeding paragraph. Note that in this case, all atoms will end up
with chunk IDs <= <I>Nc</I>, but their original values (e.g. molecule ID or
compute/fix/variable value) may have been > <I>Nc</I>, because of the
compression operation.
</P>
<P>If <I>compress yes</I> is set, and the <I>compress</I> keyword comes after the
<I>limit</I> keyword, then the <I>limit</I> value of <I>Nc</I> is applied first to
the uncompressed value of <I>Nchunk</I>, but only if <I>Nc</I> < <I>Nchunk</I>
(whether <I>Nc max</I> or <I>Nc exact</I> is used). This effectively means all
atoms with chunk IDs > <I>Nc</I> have their chunk IDs reset to 0 or <I>Nc</I>,
depending on the setting of the <I>discard</I> keyword. The compression
operation is then performed, which may shrink <I>Nchunk</I> further. If
the new <I>Nchunk</I> < <I>Nc</I> and <I>limit</I> = <I>Nc exact</I> is specified, then
<I>Nchunk</I> is reset to <I>Nc</I>, which results in extra chunks with no atoms
assigned to them. Note that in this case, all atoms will end up with
chunk IDs <= <I>Nc</I>, and their original values (e.g. molecule ID or
compute/fix/variable value) will also have been <= <I>Nc</I>.
</P>
<HR>
<P>The <I>ids</I> keyword applies to all chunk styles. If the setting is
<I>once</I> then the chunk IDs assigned to atoms the first time this
compute is invoked will be permanent, and never be re-computed.
</P>
<P>If the setting is <I>nfreq</I> and if a <A HREF = "fix_ave_chunk.html">fix ave/chunk</A>
command is using this compute, then in each of the <I>Nchunk</I> = constant
time windows (discussed above), the chunk ID's assigned to atoms on
the first step of the time window will persist until the end of the
time window.
</P>
<P>If the setting is <I>every</I>, which is the default, then chunk IDs are
re-calculated on any timestep this compute is invoked.
</P>
<P>IMPORTANT NOTE: If you want the persistent chunk-IDs calculated by
this compute to be continuous when running from a <A HREF = "read_restart.html">restart
file</A>, then you should use the same ID for this
compute, as in the original run. This is so that the fix this compute
creates to store per-atom quantities will also have the same ID, and
thus be initialized correctly with chunk IDs from the restart file.
</P>
<HR>
<P>The <I>compress</I> keyword applies to all chunk styles and affects how
<I>Nchunk</I> is calculated, which in turn affects the chunk IDs assigned
to each atom. It is useful for converting a "sparse" set of chunk IDs
(with many IDs that have no atoms assigned to them), into a "dense"
set of IDs, where every chunk has one or more atoms assigned to it.
</P>
<P>Two possible use cases are as follows. If a large simulation box is
mostly empty space, then the <I>binning</I> style may produce many bins
with no atoms. If <I>compress</I> is set to <I>yes</I>, only bins with atoms
will be contribute to <I>Nchunk</I>. Likewise, the <I>molecule</I> or
<I>compute/fix/variable</I> styles may produce large <I>Nchunk</I> values. For
example, the <A HREF = "compute_cluster_atom.html">compute cluster/atom</A> command
assigns every atom an atom ID for one of the atoms it is clustered
with. For a million-atom system with 5 clusters, there would only be
5 unique chunk IDs, but the largest chunk ID might be 1 million,
resulting in <I>Nchunk</I> = 1 million. If <I>compress</I> is set to <I>yes</I>,
<I>Nchunk</I> will be reset to 5.
</P>
<P>If <I>compress</I> is set to <I>no</I>, which is the default, no compression is
done. If it is set to <I>yes</I>, all chunk IDs with no atoms are removed
from the list of chunk IDs, and the list is sorted. The remaining
chunk IDs are renumbered from 1 to <I>Nchunk</I> where <I>Nchunk</I> is the new
length of the list. The chunk IDs assigned to each atom reflect
the new renumbering from 1 to <I>Nchunk</I>.
</P>
<P>The original chunk IDs (before renumbering) can be accessed by the
<A HREF = "compute_property_chunk.html">compute property/chunk</A> command and its
<I>id</I> keyword, or by the <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> command
which outputs the original IDs as one of the columns in its global
output array. For example, using the "compute cluster/atom" command
discussed above, the original 5 unique chunk IDs might be atom IDs
(27,4982,58374,857838,1000000). After compresion, these will be
renumbered to (1,2,3,4,5). The original values (27,...,1000000) can
be output to a file by the <A HREF = "fix_ave_chunk.html">fix ave/chunk</A> command,
or by using the <A HREF = "fix_ave_time.html">fix ave/time</A> command in
conjunction with the <A HREF = "compute_property_chunk.html">compute
property/chunk</A> command.
</P>
<P>IMPORTANT NOTE: The compression operation requires global
communication across all processors to share their chunk ID values.
It can require large memory on every processor to store them, even
after they are compressed, if there are are a large number of unique
chunk IDs with atoms assigned to them. It uses a STL map to find
unique chunk IDs and store them in sorted order. Each time an atom is
assigned a compressed chunk ID, it must access the STL map. All of
this means that compression can be expensive, both in memory and CPU
time. The use of the <I>limit</I> keyword in conjunction with the
<I>compress</I> keyword can affect these costs, depending on which keyword
is used first. So use this option with care.
</P>
<HR>
<P>The <I>discard</I> keyword applies to all chunk styles. It affects what
chunk IDs are assigned to atoms that do not match one of the valid
chunk IDs from 1 to <I>Nchunk</I>. Note that it does not apply to atoms
that are not in the specified group or optionally specified region.
Those atoms are always assigned a chunk ID = 0.
</P>
<P>If the calculated chunk ID for an atom is not within the range 1 to
<I>Nchunk</I> then it is a "discard" atom. Note that <I>Nchunk</I> may have
been shrunk by the <I>limit</I> keyword. Or the <I>compress</I> keyword may
have eliminated chunk IDs that were valid before the compression took
place, and are now not in the compressed list. Also note that for the
<I>molecule</I> chunk style, if new molecules are added to the system,
their chunk IDs may exceed a previously calculated <I>Nchunk</I>.
Likewise, evaluation of a compute/fix/variable on a later timestep may
return chunk IDs that are invalid for the previously calculated
<I>Nchunk</I>.
</P>
<P>All the chunk styles except the <I>binning</I> styles, must use <I>discard</I>
set to either <I>yes</I> or <I>no</I>. If <I>discard</I> is set to <I>yes</I>, which is
the default, then every "discard" atom has its chunk ID set to 0. If
<I>discard</I> is set to <I>no</I>, every "discard" atom has its chunk ID set to
<I>Nchunk</I>. I.e. it becomes part of the last chunk.
</P>
<P>The <I>binning</I> styles use the <I>discard</I> keyword to decide whether to
discard atoms outside the spatial domain covered by bins, or to assign
them to the bin they are nearest to. Details are as follows.
</P>
<P>If <I>discard</I> is set to <I>yes</I>, an out-of-domain atom will have its
chunk ID set to 0. If <I>discard</I> is set to <I>no</I>, the atom will have
its chunk ID set to the first or last bin in that dimension. If
(discard</I> is set to <I>mixed</I>, which is the default, it will only have
its chunk ID set to the first or last bin if bins extend to the
simulation box boundary in that dimension. This is the case if the
<I>bound</I> keyword settings are <I>lower</I> and <I>upper</I>, which is the
default. If the <I>bound</I> keyword settings are numeric values, then the
atom will have its chunk ID set to 0 if it is outside the bounds of
any bin. Note that in this case, it is possible that the first or
last bin extends beyond the numeric <I>bounds</I> settings, depending on
the specified <I>origin</I>. If this is the case, the chunk ID of the atom
is only set to 0 if it is outside the first or last bin, not if it is
simply outside the numeric <I>bounds</I> setting.
</P>
<HR>
<P>The <I>bound</I> keyword only applies to the <I>binning</I> styles; otherwise it
is ignored. It can be used one or more times to limit the extent of
bin coverage in a specified dimension, i.e. to only bin a portion of
the box. If the <I>lo</I> setting is <I>lower</I> or the <I>hi</I> setting is
<I>upper</I>, the bin extent in that direction extends to the box boundary.
If a numeric value is used for <I>lo</I> and/or <I>hi</I>, then the bin extent
in the <I>lo</I> or <I>hi</I> direction extends only to that value, which is
assumed to be inside (or at least near) the simulation box boundaries,
though LAMMPS does not check for this. Note that using the <I>bound</I>
keyword typically reduces the total number of bins and thus the number
of chunks <I>Nchunk</I>.
</P>
<P>The <I>units</I> keyword only applies to the <I>binning</I> styles; otherwise it
is ignored. It determines the meaning of the distance units used for
the bin sizes <I>delta</I> and for <I>origin</I> and <I>bounds</I> values if they are
coordinate values. For orthogonal simulation boxes, any of the 3
options may be used. For non-orthogonal (triclinic) simulation boxes,
only the <I>reduced</I> option may be used.
</P>
<P>A <I>box</I> value selects standard distance units as defined by the
<A HREF = "units.html">units</A> command, e.g. Angstroms for units = real or metal.
A <I>lattice</I> value means the distance units are in lattice spacings.
The <A HREF = "lattice.html">lattice</A> command must have been previously used to
define the lattice spacing. A <I>reduced</I> value means normalized
unitless values between 0 and 1, which represent the lower and upper
faces of the simulation box respectively. Thus an <I>origin</I> value of
0.5 means the center of the box in any dimension. A <I>delta</I> value of
0.1 means 10 bins span the box in that dimension.
</P>
<HR>
<HR>
<P><B>Output info:</B>
</P>
<P>This compute calculates a per-atom vector, which can be accessed by
any command that uses per-atom values from a compute as input. See
<A HREF = "Section_howto.html#howto_15">Section_howto 15</A> for an overview of
LAMMPS output options.
</P>
<P>The per-atom vector values are unitless chunk IDs, ranging from 1 to
<I>Nchunk</I> (inclusive) for atoms assigned to chunks, and 0 for atoms not
belonging to a chunk.
</P>
<P><B>Restrictions:</B>
</P>
<P>Even if the <I>nchunk</I> keyword is set to <I>once</I>, the chunk IDs assigned
to each atom are not stored in a restart files. This means you cannot
expect those assignments to persist in a restarted simulation.
Instead you must re-specify this command and assign atoms to chunks when
the restarted simulation begins.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_ave_chunk.html">fix ave/chunk</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are as follows:
</P>
<UL><LI>region = none
<LI>nchunk = every if compress is yes, overriding other defaults listed here
<LI>nchunk = once for type style
<LI>nchunk = once for mol style if region is none
<LI>nchunk = every for mol style if region is set
<LI>nchunk = once for binning style if the simulation box size is static or units = reduced
<LI>nchunk = every for binning style if the simulation box size is dynamic and units is lattice or box
<LI>nchunk = every for compute/fix/variable style
<LI>limit = 0
<LI>ids = every
<LI>compress = no
<LI>discard = yes for all styles except binning
<LI>discard = mixed for binning styles
<LI>bound = lower and upper in all dimensions
<LI>units = lattice
</UL>
</HTML>

554
doc/compute_chunk_atom.txt Normal file
View File

@ -0,0 +1,554 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute chunk/atom command :h3
[Syntax:]
compute ID group-ID chunk/atom style args keyword values ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
chunk/atom = style name of this compute command :l
style = {bin/1d} or {bin/2d} or {bin/3d} or {type} or {molecule} or {compute/fix/variable}
{bin/1d} args = dim origin delta
dim = {x} or {y} or {z}
origin = {lower} or {center} or {upper} or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
{bin/2d} args = dim origin delta dim origin delta
dim = {x} or {y} or {z}
origin = {lower} or {center} or {upper} or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
{bin/3d} args = dim origin delta dim origin delta dim origin delta
dim = {x} or {y} or {z}
origin = {lower} or {center} or {upper} or coordinate value (distance units)
delta = thickness of spatial bins in dim (distance units)
{type} args = none
{molecule} args = none
{compute/fix/variable} = c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name with no args
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name :pre
zero or more keyword/values pairs may be appended :l
keyword = {region} or {nchunk} or {static} or {compress} or {bound} or {discard} or {units} :l
{region} value = region-ID
region-ID = ID of region atoms must be in to be part of a chunk
{nchunk} value = {once} or {every}
once = only compute the number of chunks once
every = re-compute the number of chunks whenever invoked
{limit} values = 0 or Nc max or Nc exact
0 = no limit on the number of chunks
Nc max = limit number of chunks to be <= Nc
Nc exact = set number of chunks to exactly Nc
{ids} value = {once} or {nfreq} or {every}
once = assign chunk IDs to atoms only once, they persist thereafter
nfreq = assign chunk IDs to atoms only once every Nfreq steps (if invoked by "fix ave/chunk"_fix_ave_chunk.html which sets Nfreq)
every = assign chunk IDs to atoms whenever invoked
{compress} value = {yes} or {no}
yes = compress chunk IDs to eliminate IDs with no atoms
no = do not compress chunk IDs even if some IDs have no atoms
{discard} value = {yes} or {no} or {mixed}
yes = discard atoms with out-of-range chunk IDs by assigning a chunk ID = 0
no = keep atoms with out-of-range chunk IDs by assigning a valid chunk ID
mixed = keep or discard such atoms according to spatial binning rule
{bound} values = x/y/z lo hi
x/y/z = {x} or {y} or {z} to bound sptial bins in this dimension
lo = {lower} or coordinate value (distance units)
hi = {upper} or coordinate value (distance units)
{units} value = {box} or {lattice} or {reduced} :pre
:ule
[Examples:]
compute 1 all chunk/atom type
compute 1 all chunk/atom bin/1d z lower 0.02 units reduced
compute 1 all chunk/atom bin/2d z lower 1.0 y 0.0 2.5
compute 1 all chunk/atom molecule region sphere nchunk once ids once compress yes :pre
[Description:]
Define a computation that calculates an integer chunk ID from 1 to
Nchunk for each atom in the group. Values of chunk IDs are determined
by the {style} of chunk, which can be based on atom type or molecule
ID or spatial binning or a per-atom property or value calculated by
another "compute"_compute.html, "fix"_fix.html, or "atom-style
variable"_variable.html. Per-atom chunk IDs can be used by other
computes with "chunk" in their style name, such as "compute
com/chunk"_compute_com_chunk.html or "compute
msd/chunk"_compute_msd_chunk.html. Or they can be used by the "fix
ave/chunk"_fix_ave_chunk.html command to sum and time average a
variety of per-atom properties over the atoms in each chunk. Or they
can simply be accessed by any command that uses per-atom values from a
compute as input, as discussed in "Section_howto
15"_Section_howto.html#howto_15.
See "Section_howto 23"_Section_howto.html#howto_23 for an overview of
how this compute can be used with a variety of other commands to
tabulate properties of a simulation. The howto section gives several
examples of input script commands that can be used to calculate
interesting properties.
Conceptually it is important to realize that this compute does two
simple things. First, it sets the value of {Nchunk} = the number of
chunks, which can be a constant value or change over time. Second, it
assigns each atom to a chunk via a chunk ID. Chunk IDs range from 1
to {Nchunk} inclusive; some chunks may have no atoms assigned to them.
Atoms that do not belong to any chunk are assigned a value of 0. Note
that the two operations are not always performed together. For
example, spatial bins can be setup once (which sets {Nchunk}), and
atoms assigned to those bins many times thereafter (setting their
chunk IDs).
All other commands in LAMMPS that use chunk IDs assume there are
{Nchunk} number of chunks, and that every atom is assigned to one of
those chunks, or not assigned to any chunk.
There are many options for specifying for how and when {Nchunk} is
calculated, and how and when chunk IDs are assigned to atoms. The
details depend on the chunk {style} and its {args}, as well as
optional keyword settings. They can also depend on whether a "fix
ave/chunk"_fix_ave_chunk.html command is using this compute, since
that command requires {Nchunk} to remain static across windows of
timesteps it specifies, while it accumulates per-chunk averages.
The details are described below.
:line
:line
The different chunk styles operate as follows. For each style, how it
calculates {Nchunk} and assigns chunk IDs to atoms is explained. Note
that using the optional keywords can change both of those actions, as
described further below where the keywords are discussed.
:line
The {binning} styles perform a spatial binning of atoms, and assign an
atom the chunk ID corresponding to the bin number it is in. {Nchunk}
is set to the number of bins, which can change if the simulation box
size changes.
The {bin/1d}, {bin/2d}, and {bin/3d} styles define bins as 1d layers
(slabs), 2d pencils, or 3d boxes. The {dim}, {origin}, and {delta}
settings are specified 1, 2, or 3 times. For 2d or 3d bins, there is
no restriction on specifying dim = x before dim = y or z, or dim = y
before dim = z. Bins in a particular {dim} have a bin size in that
dimension given by {delta}. In each dimension, bins are defined
relative to a specified {origin}, which may be the lower/upper edge of
the simulation box (in that dimension), or its center point, or a
specified coordinate value. Starting at the origin, sufficient bins
are created in both directions to completely span the simulation box
or the bounds specified by the optional {bounds} keyword.
For orthogonal simulation boxes, the bins are layers, pencils, or
boxes aligned with the xyz coordinate axes. For triclinic
(non-orthogonal) simulation boxes, the bin faces are parallel to the
tilted faces of the simulation box. See "this
section"_Section_howto.html#howto_12 of the manual for a discussion of
the geometry of triclinic boxes in LAMMPS. As described there, a
tilted simulation box has edge vectors a,b,c. In that nomenclature,
bins in the x dimension have faces with normals in the "b" cross "c"
direction. Bins in y have faces normal to the "a" cross "c"
direction. And bins in z have faces normal to the "a" cross "b"
direction. Note that in order to define the size and position of
these bins in an unambiguous fashion, the {units} option must be set
to {reduced} when using a triclinic simulation box, as noted below.
The meaning of {origin} and {delta} for triclinic boxes is as follows.
Consider a triclinic box with bins that are 1d layers or slabs in the
x dimension. No matter how the box is tilted, an {origin} of 0.0
means start layers at the lower "b" cross "c" plane of the simulation
box and an {origin} of 1.0 means to start layers at the upper "b"
cross "c" face of the box. A {delta} value of 0.1 in {reduced} units
means there will be 10 layers from 0.0 to 1.0, regardless of the
current size or shape of the simulation box.
The created bins (and hence the chunk IDs) are numbered consecutively
from 1 to the number of bins = {Nchunk}. For 2d and 3d bins, the
numbering varies most rapidly in the first dimension (which could be
x, y, or z), next rapidly in the 2nd dimension, and most slowly in the
3rd dimension.
Each time this compute is invoked, each atom is mapped to a bin based
on its current position. Note that between reneighboring timesteps,
atoms can move outside the current simulation box. If the box is
periodic (in that dimension) the atom is remapping into the periodic
box for purposes of binning. If the box in not periodic, the atom may
have moved outside the bounds of all bins. If an atom is not inside
any bin, the {discard} keyword is used to determine how a chunk ID is
assigned to the atom.
:line
The {type} style uses the atom type as the chunk ID. {Nchunk} is set
to the number of atom types defined for the simulation, e.g. via the
"create_box"_create_box.html or "read_data"_read_data.html commands.
:line
The {molecule} style uses the molecule ID of each atom as its chunk
ID. {Nchunk} is set to the largest chunk ID. Note that this excludes
molecule IDs for atoms which are not in the specified group or
optional region.
There is no requirement that all atoms in a particular molecule are
assigned the same chunk ID (zero or non-zero), though you probably
want that to be the case, if you wish to compute a per-molecule
property. LAMMPS will issue a warning if that is not the case, but
only the first time that {Nchunk} is calculated.
Note that atoms with a molecule ID = 0, which may be non-molecular
solvent atoms, have an out-of-range chunk ID. These atoms are
discarded (not assigned to any chunk) or assigned to {Nchunk},
depending on the value of the {discard} keyword.
:line
The {compute/fix/variable} styles set the chunk ID of each atom based
on a quantity calculated and stored by a compute, fix, or variable.
In each case, it must be a per-atom quantity. In each case the
referenced floating point values are converted to an integer chunk ID
as follows. The floating point value is truncated (rounded down) to
an integer value. If the integer value is <= 0, then a chunk ID of 0
is assigned to the atom. If the integer value is > 0, it becomes the
chunk ID to the atom. {Nchunk} is set to the largest chunk ID. Note
that this excludes atoms which are not in the specified group or
optional region.
If the style begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and "add them to LAMMPS"_Section_modify.html.
If the style begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with the
timestep on which this compute accesses the fix, else an error
results. Users can also write code for their own fix styles and "add
them to LAMMPS"_Section_modify.html.
If a value begins with "v_", a variable name for an {atom} or
{atomfile} style "variable"_variable.html must follow which has been
previously defined in the input script. Variables of style {atom} can
reference thermodynamic keywords and various per-atom attributes, or
invoke other computes, fixes, or variables when they are evaluated, so
this is a very general means of generating per-atom quantities to
treat as a chunk ID.
:line
:line
Normally, {Nchunk} = the number of chunks, is re-calculated every time
this fix is invoked, though the value may or may not change. As
explained below, the {nchunk} keyword can be set to {once} which means
{Nchunk} will never change.
If a "fix ave/chunk"_fix_ave_chunk.html command uses this compute, it
can also turn off the re-calculation of {Nchunk} for one or more
windows of timesteps. The extent of the windows, during which Nchunk
is held constant, are determined by the {Nevery}, {Nrepeat}, {Nfreq}
values and the {ave} keyword setting that are used by the "fix
ave/chunk"_fix_ave_chunk.html command.
Specifically, if {ave} = {one}, then for each span of {Nfreq}
timesteps, {Nchunk} is held constant between the first timestep when
averaging is done (within the Nfreq-length window), and the last
timestep when averaging is done (multiple of Nfreq). If {ave} =
{running} or {window}, then {Nchunk} is held constant forever,
starting on the first timestep when the "fix
ave/chunk"_fix_ave_chunk.html command invokes this compute.
Note that multiple "fix ave/chunk"_fix_ave_chunk.html commands can use
the same compute chunk/atom compute. However, the time windows they
induce for holding {Nchunk} constant must be identical, else an error
will be generated.
:line
:line
The various optional keywords operate as follows. Note that some of
them function differently or are ignored by different chunk styles.
Some of them also have different default values, depending on
the chunk style, as listed below.
The {region} keyword applies to all chunk styles. If used, an atom
must be in both the specified group and the specified geometric
"region"_region.html to be assigned to a chunk.
:line
The {nchunk} keyword applies to all chunk styles. It specifies how
often {Nchunk} is recalculated, which in turn can affect the chunk IDs
assigned to individual atoms.
If {nchunk} is set to {once}, then {Nchunk} is only calculated once,
the first time this compute is invoked. If {nchunk} is set to
{every}, then {Nchunk} is re-calculated every time the compute is
invoked. Note that, as described above, the use of this compute
by the "fix ave/chunk"_fix_ave_chunk.html command can override
the {every} setting.
The default values for {nchunk} are listed below and depend on the
chunk style and other system and keyword settings. They attempt to
represent typical use cases for the various chunk styles. The
{nchunk} value can always be set explicitly if desired.
:line
The {limit} keyword can be used to limit the calculated value of
{Nchunk} = the number of chunks. The limit is applied each time
{Nchunk} is calculated, which also limits the chunk IDs assigned to
any atom. The {limit} keyword is used by all chunk styles except the
{binning} styles, which ignore it. This is because the number of bins
can be tailored using the {bound} keyword (described below) which
effectively limits the size of {Nchunk}.
If {limit} is set to {Nc} = 0, then no limit is imposed on {Nchunk},
though the {compress} keyword can still be used to reduce {Nchunk}, as
described below.
If {Nc} > 0, then the effect of the {limit} keyword depends on whether
the {compress} keyword is also used with a setting of {yes}, and
whether the {compress} keyword is specified before the {limit} keyword
or after.
In all cases, {Nchunk} is first calculated in the usual way for each
chunk style, as described above.
First, here is what occurs if {compress yes} is not set. If {limit}
is set to {Nc max}, then {Nchunk} is reset to the smaller of {Nchunk}
and {Nc}. If {limit} is set to {Nc exact}, then {Nchunk} is reset to
{Nc}, whether the original {Nchunk} was larger or smaller than {Nc}.
If {Nchunk} shrank due to the {limit} setting, then atom chunk IDs >
{Nchunk} will be reset to 0 or {Nchunk}, depending on the setting of
the {discard} keyword. If {Nchunk} grew, there will simply be some
chunks with no atoms assigned to them.
If {compress yes} is set, and the {compress} keyword comes before the
{limit} keyword, the compression operation is performed first, as
described below, which resets {Nchunk}. The {limit} keyword is then
applied to the new {Nchunk} value, exactly as described in the
preceeding paragraph. Note that in this case, all atoms will end up
with chunk IDs <= {Nc}, but their original values (e.g. molecule ID or
compute/fix/variable value) may have been > {Nc}, because of the
compression operation.
If {compress yes} is set, and the {compress} keyword comes after the
{limit} keyword, then the {limit} value of {Nc} is applied first to
the uncompressed value of {Nchunk}, but only if {Nc} < {Nchunk}
(whether {Nc max} or {Nc exact} is used). This effectively means all
atoms with chunk IDs > {Nc} have their chunk IDs reset to 0 or {Nc},
depending on the setting of the {discard} keyword. The compression
operation is then performed, which may shrink {Nchunk} further. If
the new {Nchunk} < {Nc} and {limit} = {Nc exact} is specified, then
{Nchunk} is reset to {Nc}, which results in extra chunks with no atoms
assigned to them. Note that in this case, all atoms will end up with
chunk IDs <= {Nc}, and their original values (e.g. molecule ID or
compute/fix/variable value) will also have been <= {Nc}.
:line
The {ids} keyword applies to all chunk styles. If the setting is
{once} then the chunk IDs assigned to atoms the first time this
compute is invoked will be permanent, and never be re-computed.
If the setting is {nfreq} and if a "fix ave/chunk"_fix_ave_chunk.html
command is using this compute, then in each of the {Nchunk} = constant
time windows (discussed above), the chunk ID's assigned to atoms on
the first step of the time window will persist until the end of the
time window.
If the setting is {every}, which is the default, then chunk IDs are
re-calculated on any timestep this compute is invoked.
IMPORTANT NOTE: If you want the persistent chunk-IDs calculated by
this compute to be continuous when running from a "restart
file"_read_restart.html, then you should use the same ID for this
compute, as in the original run. This is so that the fix this compute
creates to store per-atom quantities will also have the same ID, and
thus be initialized correctly with chunk IDs from the restart file.
:line
The {compress} keyword applies to all chunk styles and affects how
{Nchunk} is calculated, which in turn affects the chunk IDs assigned
to each atom. It is useful for converting a "sparse" set of chunk IDs
(with many IDs that have no atoms assigned to them), into a "dense"
set of IDs, where every chunk has one or more atoms assigned to it.
Two possible use cases are as follows. If a large simulation box is
mostly empty space, then the {binning} style may produce many bins
with no atoms. If {compress} is set to {yes}, only bins with atoms
will be contribute to {Nchunk}. Likewise, the {molecule} or
{compute/fix/variable} styles may produce large {Nchunk} values. For
example, the "compute cluster/atom"_compute_cluster_atom.html command
assigns every atom an atom ID for one of the atoms it is clustered
with. For a million-atom system with 5 clusters, there would only be
5 unique chunk IDs, but the largest chunk ID might be 1 million,
resulting in {Nchunk} = 1 million. If {compress} is set to {yes},
{Nchunk} will be reset to 5.
If {compress} is set to {no}, which is the default, no compression is
done. If it is set to {yes}, all chunk IDs with no atoms are removed
from the list of chunk IDs, and the list is sorted. The remaining
chunk IDs are renumbered from 1 to {Nchunk} where {Nchunk} is the new
length of the list. The chunk IDs assigned to each atom reflect
the new renumbering from 1 to {Nchunk}.
The original chunk IDs (before renumbering) can be accessed by the
"compute property/chunk"_compute_property_chunk.html command and its
{id} keyword, or by the "fix ave/chunk"_fix_ave_chunk.html command
which outputs the original IDs as one of the columns in its global
output array. For example, using the "compute cluster/atom" command
discussed above, the original 5 unique chunk IDs might be atom IDs
(27,4982,58374,857838,1000000). After compresion, these will be
renumbered to (1,2,3,4,5). The original values (27,...,1000000) can
be output to a file by the "fix ave/chunk"_fix_ave_chunk.html command,
or by using the "fix ave/time"_fix_ave_time.html command in
conjunction with the "compute
property/chunk"_compute_property_chunk.html command.
IMPORTANT NOTE: The compression operation requires global
communication across all processors to share their chunk ID values.
It can require large memory on every processor to store them, even
after they are compressed, if there are are a large number of unique
chunk IDs with atoms assigned to them. It uses a STL map to find
unique chunk IDs and store them in sorted order. Each time an atom is
assigned a compressed chunk ID, it must access the STL map. All of
this means that compression can be expensive, both in memory and CPU
time. The use of the {limit} keyword in conjunction with the
{compress} keyword can affect these costs, depending on which keyword
is used first. So use this option with care.
:line
The {discard} keyword applies to all chunk styles. It affects what
chunk IDs are assigned to atoms that do not match one of the valid
chunk IDs from 1 to {Nchunk}. Note that it does not apply to atoms
that are not in the specified group or optionally specified region.
Those atoms are always assigned a chunk ID = 0.
If the calculated chunk ID for an atom is not within the range 1 to
{Nchunk} then it is a "discard" atom. Note that {Nchunk} may have
been shrunk by the {limit} keyword. Or the {compress} keyword may
have eliminated chunk IDs that were valid before the compression took
place, and are now not in the compressed list. Also note that for the
{molecule} chunk style, if new molecules are added to the system,
their chunk IDs may exceed a previously calculated {Nchunk}.
Likewise, evaluation of a compute/fix/variable on a later timestep may
return chunk IDs that are invalid for the previously calculated
{Nchunk}.
All the chunk styles except the {binning} styles, must use {discard}
set to either {yes} or {no}. If {discard} is set to {yes}, which is
the default, then every "discard" atom has its chunk ID set to 0. If
{discard} is set to {no}, every "discard" atom has its chunk ID set to
{Nchunk}. I.e. it becomes part of the last chunk.
The {binning} styles use the {discard} keyword to decide whether to
discard atoms outside the spatial domain covered by bins, or to assign
them to the bin they are nearest to. Details are as follows.
If {discard} is set to {yes}, an out-of-domain atom will have its
chunk ID set to 0. If {discard} is set to {no}, the atom will have
its chunk ID set to the first or last bin in that dimension. If
(discard} is set to {mixed}, which is the default, it will only have
its chunk ID set to the first or last bin if bins extend to the
simulation box boundary in that dimension. This is the case if the
{bound} keyword settings are {lower} and {upper}, which is the
default. If the {bound} keyword settings are numeric values, then the
atom will have its chunk ID set to 0 if it is outside the bounds of
any bin. Note that in this case, it is possible that the first or
last bin extends beyond the numeric {bounds} settings, depending on
the specified {origin}. If this is the case, the chunk ID of the atom
is only set to 0 if it is outside the first or last bin, not if it is
simply outside the numeric {bounds} setting.
:line
The {bound} keyword only applies to the {binning} styles; otherwise it
is ignored. It can be used one or more times to limit the extent of
bin coverage in a specified dimension, i.e. to only bin a portion of
the box. If the {lo} setting is {lower} or the {hi} setting is
{upper}, the bin extent in that direction extends to the box boundary.
If a numeric value is used for {lo} and/or {hi}, then the bin extent
in the {lo} or {hi} direction extends only to that value, which is
assumed to be inside (or at least near) the simulation box boundaries,
though LAMMPS does not check for this. Note that using the {bound}
keyword typically reduces the total number of bins and thus the number
of chunks {Nchunk}.
The {units} keyword only applies to the {binning} styles; otherwise it
is ignored. It determines the meaning of the distance units used for
the bin sizes {delta} and for {origin} and {bounds} values if they are
coordinate values. For orthogonal simulation boxes, any of the 3
options may be used. For non-orthogonal (triclinic) simulation boxes,
only the {reduced} option may be used.
A {box} value selects standard distance units as defined by the
"units"_units.html command, e.g. Angstroms for units = real or metal.
A {lattice} value means the distance units are in lattice spacings.
The "lattice"_lattice.html command must have been previously used to
define the lattice spacing. A {reduced} value means normalized
unitless values between 0 and 1, which represent the lower and upper
faces of the simulation box respectively. Thus an {origin} value of
0.5 means the center of the box in any dimension. A {delta} value of
0.1 means 10 bins span the box in that dimension.
:line
:line
[Output info:]
This compute calculates a per-atom vector, which can be accessed by
any command that uses per-atom values from a compute as input. See
"Section_howto 15"_Section_howto.html#howto_15 for an overview of
LAMMPS output options.
The per-atom vector values are unitless chunk IDs, ranging from 1 to
{Nchunk} (inclusive) for atoms assigned to chunks, and 0 for atoms not
belonging to a chunk.
[Restrictions:]
Even if the {nchunk} keyword is set to {once}, the chunk IDs assigned
to each atom are not stored in a restart files. This means you cannot
expect those assignments to persist in a restarted simulation.
Instead you must re-specify this command and assign atoms to chunks when
the restarted simulation begins.
[Related commands:]
"fix ave/chunk"_fix_ave_chunk.html
[Default:]
The option defaults are as follows:
region = none
nchunk = every if compress is yes, overriding other defaults listed here
nchunk = once for type style
nchunk = once for mol style if region is none
nchunk = every for mol style if region is set
nchunk = once for binning style if the simulation box size is static or units = reduced
nchunk = every for binning style if the simulation box size is dynamic and units is lattice or box
nchunk = every for compute/fix/variable style
limit = 0
ids = every
compress = no
discard = yes for all styles except binning
discard = mixed for binning styles
bound = lower and upper in all dimensions
units = lattice :ul

View File

@ -0,0 +1,92 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute com/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID com/chunk chunkID
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>com/chunk = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid com/chunk molchunk
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the center-of-mass for multiple
chunks of atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the x,y,z coordinates of the center-of-mass
for each chunk, which includes all effects due to atoms passing thru
periodic boundaries.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
center-of-mass in "unwrapped" form, by using the image flags
associated with each atom. See the <A HREF = "dump.html">dump custom</A> command
for a discussion of "unwrapped" coordinates. See the Atoms section of
the <A HREF = "read_data.html">read_data</A> command for a discussion of image flags
and how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>The simplest way to output the results of the compute com/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The number of columns =
3 for the x,y,z center-of-mass coordinates of each chunk. These
values can be accessed by any command that uses global array values
from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P>The array values are "intensive". The array values will be in
distance <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_com.html">compute com</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

87
doc/compute_com_chunk.txt Normal file
View File

@ -0,0 +1,87 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute com/chunk command :h3
[Syntax:]
compute ID group-ID com/chunk chunkID :pre
ID, group-ID are documented in "compute"_compute.html command
com/chunk = style name of this compute command
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
[Examples:]
compute 1 fluid com/chunk molchunk :pre
[Description:]
Define a computation that calculates the center-of-mass for multiple
chunks of atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the x,y,z coordinates of the center-of-mass
for each chunk, which includes all effects due to atoms passing thru
periodic boundaries.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
center-of-mass in "unwrapped" form, by using the image flags
associated with each atom. See the "dump custom"_dump.html command
for a discussion of "unwrapped" coordinates. See the Atoms section of
the "read_data"_read_data.html command for a discussion of image flags
and how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
The simplest way to output the results of the compute com/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global array where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The number of columns =
3 for the x,y,z center-of-mass coordinates of each chunk. These
values can be accessed by any command that uses global array values
from a compute as input. See "Section_howto
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The array values are "intensive". The array values will be in
distance "units"_units.html.
[Restrictions:] none
[Related commands:]
"compute com"_compute_com.html
[Default:] none

View File

@ -1,73 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute com/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID com/molecule
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>com/molecule = style name of this compute command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid com/molecule
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the center-of-mass of individual
molecules. The calculation includes all effects due to atoms passing
thru periodic boundaries.
</P>
<P>The x,y,z coordinates of the center-of-mass for a particular molecule
are only computed if one or more of its atoms are in the specified
group. Normally all atoms in the molecule should be in the group,
however this is not required. LAMMPS will warn you if this is not the
case. Only atoms in the group contribute to the center-of-mass
calculation for the molecule.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to the
molecule's center-of-mass in "unwrapped" form, by using the image
flags associated with each atom. See the <A HREF = "dump.html">dump custom</A>
command for a discussion of "unwrapped" coordinates. See the Atoms
section of the <A HREF = "read_data.html">read_data</A> command for a discussion of
image flags and how they are set for each atom. You can reset the
image flags (e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 3 for the x,y,z center-of-mass
coordinates of each molecule. These values can be accessed by any
command that uses global array values from a compute as input. See
<A HREF = "Section_howto.html#howto_15">Section_howto 15</A> for an overview of
LAMMPS output options.
</P>
<P>The array values are "intensive". The array values will be in
distance <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_com.html">compute com</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,68 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute com/molecule command :h3
[Syntax:]
compute ID group-ID com/molecule :pre
ID, group-ID are documented in "compute"_compute.html command
com/molecule = style name of this compute command :ul
[Examples:]
compute 1 fluid com/molecule :pre
[Description:]
Define a computation that calculates the center-of-mass of individual
molecules. The calculation includes all effects due to atoms passing
thru periodic boundaries.
The x,y,z coordinates of the center-of-mass for a particular molecule
are only computed if one or more of its atoms are in the specified
group. Normally all atoms in the molecule should be in the group,
however this is not required. LAMMPS will warn you if this is not the
case. Only atoms in the group contribute to the center-of-mass
calculation for the molecule.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
IMPORTANT NOTE: The coordinates of an atom contribute to the
molecule's center-of-mass in "unwrapped" form, by using the image
flags associated with each atom. See the "dump custom"_dump.html
command for a discussion of "unwrapped" coordinates. See the Atoms
section of the "read_data"_read_data.html command for a discussion of
image flags and how they are set for each atom. You can reset the
image flags (e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
[Output info:]
This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 3 for the x,y,z center-of-mass
coordinates of each molecule. These values can be accessed by any
command that uses global array values from a compute as input. See
"Section_howto 15"_Section_howto.html#howto_15 for an overview of
LAMMPS output options.
The array values are "intensive". The array values will be in
distance "units"_units.html.
[Restrictions:] none
[Related commands:]
"compute com"_compute_com.html
[Default:] none

View File

@ -0,0 +1,122 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute gyration/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID gyration/chunk chunkID keyword value ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>gyration/chunk = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>tensor</I>
<PRE> <I>tensor</I> value = none
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 molecule gyration/chunk molchunk
compute 2 molecule gyration/chunk molchunk tensor
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the radius of gyration Rg for
multiple chunks of atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the radius of gyration Rg for each chunk,
which includes all effects due to atoms passing thru periodic
boundaries.
</P>
<P>Rg is a measure of the size of a chunk, and is computed by this
formula
</P>
<CENTER><IMG SRC = "Eqs/compute_gyration.jpg">
</CENTER>
<P>where M is the total mass of the chunk, Rcm is the center-of-mass
position of the chunk, and the sum is over all atoms in the
chunk.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>If the <I>tensor</I> keyword is specified, then the scalar Rg value is not
calculated, but an Rg tensor is instead calculated for each chunk.
The formula for the components of the tensor is the same as the above
formula, except that (Ri - Rcm)^2 is replaced by (Rix - Rcmx) * (Riy -
Rcmy) for the xy component, etc. The 6 components of the tensor are
ordered xx, yy, zz, xy, xz, yz.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to Rg in
"unwrapped" form, by using the image flags associated with each atom.
See the <A HREF = "dump.html">dump custom</A> command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
<A HREF = "read_data.html">read_data</A> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>The simplest way to output the results of the compute gyration/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all gyration/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector if the <I>tensor</I> keyword is not
specified and a global array if it is. The length of the vector or
number of rows in the array = the number of chunks <I>Nchunk</I> as
calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. If the <I>tensor</I> keyword
is specified, the global array has 6 columns. The vector or array can
be accessed by any command that uses global values from a compute as
input. See <A HREF = "Section_howto.html#howto_15">this section</A> for an overview
of LAMMPS output options.
</P>
<P>All the vector or array values calculated by this compute are
"intensive". The vector or array values will be in distance
<A HREF = "units.html">units</A>, since they are the square root of values
represented by the formula above.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B> none
</P>
<P><A HREF = "compute_gyration.html">compute gyration</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -0,0 +1,111 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute gyration/chunk command :h3
[Syntax:]
compute ID group-ID gyration/chunk chunkID keyword value ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
gyration/chunk = style name of this compute command :l
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l
zero or more keyword/value pairs may be appended :l
keyword = {tensor} :l
{tensor} value = none :pre
:ule
[Examples:]
compute 1 molecule gyration/chunk molchunk
compute 2 molecule gyration/chunk molchunk tensor :pre
[Description:]
Define a computation that calculates the radius of gyration Rg for
multiple chunks of atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the radius of gyration Rg for each chunk,
which includes all effects due to atoms passing thru periodic
boundaries.
Rg is a measure of the size of a chunk, and is computed by this
formula
:c,image(Eqs/compute_gyration.jpg)
where M is the total mass of the chunk, Rcm is the center-of-mass
position of the chunk, and the sum is over all atoms in the
chunk.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
If the {tensor} keyword is specified, then the scalar Rg value is not
calculated, but an Rg tensor is instead calculated for each chunk.
The formula for the components of the tensor is the same as the above
formula, except that (Ri - Rcm)^2 is replaced by (Rix - Rcmx) * (Riy -
Rcmy) for the xy component, etc. The 6 components of the tensor are
ordered xx, yy, zz, xy, xz, yz.
IMPORTANT NOTE: The coordinates of an atom contribute to Rg in
"unwrapped" form, by using the image flags associated with each atom.
See the "dump custom"_dump.html command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
"read_data"_read_data.html command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
The simplest way to output the results of the compute gyration/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all gyration/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global vector if the {tensor} keyword is not
specified and a global array if it is. The length of the vector or
number of rows in the array = the number of chunks {Nchunk} as
calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. If the {tensor} keyword
is specified, the global array has 6 columns. The vector or array can
be accessed by any command that uses global values from a compute as
input. See "this section"_Section_howto.html#howto_15 for an overview
of LAMMPS output options.
All the vector or array values calculated by this compute are
"intensive". The vector or array values will be in distance
"units"_units.html, since they are the square root of values
represented by the formula above.
[Restrictions:] none
[Related commands:] none
"compute gyration"_compute_gyration.html
[Default:] none

View File

@ -1,104 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute gyration/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID gyration/molecule keyword value ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>gyration/molecule = style name of this compute command
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>tensor</I>
<PRE> <I>tensor</I> value = none
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 molecule gyration/molecule
compute 2 molecule gyration/molecule tensor
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the radius of gyration Rg of
individual molecules. The calculation includes all effects due to
atoms passing thru periodic boundaries.
</P>
<P>Rg is a measure of the size of a molecule, and is computed as the
square root of the Rg^2 value in this formula
</P>
<CENTER><IMG SRC = "Eqs/compute_gyration.jpg">
</CENTER>
<P>where M is the total mass of the molecule, Rcm is the center-of-mass
position of the molecule, and the sum is over all atoms in the
molecule and in the group.
</P>
<P>If the <I>tensor</I> keyword is specified, then the scalar Rg value is not
calculated, but a 6-element Rg^2 tensor is instead calculated for each
molecule. The formula for the components of the tensor is the same as
the above formula, except that (Ri - Rcm)^2 is replaced by (Rix -
Rcmx) * (Riy - Rcmy) for the xy component, etc. The 6 components of
the tensor are ordered xx, yy, zz, xy, xz, yz. Note
that unlike the scalar Rg, each of the 6 values of the tensor is
effectively a "squared" value, since the cross-terms may be negative
and taking a sqrt() would be invalid.
</P>
<P>Rg for a particular molecule is only computed if one or more of its
atoms are in the specified group. Normally all atoms in the molecule
should be in the group, however this is not required. LAMMPS will
warn you if this is not the case. Only atoms in the group contribute
to the Rg calculation for the molecule.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to Rg in
"unwrapped" form, by using the image flags associated with each atom.
See the <A HREF = "dump.html">dump custom</A> command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
<A HREF = "read_data.html">read_data</A> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector if the <I>tensor</I> keyword is not
specified and a global array if it is. The length of the vector or
number of rows in the array is the number of molecules. If the
<I>tensor</I> keyword is specified, the global array has 6 columns. The
vector or array can be accessed by any command that uses global values
from a compute as input. See <A HREF = "Section_howto.html#howto_15">this
section</A> for an overview of LAMMPS output
options.
</P>
<P>All the vector or array values calculated by this compute are
"intensive". The vector and aray values will be in distance and
distance^2 <A HREF = "units.html">units</A> respectively.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B> none
</P>
<P><A HREF = "compute_gyration.html">compute gyration</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,94 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute gyration/molecule command :h3
[Syntax:]
compute ID group-ID gyration/molecule keyword value ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
gyration/molecule = style name of this compute command :l
zero or more keyword/value pairs may be appended :l
keyword = {tensor} :l
{tensor} value = none :pre
:ule
[Examples:]
compute 1 molecule gyration/molecule
compute 2 molecule gyration/molecule tensor :pre
[Description:]
Define a computation that calculates the radius of gyration Rg of
individual molecules. The calculation includes all effects due to
atoms passing thru periodic boundaries.
Rg is a measure of the size of a molecule, and is computed as the
square root of the Rg^2 value in this formula
:c,image(Eqs/compute_gyration.jpg)
where M is the total mass of the molecule, Rcm is the center-of-mass
position of the molecule, and the sum is over all atoms in the
molecule and in the group.
If the {tensor} keyword is specified, then the scalar Rg value is not
calculated, but a 6-element Rg^2 tensor is instead calculated for each
molecule. The formula for the components of the tensor is the same as
the above formula, except that (Ri - Rcm)^2 is replaced by (Rix -
Rcmx) * (Riy - Rcmy) for the xy component, etc. The 6 components of
the tensor are ordered xx, yy, zz, xy, xz, yz. Note
that unlike the scalar Rg, each of the 6 values of the tensor is
effectively a "squared" value, since the cross-terms may be negative
and taking a sqrt() would be invalid.
Rg for a particular molecule is only computed if one or more of its
atoms are in the specified group. Normally all atoms in the molecule
should be in the group, however this is not required. LAMMPS will
warn you if this is not the case. Only atoms in the group contribute
to the Rg calculation for the molecule.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
IMPORTANT NOTE: The coordinates of an atom contribute to Rg in
"unwrapped" form, by using the image flags associated with each atom.
See the "dump custom"_dump.html command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
"read_data"_read_data.html command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
[Output info:]
This compute calculates a global vector if the {tensor} keyword is not
specified and a global array if it is. The length of the vector or
number of rows in the array is the number of molecules. If the
{tensor} keyword is specified, the global array has 6 columns. The
vector or array can be accessed by any command that uses global values
from a compute as input. See "this
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
All the vector or array values calculated by this compute are
"intensive". The vector and aray values will be in distance and
distance^2 "units"_units.html respectively.
[Restrictions:] none
[Related commands:] none
"compute gyration"_compute_gyration.html
[Default:] none

View File

@ -0,0 +1,93 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute inertia/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID inertia/chunk chunkID
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>inertia/molecule = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid inertia/chunk molchunk
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the inertia tensor for multiple
chunks of atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the 6 components of the symmetric intertia
tensor for each chunk, ordered Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The
calculation includes all effects due to atoms passing thru periodic
boundaries.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
inertia tensor in "unwrapped" form, by using the image flags
associated with each atom. See the <A HREF = "dump.html">dump custom</A> command
for a discussion of "unwrapped" coordinates. See the Atoms section of
the <A HREF = "read_data.html">read_data</A> command for a discussion of image flags
and how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>The simplest way to output the results of the compute inertia/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all inertia/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The number of columns =
6 for the 6 components of the inertia tensor for each chunk, ordered
as listed above. These values can be accessed by any command that
uses global array values from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P>The array values are "intensive". The array values will be in
mass*distance^2 <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "variable.html">variable inertia() function</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -0,0 +1,88 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute inertia/chunk command :h3
[Syntax:]
compute ID group-ID inertia/chunk chunkID :pre
ID, group-ID are documented in "compute"_compute.html command
inertia/molecule = style name of this compute command
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
[Examples:]
compute 1 fluid inertia/chunk molchunk :pre
[Description:]
Define a computation that calculates the inertia tensor for multiple
chunks of atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the 6 components of the symmetric intertia
tensor for each chunk, ordered Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The
calculation includes all effects due to atoms passing thru periodic
boundaries.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
inertia tensor in "unwrapped" form, by using the image flags
associated with each atom. See the "dump custom"_dump.html command
for a discussion of "unwrapped" coordinates. See the Atoms section of
the "read_data"_read_data.html command for a discussion of image flags
and how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
The simplest way to output the results of the compute inertia/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all inertia/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global array where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The number of columns =
6 for the 6 components of the inertia tensor for each chunk, ordered
as listed above. These values can be accessed by any command that
uses global array values from a compute as input. See "Section_howto
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The array values are "intensive". The array values will be in
mass*distance^2 "units"_units.html.
[Restrictions:] none
[Related commands:]
"variable inertia() function"_variable.html
[Default:] none

View File

@ -1,75 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute inertia/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID inertia/molecule
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>inertia/molecule = style name of this compute command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid inertia/molecule
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the inertia tensor of individual
molecules. The calculation includes all effects due to atoms passing
thru periodic boundaries.
</P>
<P>The symmetric intertia tensor has 6 components, ordered
Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The tensor for a particular molecule is only
computed if one or more of its atoms is in the specified group.
Normally all atoms in the molecule should be in the group, however
this is not required. LAMMPS will warn you if this is not the case.
Only atoms in the group contribute to the inertia tensor and
associated center-of-mass calculation for the molecule.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to the
molecule's inertia tensor in "unwrapped" form, by using the image
flags associated with each atom. See the <A HREF = "dump.html">dump custom</A>
command for a discussion of "unwrapped" coordinates. See the Atoms
section of the <A HREF = "read_data.html">read_data</A> command for a discussion of
image flags and how they are set for each atom. You can reset the
image flags (e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 6 for the 6 components of the
inertia tensor of each molecule, ordered as listed above. These
values can be accessed by any command that uses global array values
from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P>The array values are "intensive". The array values will be in
distance <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "variable.html">variable inertia() function</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,70 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute inertia/molecule command :h3
[Syntax:]
compute ID group-ID inertia/molecule :pre
ID, group-ID are documented in "compute"_compute.html command
inertia/molecule = style name of this compute command :ul
[Examples:]
compute 1 fluid inertia/molecule :pre
[Description:]
Define a computation that calculates the inertia tensor of individual
molecules. The calculation includes all effects due to atoms passing
thru periodic boundaries.
The symmetric intertia tensor has 6 components, ordered
Ixx,Iyy,Izz,Ixy,Iyz,Ixz. The tensor for a particular molecule is only
computed if one or more of its atoms is in the specified group.
Normally all atoms in the molecule should be in the group, however
this is not required. LAMMPS will warn you if this is not the case.
Only atoms in the group contribute to the inertia tensor and
associated center-of-mass calculation for the molecule.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
IMPORTANT NOTE: The coordinates of an atom contribute to the
molecule's inertia tensor in "unwrapped" form, by using the image
flags associated with each atom. See the "dump custom"_dump.html
command for a discussion of "unwrapped" coordinates. See the Atoms
section of the "read_data"_read_data.html command for a discussion of
image flags and how they are set for each atom. You can reset the
image flags (e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
[Output info:]
This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 6 for the 6 components of the
inertia tensor of each molecule, ordered as listed above. These
values can be accessed by any command that uses global array values
from a compute as input. See "Section_howto
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The array values are "intensive". The array values will be in
distance "units"_units.html.
[Restrictions:] none
[Related commands:]
"variable inertia() function"_variable.html
[Default:] none

125
doc/compute_msd_chunk.html Normal file
View File

@ -0,0 +1,125 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute msd/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID msd/chunk chunkID
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>msd/molecule = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all msd/chunk molchunk
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the mean-squared displacement
(MSD) for multiple chunks of atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>Four quantites are calculated by this compute for each chunk. The
first 3 quantities are the squared dx,dy,dz displacements of the
center-of-mass. The 4th component is the total squared displacement,
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These
calculations include all effects due to atoms passing thru periodic
boundaries.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>The slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing chunks.
</P>
<P>The displacement of the center-of-mass of the chunk is from its
original center-of-mass position, calculated on the timestep this
compute command was first invoked.
</P>
<P>IMPORTANT NOTE: The number of chunks <I>Nchunk</I> calculated by the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command must remain
constant each time this compute is invoked, so that the displacement
for each chunk from its original position can be computed
consistently. If <I>Nchunk</I> does not remain constant, an error will be
generated. If needed, you can enforce a constant <I>Nchunk</I> by using
the <I>nchunk once</I> or <I>ids once</I> options when specifying the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command.
</P>
<P>IMPORTANT NOTE: This compute stores the original position (of the
center-of-mass) of each chunk. When a displacement is calculated on a
later timestep, it is assumed that the same atoms are assigned to the
same chunk ID. However LAMMPS has no simple way to insure this is the
case, though you can use the <I>ids once</I> option when specifying the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command. Note that if
this is not the case, the MSD calculation does not have a sensible
meaning.
</P>
<P>IMPORTANT NOTE: The initial coordinates of the atoms in each chunk are
stored in "unwrapped" form, by using the image flags associated with
each atom. See the <A HREF = "dump.html">dump custom</A> command for a discussion
of "unwrapped" coordinates. See the Atoms section of the
<A HREF = "read_data.html">read_data</A> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>IMPORTANT NOTE: Unlike the <A HREF = "compute_msd.html">compute msd</A> command,
this compute does not store the initial center-of-mass coorindates of
its molecules in a restart file. Thus you cannot continue the MSD per
chunk calculation of this compute when running from a <A HREF = "read_restart.html">restart
file</A>.
</P>
<P>The simplest way to output the results of the compute com/msd
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all com/msd cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The number of columns =
4 for dx,dy,dz and the total displacement. These values can be
accessed by any command that uses global array values from a compute
as input. See <A HREF = "Section_howto.html#howto_15">this section</A> for an
overview of LAMMPS output options.
</P>
<P>The array values are "intensive". The array values will be in
distance^2 <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_msd.html">compute msd</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

120
doc/compute_msd_chunk.txt Normal file
View File

@ -0,0 +1,120 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute msd/chunk command :h3
[Syntax:]
compute ID group-ID msd/chunk chunkID :pre
ID, group-ID are documented in "compute"_compute.html command
msd/molecule = style name of this compute command
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
[Examples:]
compute 1 all msd/chunk molchunk :pre
[Description:]
Define a computation that calculates the mean-squared displacement
(MSD) for multiple chunks of atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
Four quantites are calculated by this compute for each chunk. The
first 3 quantities are the squared dx,dy,dz displacements of the
center-of-mass. The 4th component is the total squared displacement,
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass. These
calculations include all effects due to atoms passing thru periodic
boundaries.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
The slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing chunks.
The displacement of the center-of-mass of the chunk is from its
original center-of-mass position, calculated on the timestep this
compute command was first invoked.
IMPORTANT NOTE: The number of chunks {Nchunk} calculated by the
"compute chunk/atom"_compute_chunk_atom.html command must remain
constant each time this compute is invoked, so that the displacement
for each chunk from its original position can be computed
consistently. If {Nchunk} does not remain constant, an error will be
generated. If needed, you can enforce a constant {Nchunk} by using
the {nchunk once} or {ids once} options when specifying the "compute
chunk/atom"_compute_chunk_atom.html command.
IMPORTANT NOTE: This compute stores the original position (of the
center-of-mass) of each chunk. When a displacement is calculated on a
later timestep, it is assumed that the same atoms are assigned to the
same chunk ID. However LAMMPS has no simple way to insure this is the
case, though you can use the {ids once} option when specifying the
"compute chunk/atom"_compute_chunk_atom.html command. Note that if
this is not the case, the MSD calculation does not have a sensible
meaning.
IMPORTANT NOTE: The initial coordinates of the atoms in each chunk are
stored in "unwrapped" form, by using the image flags associated with
each atom. See the "dump custom"_dump.html command for a discussion
of "unwrapped" coordinates. See the Atoms section of the
"read_data"_read_data.html command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
IMPORTANT NOTE: Unlike the "compute msd"_compute_msd.html command,
this compute does not store the initial center-of-mass coorindates of
its molecules in a restart file. Thus you cannot continue the MSD per
chunk calculation of this compute when running from a "restart
file"_read_restart.html.
The simplest way to output the results of the compute com/msd
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all com/msd cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global array where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The number of columns =
4 for dx,dy,dz and the total displacement. These values can be
accessed by any command that uses global array values from a compute
as input. See "this section"_Section_howto.html#howto_15 for an
overview of LAMMPS output options.
The array values are "intensive". The array values will be in
distance^2 "units"_units.html.
[Restrictions:] none
[Related commands:]
"compute msd"_compute_msd.html
[Default:] none

View File

@ -1,91 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute msd/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID msd/molecule
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>msd/molecule = style name of this compute command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all msd/molecule
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the mean-squared displacement
(MSD) of individual molecules. The calculation includes all effects
due to atoms passing thru periodic boundaries.
</P>
<P>Four quantites are calculated by this compute for each molecule. The
first 3 quantities are the squared dx,dy,dz displacements of the
center-of-mass. The 4th component is the total squared displacement,
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass.
</P>
<P>The slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing molecules.
</P>
<P>The displacement of the center-of-mass of the molecule is from its
original center-of-mass position at the time the compute command was
issued.
</P>
<P>The MSD for a particular molecule is only computed if one or more of
its atoms are in the specified group. Normally all atoms in the
molecule should be in the group, however this is not required. LAMMPS
will warn you if this is not the case. Only atoms in the group
contribute to the center-of-mass calculation for the molecule, which
is used to caculate its initial and current position.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>IMPORTANT NOTE: The initial coordinates of each molecule are stored in
"unwrapped" form, by using the image flags associated with each atom.
See the <A HREF = "dump.html">dump custom</A> command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
<A HREF = "read_data.html">read_data</A> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>IMPORTANT NOTE: Unlike the <A HREF = "compute_msd.html">compute msd</A> command,
this compute does not store the initial center-of-mass coorindates of
its molecules in a restart file. Thus you cannot continue the MSD per
molecule calculation of this compute when running from a <A HREF = "read_restart.html">restart
file</A>.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 4 for dx,dy,dz and the total
displacement. These values can be accessed by any command that uses
global array values from a compute as input. See <A HREF = "Section_howto.html#howto_15">this
section</A> for an overview of LAMMPS output
options.
</P>
<P>The array values are "intensive". The array values will be in
distance^2 <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_msd.html">compute msd</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,86 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute msd/molecule command :h3
[Syntax:]
compute ID group-ID msd/molecule :pre
ID, group-ID are documented in "compute"_compute.html command
msd/molecule = style name of this compute command :ul
[Examples:]
compute 1 all msd/molecule :pre
[Description:]
Define a computation that calculates the mean-squared displacement
(MSD) of individual molecules. The calculation includes all effects
due to atoms passing thru periodic boundaries.
Four quantites are calculated by this compute for each molecule. The
first 3 quantities are the squared dx,dy,dz displacements of the
center-of-mass. The 4th component is the total squared displacement,
i.e. (dx*dx + dy*dy + dz*dz) of the center-of-mass.
The slope of the mean-squared displacement (MSD) versus time is
proportional to the diffusion coefficient of the diffusing molecules.
The displacement of the center-of-mass of the molecule is from its
original center-of-mass position at the time the compute command was
issued.
The MSD for a particular molecule is only computed if one or more of
its atoms are in the specified group. Normally all atoms in the
molecule should be in the group, however this is not required. LAMMPS
will warn you if this is not the case. Only atoms in the group
contribute to the center-of-mass calculation for the molecule, which
is used to caculate its initial and current position.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
IMPORTANT NOTE: The initial coordinates of each molecule are stored in
"unwrapped" form, by using the image flags associated with each atom.
See the "dump custom"_dump.html command for a discussion of
"unwrapped" coordinates. See the Atoms section of the
"read_data"_read_data.html command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
IMPORTANT NOTE: Unlike the "compute msd"_compute_msd.html command,
this compute does not store the initial center-of-mass coorindates of
its molecules in a restart file. Thus you cannot continue the MSD per
molecule calculation of this compute when running from a "restart
file"_read_restart.html.
[Output info:]
This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 4 for dx,dy,dz and the total
displacement. These values can be accessed by any command that uses
global array values from a compute as input. See "this
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The array values are "intensive". The array values will be in
distance^2 "units"_units.html.
[Restrictions:] none
[Related commands:]
"compute msd"_compute_msd.html
[Default:] none

View File

@ -0,0 +1,127 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute property/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID property/chunk chunkID input1 input2 ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>property/chunk = style name of this compute command
<LI>input = one or more attributes
<PRE> attributes = count, id, coord1, coord2, coord3
count = # of atoms in chunk
id = original chunk IDs before compression by <A HREF = "compute_chunk_atom.html">compute chunk/atom</A>
coord123 = coordinates for spatial bins calculated by <A HREF = "compute_chunk_atom.html">compute chunk/atom</A>
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all property/chunk count
compute 1 all property/chunk ID coord1
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that stores the specified attributes of chunks of
atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates and stores the specified attributes of chunks
as global data so they can be accessed by other <A HREF = "Section_howto.html#howto_15">output
commands</A> and used in conjunction with
other commands that generate per-chunk data, such as <A HREF = "compute_com_chunk.html">compute
com/chunk</A> or <A HREF = "compute_msd_chunk.html">compute
msd/chunk</A>.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation of the <I>count</I> attribute. The <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command defines its own group;
atoms will have a chunk ID = 0 if they are not in that group,
signifying they are not assigned to a chunk, and will thus also not
contribute to this calculation. You can specify the "all" group for
this command if you simply want to include atoms with non-zero chunk
IDs.
</P>
<P>The <I>count</I> attribute is the number of atoms in the chunk.
</P>
<P>The <I>id</I> attribute stores the original chunk ID for each chunk. It
can only be used if the <I>compress</I> keyword was set to <I>yes</I> for the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command referenced by
chunkID. This means that the original chunk IDs (e.g. molecule IDs)
will have been compressed to remove chunk IDs with no atoms assigned
to them. Thus a compresed chunk ID of 3 may correspond to an original
chunk ID (molecule ID in this case) of 415. The <I>id</I> attribute will
then be 415 for the 3rd chunk.
</P>
<P>The <I>coordN</I> attributes can only be used if a <I>binning</I> style was used
in the <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command referenced
by chunkID. For <I>bin/1d</I>, <I>bin/2d</I>, and <I>bin/3d</I> styles the attribute
is the center point of the bin in the corresponding dimension. Style
<I>bin/1d</I> only defines a <I>coord1</I> attribute. Style <I>bin/2d</I> adds a
<I>coord2</I> attribute. Style <I>bin/3d</I> adds a <I>coord3</I> attribute.
</P>
<P>Note that if the value of the <I>units</I> keyword used in the <A HREF = "compute_chunk_atom.html">compute
chunk/atom command</A> is <I>box</I> or <I>lattice</I>, the
<I>coordN</I> attributes will be in distance <A HREF = "units.html">units</A>. If the
value of the <I>units</I> keyword is <I>reduced</I>, the <I>coordN</I> attributes
will be in unitless reduced units (0-1).
</P>
<P>The simplest way to output the results of the compute property/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk1 all property/chunk cc1
compute myChunk2 all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2 file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of chunks.
</P>
<P>This compute calculates a global vector or global array where the
number of rows = the number of chunks <I>Nchunk</I> as calculated by the
specified <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command. If a
single input is specified, a global vector is produced. If two or
more inputs are specified, a global array is produced where the number
of columns = the number of inputs. The vector or array can be
accessed by any command that uses global values from a compute as
input. See <A HREF = "Section_howto.html#howto_15">this section</A> for an overview
of LAMMPS output options.
</P>
<P>The vector or array values are "intensive". The values will be
unitless or in the units discussed above.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_ave_chunk.html">fix ave/chunk</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -0,0 +1,118 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute property/chunk command :h3
[Syntax:]
compute ID group-ID property/chunk chunkID input1 input2 ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
property/chunk = style name of this compute command :l
input = one or more attributes :l
attributes = count, id, coord1, coord2, coord3
count = # of atoms in chunk
id = original chunk IDs before compression by "compute chunk/atom"_compute_chunk_atom.html
coord123 = coordinates for spatial bins calculated by "compute chunk/atom"_compute_chunk_atom.html :pre
:ule
[Examples:]
compute 1 all property/chunk count
compute 1 all property/chunk ID coord1 :pre
[Description:]
Define a computation that stores the specified attributes of chunks of
atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates and stores the specified attributes of chunks
as global data so they can be accessed by other "output
commands"_Section_howto.html#howto_15 and used in conjunction with
other commands that generate per-chunk data, such as "compute
com/chunk"_compute_com_chunk.html or "compute
msd/chunk"_compute_msd_chunk.html.
Note that only atoms in the specified group contribute to the
calculation of the {count} attribute. The "compute
chunk/atom"_compute_chunk_atom.html command defines its own group;
atoms will have a chunk ID = 0 if they are not in that group,
signifying they are not assigned to a chunk, and will thus also not
contribute to this calculation. You can specify the "all" group for
this command if you simply want to include atoms with non-zero chunk
IDs.
The {count} attribute is the number of atoms in the chunk.
The {id} attribute stores the original chunk ID for each chunk. It
can only be used if the {compress} keyword was set to {yes} for the
"compute chunk/atom"_compute_chunk_atom.html command referenced by
chunkID. This means that the original chunk IDs (e.g. molecule IDs)
will have been compressed to remove chunk IDs with no atoms assigned
to them. Thus a compresed chunk ID of 3 may correspond to an original
chunk ID (molecule ID in this case) of 415. The {id} attribute will
then be 415 for the 3rd chunk.
The {coordN} attributes can only be used if a {binning} style was used
in the "compute chunk/atom"_compute_chunk_atom.html command referenced
by chunkID. For {bin/1d}, {bin/2d}, and {bin/3d} styles the attribute
is the center point of the bin in the corresponding dimension. Style
{bin/1d} only defines a {coord1} attribute. Style {bin/2d} adds a
{coord2} attribute. Style {bin/3d} adds a {coord3} attribute.
Note that if the value of the {units} keyword used in the "compute
chunk/atom command"_compute_chunk_atom.html is {box} or {lattice}, the
{coordN} attributes will be in distance "units"_units.html. If the
value of the {units} keyword is {reduced}, the {coordN} attributes
will be in unitless reduced units (0-1).
The simplest way to output the results of the compute property/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk1 all property/chunk cc1
compute myChunk2 all com/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk1 c_myChunk2 file tmp.out mode vector :pre
[Output info:]
This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of chunks.
This compute calculates a global vector or global array where the
number of rows = the number of chunks {Nchunk} as calculated by the
specified "compute chunk/atom"_compute_chunk_atom.html command. If a
single input is specified, a global vector is produced. If two or
more inputs are specified, a global array is produced where the number
of columns = the number of inputs. The vector or array can be
accessed by any command that uses global values from a compute as
input. See "this section"_Section_howto.html#howto_15 for an overview
of LAMMPS output options.
The vector or array values are "intensive". The values will be
unitless or in the units discussed above.
[Restrictions:] none
[Related commands:]
"fix ave/chunk"_fix_ave_chunk.html
[Default:] none

View File

@ -1,77 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute property/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID property/molecule input1 input2 ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>property/molecule = style name of this compute command
<LI>input = one or more attributes
<PRE> possible attributes = mol cout
mol = molecule ID
count = # of atoms in molecule
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 all property/molecule mol
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that stores the specified attributes as global
data so it can be accessed by other <A HREF = "Section_howto.html#howto_15">output
commands</A> and used in conjunction with
other commands that generate per-molecule data, such as <A HREF = "compute_com_molecule.html">compute
com/molecule</A> and <A HREF = "compute_msd_molecule.html">compute
msd/molecule</A>.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P>The <I>mol</I> attribute is the molecule ID. This attribute can be used to
produce molecule IDs as labels for per-molecule datums generated by
other computes or fixes when they are output to a file, e.g. by the
<A HREF = "fix_ave_time.html">fix ave/time</A> command.
</P>
<P>The <I>count</I> attribute is the number of atoms in the molecule.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of molecules. If a single input is
specified, a global vector is produced. If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs. The vector or array can be accessed by any
command that uses global values from a compute as input. See <A HREF = "Section_howto.html#howto_15">this
section</A> for an overview of LAMMPS output
options.
</P>
<P>The vector or array values will be integers that correspond to the
specified attribute.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B> none
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,68 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute property/molecule command :h3
[Syntax:]
compute ID group-ID property/molecule input1 input2 ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
property/molecule = style name of this compute command :l
input = one or more attributes :l
possible attributes = mol cout
mol = molecule ID
count = # of atoms in molecule :pre
:ule
[Examples:]
compute 1 all property/molecule mol :pre
[Description:]
Define a computation that stores the specified attributes as global
data so it can be accessed by other "output
commands"_Section_howto.html#howto_15 and used in conjunction with
other commands that generate per-molecule data, such as "compute
com/molecule"_compute_com_molecule.html and "compute
msd/molecule"_compute_msd_molecule.html.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
The {mol} attribute is the molecule ID. This attribute can be used to
produce molecule IDs as labels for per-molecule datums generated by
other computes or fixes when they are output to a file, e.g. by the
"fix ave/time"_fix_ave_time.html command.
The {count} attribute is the number of atoms in the molecule.
[Output info:]
This compute calculates a global vector or global array depending on
the number of input values. The length of the vector or number of
rows in the array is the number of molecules. If a single input is
specified, a global vector is produced. If two or more inputs are
specified, a global array is produced where the number of columns =
the number of inputs. The vector or array can be accessed by any
command that uses global values from a compute as input. See "this
section"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The vector or array values will be integers that correspond to the
specified attribute.
[Restrictions:] none
[Related commands:] none
[Default:] none

185
doc/compute_temp_chunk.html Normal file
View File

@ -0,0 +1,185 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute temp/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID temp/chunk chunkID keyword value ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>temp/chunk = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>com</I> or <I>bias</I>or <I>adof</I> or <I>cdof</I>
<PRE> <I>com</I> value = <I>yes</I> or <I>no</I>
yes = subtract center-of-mass velocity from each chunk before calculating temperature
no = do not subtract center-of-mass velocity
<I>bias</I> value = bias-ID
bias-ID = ID of a temperature compute that removes a velocity bias
<I>adof</I> value = dof_per_atom
dof_per_atom = define this many degrees-of-freedom per atom
<I>cdof</I> value = dof_per_chunk
dof_per_chunk = define this many degrees-of-freedom per chunk
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid temp/chunk molchunk
</PRE>
<PRE>compute 1 fluid temp/chunk molchunk bias tpartial adof 2.0
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the temperature of multiple
chunks of atoms. Note that unlike other computes with style names
temp/* which calculate the temperature of an entire group of atoms,
this compute cannot be used by any command that uses such a
temperature compute, e.g. <A HREF = "thermo_modify.html">thermo_modify</A>, <A HREF = "fix_temp_rescale.html">fix
temp/rescale</A>, <A HREF = "fix_nh.html">fix npt</A>, etc. That
is because this compute calculates multiple temperatures, one per
chunk.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the temperature for each chunk by the formula
KE = DOF/2 k T, where KE = total kinetic energy of the chunk of atoms
(sum of 1/2 m v^2), DOF = the total number of degrees of freedom for
all atoms in the chunk, k = Boltzmann constant, and T = temperature.
</P>
<P>The DOF is calculated as N*adof + cdof, where N = number of atoms in
the chunk, adof = degrees of freedom per atom, and cdof = degrees of
freedom per chunk. By default adof = 2 or 3 = dimensionality of
system, as set via the <A HREF = "dimension.html">dimension</A> command, and cdof =
0.0. This gives the usual formula for temperature.
</P>
<P>Note that currently this temperature only includes translational
degrees of freedom for each atom. No rotational degrees of freedom
are included for finite-size particles. Also no degrees of freedom
are subtracted for any velocity bias or constraints that are applied,
such as <A HREF = "compute_temp_partial.html">compute temp/partial</A>, or <A HREF = "fix_shake.html">fix
shake</A> or <A HREF = "fix_rigid.html">fix rigid</A>. This is because
those degrees of freedom (e.g. a constrained bond) could apply to sets
of atoms that are both included and excluded from a specific chunk,
and hence the concept is somewhat ill-defined. In some cases, you can
use the <I>adof</I> and <I>cdof</I> keywords to adjust the calculated degress of
freedom appropriately, as explained below.
</P>
<P>Also note that a bias can be subtracted from atom velocities before
they are used in the above formula for KE, by using the <I>bias</I>
keyword. This allows, for example, a thermal temperature to be
computed after removal of a flow velocity profile.
</P>
<P>Note that this compute and the <A HREF = "fix_ave_chunk.html">fix ave/chunk temp</A>
command can calculate different things. This compute calculates the
temperature for each chunk for a single snapshot. Fix ave/chunk can
do that but can time average those values over many snapshots, or it
can compute a temperature as if the atoms in the chunk on different
timesteps were collected together as one set of atoms to calculate
their temperature. This compute allows the center-of-mass velocity of
each chunk to be subtracted before calculating the temperature; fix
ave/chunk does not.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>The simplest way to output the results of the compute temp/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all temp/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<HR>
<P>The keyword/value option pairs are used in the following ways.
</P>
<P>The <I>com</I> keyword can be used with a value of <I>yes</I> to subtract the
velocity of the center-of-mass for each chunk from the velocity of the
atoms in that chunk, before calculating the temperature. This can be
useful if the atoms are streaming or otherwise moving collectively,
and you wish to calculate only the thermal temperature.
</P>
<P>For the <I>bias</I> keyword, <I>bias-ID</I> refers to the ID of a temperature
compute that removes a "bias" velocity from each atom. This also
allows compute temp/chunk to compute the thermal temperature of each
chunk after the translational kinetic energy components have been
altered in a prescribed way, e.g. to remove a velocity profile. Note
that the temperature compute will apply its bias globally to the
entire system, not on a per-chunk basis.
</P>
<P>The <I>adof</I> and <I>cdof</I> keywords define the values used in the degree of
freedom (DOF) formula used for each chunk, as described above. They
can be used to calculate a more appropriate temperature for some kinds
of chunks. Here are 3 examples.
</P>
<P>If spatially binned chunks contain some number of water molecules and
<A HREF = "fix_shake.html">fix shake</A> is used to make each molecule rigid, then
you could calculate a temperature with 6 degrees of freedom (DOF) (3
translational, 3 rotational) per molecule by setting <I>adof</I> to 2.0.
If <A HREF = "compute_temp_partial.html">compute temp/partial</A> is used with the
<I>bias</I> keyword to only allow the x component of velocity to contribute
to the temperature, then <I>adof</I> = 1.0 would be appropriate. If each
chunk consists of a large molecule, with some number of its bonds
constrained by <A HREF = "fix_shake.html">fix shake</A> or the entire molecule by
<A HREF = "fix_rigid.html">fix rigid/small</A>, then <I>cdof</I> could be set to the
remaining degrees of freedom for the entire molecule (entire chunk in
this case).
</P>
<HR>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global vector where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. These values can be
accessed by any command that uses global vector values from a compute
as input. See <A HREF = "Section_howto.html#howto_15">Section_howto 15</A> for an
overview of LAMMPS output options.
</P>
<P>The vector values are "intensive". The vector values will be in
temperature <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B>
</P>
<P>The <I>com</I> and <I>bias</I> keywords cannot be used together.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_temp.html">compute temp</A>, <A HREF = "fix_ave_chunk.html">fix ave/chunk
temp</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are com no, no bias, adof = dimensionality of the
system (2 or 3), and cdof = 0.0.
</P>
</HTML>

173
doc/compute_temp_chunk.txt Normal file
View File

@ -0,0 +1,173 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute temp/chunk command :h3
[Syntax:]
compute ID group-ID temp/chunk chunkID keyword value ... :pre
ID, group-ID are documented in "compute"_compute.html command :ulb,l
temp/chunk = style name of this compute command :l
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l
zero or more keyword/value pairs may be appended :l
keyword = {com} or {bias}or {adof} or {cdof} :l
{com} value = {yes} or {no}
yes = subtract center-of-mass velocity from each chunk before calculating temperature
no = do not subtract center-of-mass velocity
{bias} value = bias-ID
bias-ID = ID of a temperature compute that removes a velocity bias
{adof} value = dof_per_atom
dof_per_atom = define this many degrees-of-freedom per atom
{cdof} value = dof_per_chunk
dof_per_chunk = define this many degrees-of-freedom per chunk :pre
:ule
[Examples:]
compute 1 fluid temp/chunk molchunk :pre
compute 1 fluid temp/chunk molchunk bias tpartial adof 2.0 :pre
[Description:]
Define a computation that calculates the temperature of multiple
chunks of atoms. Note that unlike other computes with style names
temp/* which calculate the temperature of an entire group of atoms,
this compute cannot be used by any command that uses such a
temperature compute, e.g. "thermo_modify"_thermo_modify.html, "fix
temp/rescale"_fix_temp_rescale.html, "fix npt"_fix_nh.html, etc. That
is because this compute calculates multiple temperatures, one per
chunk.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the temperature for each chunk by the formula
KE = DOF/2 k T, where KE = total kinetic energy of the chunk of atoms
(sum of 1/2 m v^2), DOF = the total number of degrees of freedom for
all atoms in the chunk, k = Boltzmann constant, and T = temperature.
The DOF is calculated as N*adof + cdof, where N = number of atoms in
the chunk, adof = degrees of freedom per atom, and cdof = degrees of
freedom per chunk. By default adof = 2 or 3 = dimensionality of
system, as set via the "dimension"_dimension.html command, and cdof =
0.0. This gives the usual formula for temperature.
Note that currently this temperature only includes translational
degrees of freedom for each atom. No rotational degrees of freedom
are included for finite-size particles. Also no degrees of freedom
are subtracted for any velocity bias or constraints that are applied,
such as "compute temp/partial"_compute_temp_partial.html, or "fix
shake"_fix_shake.html or "fix rigid"_fix_rigid.html. This is because
those degrees of freedom (e.g. a constrained bond) could apply to sets
of atoms that are both included and excluded from a specific chunk,
and hence the concept is somewhat ill-defined. In some cases, you can
use the {adof} and {cdof} keywords to adjust the calculated degress of
freedom appropriately, as explained below.
Also note that a bias can be subtracted from atom velocities before
they are used in the above formula for KE, by using the {bias}
keyword. This allows, for example, a thermal temperature to be
computed after removal of a flow velocity profile.
Note that this compute and the "fix ave/chunk temp"_fix_ave_chunk.html
command can calculate different things. This compute calculates the
temperature for each chunk for a single snapshot. Fix ave/chunk can
do that but can time average those values over many snapshots, or it
can compute a temperature as if the atoms in the chunk on different
timesteps were collected together as one set of atoms to calculate
their temperature. This compute allows the center-of-mass velocity of
each chunk to be subtracted before calculating the temperature; fix
ave/chunk does not.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
The simplest way to output the results of the compute temp/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all temp/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
:line
The keyword/value option pairs are used in the following ways.
The {com} keyword can be used with a value of {yes} to subtract the
velocity of the center-of-mass for each chunk from the velocity of the
atoms in that chunk, before calculating the temperature. This can be
useful if the atoms are streaming or otherwise moving collectively,
and you wish to calculate only the thermal temperature.
For the {bias} keyword, {bias-ID} refers to the ID of a temperature
compute that removes a "bias" velocity from each atom. This also
allows compute temp/chunk to compute the thermal temperature of each
chunk after the translational kinetic energy components have been
altered in a prescribed way, e.g. to remove a velocity profile. Note
that the temperature compute will apply its bias globally to the
entire system, not on a per-chunk basis.
The {adof} and {cdof} keywords define the values used in the degree of
freedom (DOF) formula used for each chunk, as described above. They
can be used to calculate a more appropriate temperature for some kinds
of chunks. Here are 3 examples.
If spatially binned chunks contain some number of water molecules and
"fix shake"_fix_shake.html is used to make each molecule rigid, then
you could calculate a temperature with 6 degrees of freedom (DOF) (3
translational, 3 rotational) per molecule by setting {adof} to 2.0.
If "compute temp/partial"_compute_temp_partial.html is used with the
{bias} keyword to only allow the x component of velocity to contribute
to the temperature, then {adof} = 1.0 would be appropriate. If each
chunk consists of a large molecule, with some number of its bonds
constrained by "fix shake"_fix_shake.html or the entire molecule by
"fix rigid/small"_fix_rigid.html, then {cdof} could be set to the
remaining degrees of freedom for the entire molecule (entire chunk in
this case).
:line
[Output info:]
This compute calculates a global vector where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. These values can be
accessed by any command that uses global vector values from a compute
as input. See "Section_howto 15"_Section_howto.html#howto_15 for an
overview of LAMMPS output options.
The vector values are "intensive". The vector values will be in
temperature "units"_units.html.
[Restrictions:]
The {com} and {bias} keywords cannot be used together.
[Related commands:]
"compute temp"_compute_temp.html, "fix ave/chunk
temp"_fix_ave_chunk.html
[Default:]
The option defaults are com no, no bias, adof = dimensionality of the
system (2 or 3), and cdof = 0.0.

View File

@ -0,0 +1,92 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute torque/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID torque/chunk chunkID
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>torque/molecule = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid torque/chunk molchunk
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the torque on multiple chunks of
atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the 3 components of the torque vector for eqch
chunk, due to the forces on the individual atoms in the chunk around
the center-of-mass of the chunk. The calculation includes all effects
due to atoms passing thru periodic boundaries.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
torque in "unwrapped" form, by using the image flags associated with
each atom. See the <A HREF = "dump.html">dump custom</A> command for a discussion
of "unwrapped" coordinates. See the Atoms section of the
<A HREF = "read_data.html">read_data</A> command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the <A HREF = "set.html">set
image</A> command.
</P>
<P>The simplest way to output the results of the compute torque/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all torque/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The number of columns =
3 for the 3 xyz components of the torque for each chunk. These values
can be accessed by any command that uses global array values from a
compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto 15</A>
for an overview of LAMMPS output options.
</P>
<P>The array values are "intensive". The array values will be in
force-distance <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "variable.html">variable torque() function</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -0,0 +1,87 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute torque/chunk command :h3
[Syntax:]
compute ID group-ID torque/chunk chunkID :pre
ID, group-ID are documented in "compute"_compute.html command
torque/molecule = style name of this compute command
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
[Examples:]
compute 1 fluid torque/chunk molchunk :pre
[Description:]
Define a computation that calculates the torque on multiple chunks of
atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the 3 components of the torque vector for eqch
chunk, due to the forces on the individual atoms in the chunk around
the center-of-mass of the chunk. The calculation includes all effects
due to atoms passing thru periodic boundaries.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
IMPORTANT NOTE: The coordinates of an atom contribute to the chunk's
torque in "unwrapped" form, by using the image flags associated with
each atom. See the "dump custom"_dump.html command for a discussion
of "unwrapped" coordinates. See the Atoms section of the
"read_data"_read_data.html command for a discussion of image flags and
how they are set for each atom. You can reset the image flags
(e.g. to 0) before invoking this compute by using the "set
image"_set.html command.
The simplest way to output the results of the compute torque/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all torque/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global array where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The number of columns =
3 for the 3 xyz components of the torque for each chunk. These values
can be accessed by any command that uses global array values from a
compute as input. See "Section_howto 15"_Section_howto.html#howto_15
for an overview of LAMMPS output options.
The array values are "intensive". The array values will be in
force-distance "units"_units.html.
[Restrictions:] none
[Related commands:]
"variable torque() function"_variable.html
[Default:] none

View File

@ -0,0 +1,82 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute vcm/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID vcm/chunk chunkID
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>vcm/chunk = style name of this compute command
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid vcm/chunk molchunk
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the center-of-mass velocity for
multiple chunks of atoms.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>This compute calculates the x,y,z components of the center-of-mass
velocity for each chunk. This is done by summing mass*velocity for
each atom in the chunk and dividing the sum by the total mass of the
chunk.
</P>
<P>Note that only atoms in the specified group contribute to the
calculation. The <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
</P>
<P>The simplest way to output the results of the compute vcm/chunk
calculation to a file is to use the <A HREF = "fix_ave_time.html">fix ave/time</A>
command, for example:
</P>
<PRE>compute cc1 chunk/atom molecule
compute myChunk all vcm/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector
</PRE>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows = the
number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The number of columns =
3 for the x,y,z center-of-mass velocity coordinates of each chunk.
These values can be accessed by any command that uses global array
values from a compute as input. See <A HREF = "Section_howto.html#howto_15">Section_howto
15</A> for an overview of LAMMPS output
options.
</P>
<P>The array values are "intensive". The array values will be in
velocity <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B> none
</P>
<P><B>Default:</B> none
</P>
</HTML>

77
doc/compute_vcm_chunk.txt Normal file
View File

@ -0,0 +1,77 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute vcm/chunk command :h3
[Syntax:]
compute ID group-ID vcm/chunk chunkID :pre
ID, group-ID are documented in "compute"_compute.html command
vcm/chunk = style name of this compute command
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :ul
[Examples:]
compute 1 fluid vcm/chunk molchunk :pre
[Description:]
Define a computation that calculates the center-of-mass velocity for
multiple chunks of atoms.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
This compute calculates the x,y,z components of the center-of-mass
velocity for each chunk. This is done by summing mass*velocity for
each atom in the chunk and dividing the sum by the total mass of the
chunk.
Note that only atoms in the specified group contribute to the
calculation. The "compute chunk/atom"_compute_chunk_atom.html command
defines its own group; atoms will have a chunk ID = 0 if they are not
in that group, signifying they are not assigned to a chunk, and will
thus also not contribute to this calculation. You can specify the
"all" group for this command if you simply want to include atoms with
non-zero chunk IDs.
The simplest way to output the results of the compute vcm/chunk
calculation to a file is to use the "fix ave/time"_fix_ave_time.html
command, for example:
compute cc1 chunk/atom molecule
compute myChunk all vcm/chunk cc1
fix 1 all ave/time 100 1 100 c_myChunk file tmp.out mode vector :pre
[Output info:]
This compute calculates a global array where the number of rows = the
number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The number of columns =
3 for the x,y,z center-of-mass velocity coordinates of each chunk.
These values can be accessed by any command that uses global array
values from a compute as input. See "Section_howto
15"_Section_howto.html#howto_15 for an overview of LAMMPS output
options.
The array values are "intensive". The array values will be in
velocity "units"_units.html.
[Restrictions:] none
[Related commands:] none
[Default:] none

View File

@ -1,65 +0,0 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>compute vcm/molecule command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>compute ID group-ID vcm/molecule
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "compute.html">compute</A> command
<LI>vcm/molecule = style name of this compute command
</UL>
<P><B>Examples:</B>
</P>
<PRE>compute 1 fluid vcm/molecule
</PRE>
<P><B>Description:</B>
</P>
<P>Define a computation that calculates the center-of-mass velocity of
individual molecules. The x,y,z components of the velocity of each
molecule are computed. This is calcualted by summing mass*velocity
for each atom in the molecule and dividing the sum by the total mass
of the molecule.
</P>
<P>The velocity of a particular molecule is only computed if one or more
of its atoms are in the specified group. Normally all atoms in the
molecule should be in the group, however this is not required. LAMMPS
will warn you if this is not the case. Only atoms in the group
contribute to the velocity calculation for the molecule.
</P>
<P>The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
</P>
<P><B>Output info:</B>
</P>
<P>This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 3 for the vx,vy,vz components
of the center-of-mass velocity of each molecule. These values can be
accessed by any command that uses global array values from a compute
as input. See <A HREF = "Section_howto.html#howto_15">Section_howto 15</A> for an
overview of LAMMPS output options.
</P>
<P>The array values are "intensive". The array values will be in
distance <A HREF = "units.html">units</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute_atom_molecule.html">compute atom/molecule</A>
</P>
<P><B>Default:</B> none
</P>
</HTML>

View File

@ -1,60 +0,0 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
compute vcm/molecule command :h3
[Syntax:]
compute ID group-ID vcm/molecule :pre
ID, group-ID are documented in "compute"_compute.html command
vcm/molecule = style name of this compute command :ul
[Examples:]
compute 1 fluid vcm/molecule :pre
[Description:]
Define a computation that calculates the center-of-mass velocity of
individual molecules. The x,y,z components of the velocity of each
molecule are computed. This is calcualted by summing mass*velocity
for each atom in the molecule and dividing the sum by the total mass
of the molecule.
The velocity of a particular molecule is only computed if one or more
of its atoms are in the specified group. Normally all atoms in the
molecule should be in the group, however this is not required. LAMMPS
will warn you if this is not the case. Only atoms in the group
contribute to the velocity calculation for the molecule.
The ordering of per-molecule quantities produced by this compute is
consistent with the ordering produced by other compute commands that
generate per-molecule datums. Conceptually, the molecule IDs will be
in ascending order for any molecule with one or more of its atoms in
the specified group.
[Output info:]
This compute calculates a global array where the number of rows =
Nmolecules and the number of columns = 3 for the vx,vy,vz components
of the center-of-mass velocity of each molecule. These values can be
accessed by any command that uses global array values from a compute
as input. See "Section_howto 15"_Section_howto.html#howto_15 for an
overview of LAMMPS output options.
The array values are "intensive". The array values will be in
distance "units"_units.html.
[Restrictions:] none
[Related commands:]
"compute atom/molecule"_compute_atom_molecule.html
[Default:] none

455
doc/fix_ave_chunk.html Normal file
View File

@ -0,0 +1,455 @@
<HTML>
<CENTER><A HREF = "http://lammps.sandia.gov">LAMMPS WWW Site</A> - <A HREF = "Manual.html">LAMMPS Documentation</A> - <A HREF = "Section_commands.html#comm">LAMMPS Commands</A>
</CENTER>
<HR>
<H3>fix ave/chunk command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>fix ID group-ID ave/chunk Nevery Nrepeat Nfreq chunkID value1 value2 ... keyword args ...
</PRE>
<UL><LI>ID, group-ID are documented in <A HREF = "fix.html">fix</A> command
<LI>ave/chunk = style name of this fix command
<LI>Nevery = use input values every this many timesteps
<LI>Nrepeat = # of times to use input values for calculating averages
<LI>Nfreq = calculate averages every this many timesteps
<LI>chunkID = ID of <A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command
<LI>one or more input values can be listed
<LI>value = vx, vy, vz, fx, fy, fz, density/mass, density/number, temp, c_ID, c_ID[I], f_ID, f_ID[I], v_name
<PRE> vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component)
density/number, density/mass = number or mass density
temp = temperature
c_ID = per-atom vector calculated by a compute with ID
c_ID[I] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID[I] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name
</PRE>
<LI>zero or more keyword/arg pairs may be appended
<LI>keyword = <I>norm</I> or <I>ave</I> or <I>bias</I> or <I>adof</I> or <I>cdof</I> or <I>file</I> or <I>overwrite</I> or <I>title1</I> or <I>title2</I> or <I>title3</I>
<PRE> <I>norm</I> arg = <I>all</I> or <I>sample</I> or <I>none</I> = how output on <I>Nfreq</I> steps is normalized
all = output is sum of atoms across all <I>Nrepeat</I> samples, divided by atom count
sample = output is sum of <I>Nrepeat</I> sample averages, divided by <I>Nrepeat</I>
none = output is sum of <I>Nrepeat</I> sums, divided by <I>Nrepeat</I>
<I>ave</I> args = <I>one</I> or <I>running</I> or <I>window M</I>
one = output new average value every Nfreq steps
running = output cumulative average of all previous Nfreq steps
window M = output average of M most recent Nfreq steps
<I>bias</I> arg = bias-ID
bias-ID = ID of a temperature compute that removes a velocity bias for temperature calculation
<I>adof</I> value = dof_per_atom
dof_per_atom = define this many degrees-of-freedom per atom for temperature calculation
<I>cdof</I> value = dof_per_chunk
dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation
<I>file</I> arg = filename
filename = file to write results to
<I>overwrite</I> arg = none = overwrite output file with only latest output
<I>title1</I> arg = string
string = text to print as 1st line of output file
<I>title2</I> arg = string
string = text to print as 2nd line of output file
<I>title3</I> arg = string
string = text to print as 3rd line of output file
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "My output values"
fix 1 flow ave/chunk 100 10 1000 molchunk vx vz norm sample file vel.profile
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
</PRE>
<P><B>IMPORTANT NOTE:</B>
</P>
<P>If you are trying to replace an older fix ave/spatial command with the
newer, more flexible fix ave/chunk and <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> commands, you simply need to split
the fix ave/spatial arguments across the two new commands. For
example, this command:
</P>
<PRE>fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile
</PRE>
<P>could be replaced by:
</P>
<PRE>compute cc1 flow chunk/atom bin/1d y 0.0 1.0
fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile
</PRE>
<P><B>Description:</B>
</P>
<P>Use one or more per-atom vectors as inputs every few timesteps, sum
their values for multiple chunks of atoms, and average the values for
each chunk over longer timescales. The resulting chunk averages can
be used by other <A HREF = "Section_howto.html#howto_15">output commands</A> such as
<A HREF = "thermo_style.html">thermo_style custom</A>, and can also be written to a
file.
</P>
<P>In LAMMPS, chunks are collections of atoms defined by a <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page and "<A HREF = "Section_howto.html#howto_23">Section_howto
23</A> for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
</P>
<P>Note that only atoms in the specified group contribute to the summing
and averaging calculations. The <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command defines its own group as
well as an optional region. Atoms will have a chunk ID = 0, meaning
they belong to no chunk, if they are not in that group or region.
Thus you can specify the "all" group for this command if you simply
want to use the chunk definitions provided by chunkID.
</P>
<P>Each specified per-atom value can be an atom attribute (position,
velocity, force component), a mass or number density, or the result of
a <A HREF = "compute.html">compute</A> or <A HREF = "fix.html">fix</A> or the evaluation of an
atom-style <A HREF = "variable.html">variable</A>. In the latter cases, the
compute, fix, or variable must produce a per-atom quantity, not a
global quantity. Note that the <A HREF = "compute_property_atom.html">compute
property/atom</A> command provides access to
any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the <A HREF = "fix_ave_time.html">fix ave/time</A> command.
</P>
<P><A HREF = "compute.html">Computes</A> that produce per-atom quantities are those
which have the word <I>atom</I> in their style name. See the doc pages for
individual <A HREF = "fix.html">fixes</A> to determine which ones produce per-atom
quantities. <A HREF = "variable.html">Variables</A> of style <I>atom</I> are the only
ones that can be used with this fix since all other styles of variable
produce global quantities.
</P>
<P>The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
</P>
<P>IMPORTANT NOTE: This fix works by creating an array of size <I>Nchunk</I>
by Nvalues on each processor. <I>Nchunk</I> is the number of chunks which
is defined by the <A HREF = "doc/compute_chunk_atom.html">compute chunk/atom</A>
command. Nvalues is the number of input values specified. Each
processor loops over its atoms, tallying its values to the appropriate
chunk. Then the entire array is summed across all processors. This
means that using a large number of chunks will incur an overhead in
memory and computational cost (summing across processors), so be
careful to define a reasonable number of chunks.
</P>
<HR>
<P>The <I>Nevery</I>, <I>Nrepeat</I>, and <I>Nfreq</I> arguments specify on what
timesteps the input values will be accessed and contribute to the
average. The final averaged quantities are generated on timesteps
that are a multiples of <I>Nfreq</I>. The average is over <I>Nrepeat</I>
quantities, computed in the preceding portion of the simulation every
<I>Nevery</I> timesteps. <I>Nfreq</I> must be a multiple of <I>Nevery</I> and
<I>Nevery</I> must be non-zero even if <I>Nrepeat</I> is 1. Also, the timesteps
contributing to the average value cannot overlap, i.e. Nfreq >
(Nrepeat-1)*Nevery is required.
</P>
<P>For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on
timesteps 90,92,94,96,98,100 will be used to compute the final average
on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on
timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time
averaging is done; values are simply generated on timesteps
100,200,etc.
</P>
<P>Each input value can also be averaged over the atoms in each chunk.
The way the averaging is done across the <I>Nrepeat</I> timesteps to
produce output on the <I>Nfreq</I> timesteps, and across multiple <I>Nfreq</I>
outputs, is determined by the <I>norm</I> and <I>ave</I> keyword settings, as
discussed below.
</P>
<P>IMPORTANT NOTE: To perform per-chunk averaging within a <I>Nfreq</I> time
window, the number of chunks <I>Nchunk</I> defined by the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command must remain constant. If
the <I>ave</I> keyword is set to <I>running</I> or <I>window</I> then <I>Nchunk</I> must
remain constant for the duration of the simulation. This fix forces
the chunk/atom compute specified by chunkID to hold <I>Nchunk</I> constant
for the appropriate time windows, by not allowing it to re-calcualte
<I>Nchunk</I>, which can also affect how it assigns chunk IDs to atoms.
More details are given on the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> doc page.
</P>
<HR>
<P>The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory.
As noted above, any other atom attributes can be used as input values
to this fix by using the <A HREF = "compute_property_atom.html">compute
property/atom</A> command and then specifying
an input value from that compute.
</P>
<P>The <I>density/number</I> value means the number density is computed for
each chunk, i.e. a weighting of 1 for each atom. The <I>density/mass</I>
value means the mass density is computed for each , i.e. each atom is
weighted by its mass. The resulting density is normalized by the
volume of the chunk so that units of number/volume or density are
output. See the <A HREF = "units.html">units</A> command doc page for the
definition of density for each choice of units, e.g. gram/cm^3. If
the chunks defined by the <A HREF = "compute_chunk_atom.html">compute chunk/atom</A>
command are spatial bins, the volume is the bin volume. Otherwise it
is the volume of the entire simulation box.
</P>
<P>The <I>temp</I> value means the temperature is computed for each chunk, by
the formula KE = DOF/2 k T, where KE = total kinetic energy of the
chunk of atoms (sum of 1/2 m v^2), DOF = the total number of degrees
of freedom for all atoms in the chunk, k = Boltzmann constant, and T =
temperature.
</P>
<P>The DOF is calculated as N*adof + cdof, where N = number of atoms in
the chunk, adof = degrees of freedom per atom, and cdof = degrees of
freedom per chunk. By default adof = 2 or 3 = dimensionality of
system, as set via the <A HREF = "dimension.html">dimension</A> command, and cdof =
0.0. This gives the usual formula for temperature.
</P>
<P>Note that currently this temperature only includes translational
degrees of freedom for each atom. No rotational degrees of freedom
are included for finite-size particles. Also no degrees of freedom
are subtracted for any velocity bias or constraints that are applied,
such as <A HREF = "compute_temp_partial.html">compute temp/partial</A>, or <A HREF = "fix_shake.html">fix
shake</A> or <A HREF = "fix_rigid.html">fix rigid</A>. This is because
those degrees of freedom (e.g. a constrained bond) could apply to sets
of atoms that are both included and excluded from a specific chunk,
and hence the concept is somewhat ill-defined. In some cases, you can
use the <I>adof</I> and <I>cdof</I> keywords to adjust the calculated degress of
freedom appropriately, as explained below.
</P>
<P>Also note that a bias can be subtracted from atom velocities before
they are used in the above formula for KE, by using the <I>bias</I>
keyword. This allows, for example, a thermal temperature to be
computed after removal of a flow velocity profile.
</P>
<P>Note that this fix and the <A HREF = "compute_temp_chunk.html">compute
temp/chunk</A> command can calculate different
things. The compute calculates the temperature for each chunk for a
single snapshot. This fix can do that but can time average those
values over many snapshots, or it can compute a temperature as if the
atoms in the chunk on different timesteps were collected together as
one set of atoms to calculate their temperature. The compute allows
the center-of-mass velocity of each chunk to be subtracted before
calculating the temperature; this fix does not.
</P>
<P>If a value begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>.
</P>
<P>If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with
<I>Nevery</I>, else an error results. Users can also write code for their
own fix styles and <A HREF = "Section_modify.html">add them to LAMMPS</A>.
</P>
<P>If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. Variables of style
<I>atom</I> can reference thermodynamic keywords and various per-atom
attributes, or invoke other computes, fixes, or variables when they
are evaluated, so this is a very general means of generating per-atom
quantities to average within chunks.
</P>
<HR>
<P>Additional optional keywords also affect the operation of this fix
and its outputs.
</P>
<P>The <I>norm</I> keyword affects how averaging is done for the per-chunk
values that are output every <I>Nfreq</I> timesteps.
</P>
<P>It the <I>norm</I> setting is <I>all</I>, which is the default, a chunk value is
summed over all atoms in all <I>Nrepeat</I> samples, as is the count of
atoms in the chunk. The averaged output value for the chunk on the
<I>Nfreq</I> timesteps is Total-sum / Total-count. In other words it is an
average over atoms across the entire <I>Nfreq</I> timescale.
</P>
<P>If the <I>norm</I> setting is <I>sample</I>, the chunk value is summed over atoms
for each sample, as is the count, and an "average sample value" is
computed for each sample, i.e. Sample-sum / Sample-count. The outuput
value for the chunk on the <I>Nfreq</I> timesteps is the average of the
<I>Nrepeat</I> "average sample values", i.e. the sum of <I>Nrepeat</I> "average
sample values" divided by <I>Nrepeat</I>. In other words it is an average
of an average.
</P>
<P>If the <I>norm</I> setting is <I>none</I>, a similar computation as for the
<I>sample</I> seting is done, except the individual "average sample values"
are "summed sample values". A summed sample value is simply the chunk
value summed over atoms in the sample, without dividing by the number
of atoms in the sample. The outuput value for the chunk on the
<I>Nfreq</I> timesteps is the average of the <I>Nrepeat</I> "summed sample
values", i.e. the sum of <I>Nrepeat</I> "summed sample values" divided by
<I>Nrepeat</I>.
</P>
<P>The <I>ave</I> keyword determines how the per-chunk values produced every
<I>Nfreq</I> steps are averaged with values produced on previous steps that
were multiples of <I>Nfreq</I>, before they are accessed by another output
command or written to a file.
</P>
<P>If the <I>ave</I> setting is <I>one</I>, which is the default, then the chunk
values produced on timesteps that are multiples of <I>Nfreq</I> are
independent of each other; they are output as-is without further
averaging.
</P>
<P>If the <I>ave</I> setting is <I>running</I>, then the chunk values produced on
timesteps that are multiples of <I>Nfreq</I> are summed and averaged in a
cumulative sense before being output. Each output chunk value is thus
the average of the chunk value produced on that timestep with all
preceding values for the same chunk. This running average begins when
the fix is defined; it can only be restarted by deleting the fix via
the <A HREF = "unfix.html">unfix</A> command, or re-defining the fix by
re-specifying it.
</P>
<P>If the <I>ave</I> setting is <I>window</I>, then the chunk values produced on
timesteps that are multiples of <I>Nfreq</I> are summed and averaged within
a moving "window" of time, so that the last M values for the same
chunk are used to produce the output. E.g. if M = 3 and Nfreq = 1000,
then the output on step 10000 will be the average of the individual
chunk values on steps 8000,9000,10000. Outputs on early steps will
average over less than M values if they are not available.
</P>
<P>The <I>bias</I> keyword specifies the ID of a temperature compute that
removes a "bias" velocity from each atom, specified as <I>bias-ID</I>. It
is only used when the <I>temp</I> value is calculated, to compute the
thermal temperature of each chunk after the translational kinetic
energy components have been altered in a prescribed way, e.g. to
remove a flow velocity profile. See the doc pages for individual
computes that calculate a temperature to see which ones implement a
bias.
</P>
<P>The <I>adof</I> and <I>cdof</I> keywords define the values used in the degree of
freedom (DOF) formula described above for for temperature calculation
for each chunk. They are only used when the <I>temp</I> value is
calculated. They can be used to calculate a more appropriate
temperature for some kinds of chunks. Here are 3 examples.
</P>
<P>If spatially binned chunks contain some number of water molecules and
<A HREF = "fix_shake.html">fix shake</A> is used to make each molecule rigid, then
you could calculate a temperature with 6 degrees of freedom (DOF) (3
translational, 3 rotational) per molecule by setting <I>adof</I> to 2.0.
If <A HREF = "compute_temp_partial.html">compute temp/partial</A> is used with the
<I>bias</I> keyword to only allow the x component of velocity to contribute
to the temperature, then <I>adof</I> = 1.0 would be appropriate. If each
chunk consists of a large molecule, with some number of its bonds
constrained by <A HREF = "fix_shake.html">fix shake</A> or the entire molecule by
<A HREF = "fix_rigid.html">fix rigid/small</A>, then <I>cdof</I> could be set to the
remaining degrees of freedom for the entire molecule (entire chunk in
this case).
</P>
<P>The <I>file</I> keyword allows a filename to be specified. Every <I>Nfreq</I>
timesteps, a section of chunk info will be written to a text file in
the following format. A line with the timestep and number of chunks
is written. Then one line per chunk is written, containing the chunk
ID (1-Nchunk), an optional original ID value, optional coordinate
values for chunks that represent spatial bins, the number of atoms in
the chunk, and one or more calculated values. More explanation of the
optional values is given below. The number of values in each line
corresponds to the number of values specified in the fix ave/chunk
command. The number of atoms and the value(s) are summed or average
quantities, as explained above.
</P>
<P>The <I>overwrite</I> keyword will continuously overwrite the output file
with the latest output, so that it only contains one timestep worth of
output. This option can only be used with the <I>ave running</I> setting.
</P>
<P>The <I>title1</I> and <I>title2</I> and <I>title3</I> keywords allow specification of
the strings that will be printed as the first 3 lines of the output
file, assuming the <I>file</I> keyword was used. LAMMPS uses default
values for each of these, so they do not need to be specified.
</P>
<P>By default, these header lines are as follows:
</P>
<PRE># Chunk-averaged data for fix ID and group name
# Timestep Number-of-chunks
# Chunk (OrigID) (Coord1) (Coord2) (Coord3) Ncount value1 value2 ...
</PRE>
<P>In the first line, ID and name are replaced with the fix-ID and group
name. The second line describes the two values that are printed at
the first of each section of output. In the third line the values are
replaced with the appropriate value names, e.g. fx or c_myCompute<B>2</B>.
</P>
<P>The words in parenthesis only appear with corresponding columns if the
chunk style specified for the <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command supports them. The OrigID
column is only used if the <I>compress</I> keyword was set to <I>yes</I> for the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command. This means that
the original chunk IDs (e.g. molecule IDs) will have been compressed
to remove chunk IDs with no atoms assigned to them. Thus a compresed
chunk ID of 3 may correspond to an original chunk ID or molecule ID of
415. The OrigID column will list 415 for the 3rd chunk.
</P>
<P>The CoordN columns only appear if a <I>binning</I> style was used in the
<A HREF = "compute_chunk_atom.html">compute chunk/atom</A> command. For <I>bin/1d</I>,
<I>bin/2d</I>, and <I>bin/3d</I> styles the column values are the center point
of the bin in the corresponding dimension. Just Coord1 is used for
<I>bin/1d</I>, Coord2 is added for <I>bin/2d</I>, Coord3 is added for <I>bin/3d</I>.
</P>
<P>Note that if the value of the <I>units</I> keyword used in the <A HREF = "compute_chunk_atom.html">compute
chunk/atom command</A> is <I>box</I> or <I>lattice</I>, the
coordinate values will be in distance <A HREF = "units.html">units</A>. If the
value of the <I>units</I> keyword is <I>reduced</I>, the coordinate values will
be in unitless reduced units (0-1).
</P>
<HR>
<P><B>Restart, fix_modify, output, run start/stop, minimize info:</B>
</P>
<P>No information about this fix is written to <A HREF = "restart.html">binary restart
files</A>. None of the <A HREF = "fix_modify.html">fix_modify</A> options
are relevant to this fix.
</P>
<P>This fix computes a global array of values which can be accessed by
various <A HREF = "Section_howto.html#howto_15">output commands</A>. The values can
only be accessed on timesteps that are multiples of <I>Nfreq</I> since that
is when averaging is performed. The global array has # of rows =
the number of chunks <I>Nchunk</I> as calculated by the specified <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> command. The # of columns =
M+1+Nvalues, where M = 1 to 4, depending on whether the optional
columns for OrigID and CoordN are used, as explained above.
Following the optional columns, the next column contains the count of
atoms in the chunk, and the remaining columns are the Nvalue
quantities. When the array is accessed with a row I that exceeds the
current number of chunks, than a 0.0 is returned by the fix instead of
an error, since the number of chunks can vary as a simulation runs
depending on how that value is computed by the compute chunk/atom
command.
</P>
<P>The array values calculated by this fix are treated as "intensive",
since they are typically already normalized by the count of atoms in
each chunk.
</P>
<P>No parameter of this fix can be used with the <I>start/stop</I> keywords of
the <A HREF = "run.html">run</A> command. This fix is not invoked during <A HREF = "minimize.html">energy
minimization</A>.
</P>
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "compute.html">compute</A>, <A HREF = "fix_ave_atom.html">fix ave/atom</A>, <A HREF = "fix_ave_histo.html">fix
ave/histo</A>, <A HREF = "fix_ave_time.html">fix ave/time</A>,
<A HREF = "variable.html">variable</A>, <A HREF = "fix_ave_correlate.html">fix ave/correlate</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are norm = all, ave = one, bias = none, no file output, and
title 1,2,3 = strings as described above.
</P>
</HTML>

439
doc/fix_ave_chunk.txt Normal file
View File

@ -0,0 +1,439 @@
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c
:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)
:line
fix ave/chunk command :h3
[Syntax:]
fix ID group-ID ave/chunk Nevery Nrepeat Nfreq chunkID value1 value2 ... keyword args ... :pre
ID, group-ID are documented in "fix"_fix.html command :ulb,l
ave/chunk = style name of this fix command :l
Nevery = use input values every this many timesteps :l
Nrepeat = # of times to use input values for calculating averages :l
Nfreq = calculate averages every this many timesteps :l
chunkID = ID of "compute chunk/atom"_compute_chunk_atom.html command :l
one or more input values can be listed :l
value = vx, vy, vz, fx, fy, fz, density/mass, density/number, temp, c_ID, c_ID\[I\], f_ID, f_ID\[I\], v_name :l
vx,vy,vz,fx,fy,fz = atom attribute (velocity, force component)
density/number, density/mass = number or mass density
temp = temperature
c_ID = per-atom vector calculated by a compute with ID
c_ID\[I\] = Ith column of per-atom array calculated by a compute with ID
f_ID = per-atom vector calculated by a fix with ID
f_ID\[I\] = Ith column of per-atom array calculated by a fix with ID
v_name = per-atom vector calculated by an atom-style variable with name :pre
zero or more keyword/arg pairs may be appended :l
keyword = {norm} or {ave} or {bias} or {adof} or {cdof} or {file} or {overwrite} or {title1} or {title2} or {title3} :l
{norm} arg = {all} or {sample} or {none} = how output on {Nfreq} steps is normalized
all = output is sum of atoms across all {Nrepeat} samples, divided by atom count
sample = output is sum of {Nrepeat} sample averages, divided by {Nrepeat}
none = output is sum of {Nrepeat} sums, divided by {Nrepeat}
{ave} args = {one} or {running} or {window M}
one = output new average value every Nfreq steps
running = output cumulative average of all previous Nfreq steps
window M = output average of M most recent Nfreq steps
{bias} arg = bias-ID
bias-ID = ID of a temperature compute that removes a velocity bias for temperature calculation
{adof} value = dof_per_atom
dof_per_atom = define this many degrees-of-freedom per atom for temperature calculation
{cdof} value = dof_per_chunk
dof_per_chunk = define this many degrees-of-freedom per chunk for temperature calculation
{file} arg = filename
filename = file to write results to
{overwrite} arg = none = overwrite output file with only latest output
{title1} arg = string
string = text to print as 1st line of output file
{title2} arg = string
string = text to print as 2nd line of output file
{title3} arg = string
string = text to print as 3rd line of output file :pre
:ule
[Examples:]
fix 1 all ave/chunk 10000 1 10000 binchunk c_myCentro ttle1 "My output values"
fix 1 flow ave/chunk 100 10 1000 molchunk vx vz norm sample file vel.profile
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running
fix 1 flow ave/chunk 100 5 1000 binchunk density/mass ave running :pre
[IMPORTANT NOTE:]
If you are trying to replace an older fix ave/spatial command with the
newer, more flexible fix ave/chunk and "compute
chunk/atom"_compute_chunk_atom.html commands, you simply need to split
the fix ave/spatial arguments across the two new commands. For
example, this command:
fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile :pre
could be replaced by:
compute cc1 flow chunk/atom bin/1d y 0.0 1.0
fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile :pre
[Description:]
Use one or more per-atom vectors as inputs every few timesteps, sum
their values for multiple chunks of atoms, and average the values for
each chunk over longer timescales. The resulting chunk averages can
be used by other "output commands"_Section_howto.html#howto_15 such as
"thermo_style custom"_thermo_style.html, and can also be written to a
file.
In LAMMPS, chunks are collections of atoms defined by a "compute
chunk/atom"_compute_chunk_atom.html command, which assigns each atom
to a single chunk (or no chunk). The ID for this command is specified
as chunkID. For example, a single chunk could be the atoms in a
molecule or atoms in a spatial bin. See the "compute
chunk/atom"_compute_chunk_atom.html doc page and ""Section_howto
23"_Section_howto.html#howto_23 for details of how chunks can be
defined and examples of how they can be used to measure properties of
a system.
Note that only atoms in the specified group contribute to the summing
and averaging calculations. The "compute
chunk/atom"_compute_chunk_atom.html command defines its own group as
well as an optional region. Atoms will have a chunk ID = 0, meaning
they belong to no chunk, if they are not in that group or region.
Thus you can specify the "all" group for this command if you simply
want to use the chunk definitions provided by chunkID.
Each specified per-atom value can be an atom attribute (position,
velocity, force component), a mass or number density, or the result of
a "compute"_compute.html or "fix"_fix.html or the evaluation of an
atom-style "variable"_variable.html. In the latter cases, the
compute, fix, or variable must produce a per-atom quantity, not a
global quantity. Note that the "compute
property/atom"_compute_property_atom.html command provides access to
any attribute defined and stored by atoms. If you wish to
time-average global quantities from a compute, fix, or variable, then
see the "fix ave/time"_fix_ave_time.html command.
"Computes"_compute.html that produce per-atom quantities are those
which have the word {atom} in their style name. See the doc pages for
individual "fixes"_fix.html to determine which ones produce per-atom
quantities. "Variables"_variable.html of style {atom} are the only
ones that can be used with this fix since all other styles of variable
produce global quantities.
The per-atom values of each input vector are summed and averaged
independently of the per-atom values in other input vectors.
IMPORTANT NOTE: This fix works by creating an array of size {Nchunk}
by Nvalues on each processor. {Nchunk} is the number of chunks which
is defined by the "compute chunk/atom"_doc/compute_chunk_atom.html
command. Nvalues is the number of input values specified. Each
processor loops over its atoms, tallying its values to the appropriate
chunk. Then the entire array is summed across all processors. This
means that using a large number of chunks will incur an overhead in
memory and computational cost (summing across processors), so be
careful to define a reasonable number of chunks.
:line
The {Nevery}, {Nrepeat}, and {Nfreq} arguments specify on what
timesteps the input values will be accessed and contribute to the
average. The final averaged quantities are generated on timesteps
that are a multiples of {Nfreq}. The average is over {Nrepeat}
quantities, computed in the preceding portion of the simulation every
{Nevery} timesteps. {Nfreq} must be a multiple of {Nevery} and
{Nevery} must be non-zero even if {Nrepeat} is 1. Also, the timesteps
contributing to the average value cannot overlap, i.e. Nfreq >
(Nrepeat-1)*Nevery is required.
For example, if Nevery=2, Nrepeat=6, and Nfreq=100, then values on
timesteps 90,92,94,96,98,100 will be used to compute the final average
on timestep 100. Similarly for timesteps 190,192,194,196,198,200 on
timestep 200, etc. If Nrepeat=1 and Nfreq = 100, then no time
averaging is done; values are simply generated on timesteps
100,200,etc.
Each input value can also be averaged over the atoms in each chunk.
The way the averaging is done across the {Nrepeat} timesteps to
produce output on the {Nfreq} timesteps, and across multiple {Nfreq}
outputs, is determined by the {norm} and {ave} keyword settings, as
discussed below.
IMPORTANT NOTE: To perform per-chunk averaging within a {Nfreq} time
window, the number of chunks {Nchunk} defined by the "compute
chunk/atom"_compute_chunk_atom.html command must remain constant. If
the {ave} keyword is set to {running} or {window} then {Nchunk} must
remain constant for the duration of the simulation. This fix forces
the chunk/atom compute specified by chunkID to hold {Nchunk} constant
for the appropriate time windows, by not allowing it to re-calcualte
{Nchunk}, which can also affect how it assigns chunk IDs to atoms.
More details are given on the "compute
chunk/atom"_compute_chunk_atom.html doc page.
:line
The atom attribute values (vx,vy,vz,fx,fy,fz) are self-explanatory.
As noted above, any other atom attributes can be used as input values
to this fix by using the "compute
property/atom"_compute_property_atom.html command and then specifying
an input value from that compute.
The {density/number} value means the number density is computed for
each chunk, i.e. a weighting of 1 for each atom. The {density/mass}
value means the mass density is computed for each , i.e. each atom is
weighted by its mass. The resulting density is normalized by the
volume of the chunk so that units of number/volume or density are
output. See the "units"_units.html command doc page for the
definition of density for each choice of units, e.g. gram/cm^3. If
the chunks defined by the "compute chunk/atom"_compute_chunk_atom.html
command are spatial bins, the volume is the bin volume. Otherwise it
is the volume of the entire simulation box.
The {temp} value means the temperature is computed for each chunk, by
the formula KE = DOF/2 k T, where KE = total kinetic energy of the
chunk of atoms (sum of 1/2 m v^2), DOF = the total number of degrees
of freedom for all atoms in the chunk, k = Boltzmann constant, and T =
temperature.
The DOF is calculated as N*adof + cdof, where N = number of atoms in
the chunk, adof = degrees of freedom per atom, and cdof = degrees of
freedom per chunk. By default adof = 2 or 3 = dimensionality of
system, as set via the "dimension"_dimension.html command, and cdof =
0.0. This gives the usual formula for temperature.
Note that currently this temperature only includes translational
degrees of freedom for each atom. No rotational degrees of freedom
are included for finite-size particles. Also no degrees of freedom
are subtracted for any velocity bias or constraints that are applied,
such as "compute temp/partial"_compute_temp_partial.html, or "fix
shake"_fix_shake.html or "fix rigid"_fix_rigid.html. This is because
those degrees of freedom (e.g. a constrained bond) could apply to sets
of atoms that are both included and excluded from a specific chunk,
and hence the concept is somewhat ill-defined. In some cases, you can
use the {adof} and {cdof} keywords to adjust the calculated degress of
freedom appropriately, as explained below.
Also note that a bias can be subtracted from atom velocities before
they are used in the above formula for KE, by using the {bias}
keyword. This allows, for example, a thermal temperature to be
computed after removal of a flow velocity profile.
Note that this fix and the "compute
temp/chunk"_compute_temp_chunk.html command can calculate different
things. The compute calculates the temperature for each chunk for a
single snapshot. This fix can do that but can time average those
values over many snapshots, or it can compute a temperature as if the
atoms in the chunk on different timesteps were collected together as
one set of atoms to calculate their temperature. The compute allows
the center-of-mass velocity of each chunk to be subtracted before
calculating the temperature; this fix does not.
If a value begins with "c_", a compute ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the compute is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the compute is used. Users can also write code for
their own compute styles and "add them to LAMMPS"_Section_modify.html.
If a value begins with "f_", a fix ID must follow which has been
previously defined in the input script. If no bracketed integer is
appended, the per-atom vector calculated by the fix is used. If a
bracketed integer is appended, the Ith column of the per-atom array
calculated by the fix is used. Note that some fixes only produce
their values on certain timesteps, which must be compatible with
{Nevery}, else an error results. Users can also write code for their
own fix styles and "add them to LAMMPS"_Section_modify.html.
If a value begins with "v_", a variable name must follow which has
been previously defined in the input script. Variables of style
{atom} can reference thermodynamic keywords and various per-atom
attributes, or invoke other computes, fixes, or variables when they
are evaluated, so this is a very general means of generating per-atom
quantities to average within chunks.
:line
Additional optional keywords also affect the operation of this fix
and its outputs.
The {norm} keyword affects how averaging is done for the per-chunk
values that are output every {Nfreq} timesteps.
It the {norm} setting is {all}, which is the default, a chunk value is
summed over all atoms in all {Nrepeat} samples, as is the count of
atoms in the chunk. The averaged output value for the chunk on the
{Nfreq} timesteps is Total-sum / Total-count. In other words it is an
average over atoms across the entire {Nfreq} timescale.
If the {norm} setting is {sample}, the chunk value is summed over atoms
for each sample, as is the count, and an "average sample value" is
computed for each sample, i.e. Sample-sum / Sample-count. The outuput
value for the chunk on the {Nfreq} timesteps is the average of the
{Nrepeat} "average sample values", i.e. the sum of {Nrepeat} "average
sample values" divided by {Nrepeat}. In other words it is an average
of an average.
If the {norm} setting is {none}, a similar computation as for the
{sample} seting is done, except the individual "average sample values"
are "summed sample values". A summed sample value is simply the chunk
value summed over atoms in the sample, without dividing by the number
of atoms in the sample. The outuput value for the chunk on the
{Nfreq} timesteps is the average of the {Nrepeat} "summed sample
values", i.e. the sum of {Nrepeat} "summed sample values" divided by
{Nrepeat}.
The {ave} keyword determines how the per-chunk values produced every
{Nfreq} steps are averaged with values produced on previous steps that
were multiples of {Nfreq}, before they are accessed by another output
command or written to a file.
If the {ave} setting is {one}, which is the default, then the chunk
values produced on timesteps that are multiples of {Nfreq} are
independent of each other; they are output as-is without further
averaging.
If the {ave} setting is {running}, then the chunk values produced on
timesteps that are multiples of {Nfreq} are summed and averaged in a
cumulative sense before being output. Each output chunk value is thus
the average of the chunk value produced on that timestep with all
preceding values for the same chunk. This running average begins when
the fix is defined; it can only be restarted by deleting the fix via
the "unfix"_unfix.html command, or re-defining the fix by
re-specifying it.
If the {ave} setting is {window}, then the chunk values produced on
timesteps that are multiples of {Nfreq} are summed and averaged within
a moving "window" of time, so that the last M values for the same
chunk are used to produce the output. E.g. if M = 3 and Nfreq = 1000,
then the output on step 10000 will be the average of the individual
chunk values on steps 8000,9000,10000. Outputs on early steps will
average over less than M values if they are not available.
The {bias} keyword specifies the ID of a temperature compute that
removes a "bias" velocity from each atom, specified as {bias-ID}. It
is only used when the {temp} value is calculated, to compute the
thermal temperature of each chunk after the translational kinetic
energy components have been altered in a prescribed way, e.g. to
remove a flow velocity profile. See the doc pages for individual
computes that calculate a temperature to see which ones implement a
bias.
The {adof} and {cdof} keywords define the values used in the degree of
freedom (DOF) formula described above for for temperature calculation
for each chunk. They are only used when the {temp} value is
calculated. They can be used to calculate a more appropriate
temperature for some kinds of chunks. Here are 3 examples.
If spatially binned chunks contain some number of water molecules and
"fix shake"_fix_shake.html is used to make each molecule rigid, then
you could calculate a temperature with 6 degrees of freedom (DOF) (3
translational, 3 rotational) per molecule by setting {adof} to 2.0.
If "compute temp/partial"_compute_temp_partial.html is used with the
{bias} keyword to only allow the x component of velocity to contribute
to the temperature, then {adof} = 1.0 would be appropriate. If each
chunk consists of a large molecule, with some number of its bonds
constrained by "fix shake"_fix_shake.html or the entire molecule by
"fix rigid/small"_fix_rigid.html, then {cdof} could be set to the
remaining degrees of freedom for the entire molecule (entire chunk in
this case).
The {file} keyword allows a filename to be specified. Every {Nfreq}
timesteps, a section of chunk info will be written to a text file in
the following format. A line with the timestep and number of chunks
is written. Then one line per chunk is written, containing the chunk
ID (1-Nchunk), an optional original ID value, optional coordinate
values for chunks that represent spatial bins, the number of atoms in
the chunk, and one or more calculated values. More explanation of the
optional values is given below. The number of values in each line
corresponds to the number of values specified in the fix ave/chunk
command. The number of atoms and the value(s) are summed or average
quantities, as explained above.
The {overwrite} keyword will continuously overwrite the output file
with the latest output, so that it only contains one timestep worth of
output. This option can only be used with the {ave running} setting.
The {title1} and {title2} and {title3} keywords allow specification of
the strings that will be printed as the first 3 lines of the output
file, assuming the {file} keyword was used. LAMMPS uses default
values for each of these, so they do not need to be specified.
By default, these header lines are as follows:
# Chunk-averaged data for fix ID and group name
# Timestep Number-of-chunks
# Chunk (OrigID) (Coord1) (Coord2) (Coord3) Ncount value1 value2 ... :pre
In the first line, ID and name are replaced with the fix-ID and group
name. The second line describes the two values that are printed at
the first of each section of output. In the third line the values are
replaced with the appropriate value names, e.g. fx or c_myCompute[2].
The words in parenthesis only appear with corresponding columns if the
chunk style specified for the "compute
chunk/atom"_compute_chunk_atom.html command supports them. The OrigID
column is only used if the {compress} keyword was set to {yes} for the
"compute chunk/atom"_compute_chunk_atom.html command. This means that
the original chunk IDs (e.g. molecule IDs) will have been compressed
to remove chunk IDs with no atoms assigned to them. Thus a compresed
chunk ID of 3 may correspond to an original chunk ID or molecule ID of
415. The OrigID column will list 415 for the 3rd chunk.
The CoordN columns only appear if a {binning} style was used in the
"compute chunk/atom"_compute_chunk_atom.html command. For {bin/1d},
{bin/2d}, and {bin/3d} styles the column values are the center point
of the bin in the corresponding dimension. Just Coord1 is used for
{bin/1d}, Coord2 is added for {bin/2d}, Coord3 is added for {bin/3d}.
Note that if the value of the {units} keyword used in the "compute
chunk/atom command"_compute_chunk_atom.html is {box} or {lattice}, the
coordinate values will be in distance "units"_units.html. If the
value of the {units} keyword is {reduced}, the coordinate values will
be in unitless reduced units (0-1).
:line
[Restart, fix_modify, output, run start/stop, minimize info:]
No information about this fix is written to "binary restart
files"_restart.html. None of the "fix_modify"_fix_modify.html options
are relevant to this fix.
This fix computes a global array of values which can be accessed by
various "output commands"_Section_howto.html#howto_15. The values can
only be accessed on timesteps that are multiples of {Nfreq} since that
is when averaging is performed. The global array has # of rows =
the number of chunks {Nchunk} as calculated by the specified "compute
chunk/atom"_compute_chunk_atom.html command. The # of columns =
M+1+Nvalues, where M = 1 to 4, depending on whether the optional
columns for OrigID and CoordN are used, as explained above.
Following the optional columns, the next column contains the count of
atoms in the chunk, and the remaining columns are the Nvalue
quantities. When the array is accessed with a row I that exceeds the
current number of chunks, than a 0.0 is returned by the fix instead of
an error, since the number of chunks can vary as a simulation runs
depending on how that value is computed by the compute chunk/atom
command.
The array values calculated by this fix are treated as "intensive",
since they are typically already normalized by the count of atoms in
each chunk.
No parameter of this fix can be used with the {start/stop} keywords of
the "run"_run.html command. This fix is not invoked during "energy
minimization"_minimize.html.
[Restrictions:] none
[Related commands:]
"compute"_compute.html, "fix ave/atom"_fix_ave_atom.html, "fix
ave/histo"_fix_ave_histo.html, "fix ave/time"_fix_ave_time.html,
"variable"_variable.html, "fix ave/correlate"_fix_ave_correlate.html
[Default:]
The option defaults are norm = all, ave = one, bias = none, no file output, and
title 1,2,3 = strings as described above.

View File

@ -83,6 +83,24 @@ fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile
fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running
fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running
</PRE>
<P><B>IMPORTANT NOTE:</B>
</P>
<P> The fix ave/spatial command has been replaced by the more flexible
<A HREF = "fix_ave_chunk.html">fix ave/chunk</A> and <A HREF = "compute_chunk_atom.html">compute
chunk/atom</A> commands. The fix ave/spatial
command will be removed from LAMMPS sometime in the summer of 2015.
</P>
<P>Any fix ave/spatial command can be replaced by the two new commands.
You simply need to split the fix ave/spatial arguments across the two
new commands. For example, this command:
</P>
<PRE>fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile
</PRE>
<P>could be replaced by:
</P>
<PRE>compute cc1 flow chunk/atom bin/1d y 0.0 1.0
fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile
</PRE>
<P><B>Description:</B>
</P>
<P>Use one or more per-atom vectors as inputs every few timesteps, bin

View File

@ -68,6 +68,24 @@ fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile
fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass ave running
fix 1 flow ave/spatial 100 5 1000 z lower 1.0 y 0.0 2.5 density/mass bound y 5.0 20.0 discard yes ave running :pre
[IMPORTANT NOTE:]
The fix ave/spatial command has been replaced by the more flexible
"fix ave/chunk"_fix_ave_chunk.html and "compute
chunk/atom"_compute_chunk_atom.html commands. The fix ave/spatial
command will be removed from LAMMPS sometime in the summer of 2015.
Any fix ave/spatial command can be replaced by the two new commands.
You simply need to split the fix ave/spatial arguments across the two
new commands. For example, this command:
fix 1 flow ave/spatial 100 10 1000 y 0.0 1.0 vx vz norm sample file vel.profile :pre
could be replaced by:
compute cc1 flow chunk/atom bin/1d y 0.0 1.0
fix 1 flow ave/chunk 100 10 1000 cc1 vx vz norm sample file vel.profile :pre
[Description:]
Use one or more per-atom vectors as inputs every few timesteps, bin