Merge branch 'master' into lammps-icms

Resolved Conflicts:
	doc/Section_commands.html
	src/displace_box.h
This commit is contained in:
Axel Kohlmeyer
2012-02-07 09:06:00 -05:00
29 changed files with 1159 additions and 1098 deletions

View File

@ -290,7 +290,7 @@ in the command's documentation.
</P>
<P><A HREF = "delete_atoms.html">delete_atoms</A>, <A HREF = "delete_bonds.html">delete_bonds</A>,
<A HREF = "displace_atoms.html">displace_atoms</A>,
<A HREF = "displace_box.html">displace_box</A>, <A HREF = "minimize.html">minimize</A>,
<A HREF = "change_box.html">change_box</A>, <A HREF = "minimize.html">minimize</A>,
<A HREF = "neb.html">neb</A> <A HREF = "prd.html">prd</A>, <A HREF = "run.html">run</A>, <A HREF = "temper.html">temper</A>
</P>
<P>Miscellaneous:
@ -317,17 +317,17 @@ in the command's documentation.
<TR ALIGN="center"><TD ><A HREF = "angle_coeff.html">angle_coeff</A></TD><TD ><A HREF = "angle_style.html">angle_style</A></TD><TD ><A HREF = "atom_modify.html">atom_modify</A></TD><TD ><A HREF = "atom_style.html">atom_style</A></TD><TD ><A HREF = "bond_coeff.html">bond_coeff</A></TD><TD ><A HREF = "bond_style.html">bond_style</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "boundary.html">boundary</A></TD><TD ><A HREF = "change_box.html">change_box</A></TD><TD ><A HREF = "clear.html">clear</A></TD><TD ><A HREF = "communicate.html">communicate</A></TD><TD ><A HREF = "compute.html">compute</A></TD><TD ><A HREF = "compute_modify.html">compute_modify</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "create_atoms.html">create_atoms</A></TD><TD ><A HREF = "create_box.html">create_box</A></TD><TD ><A HREF = "delete_atoms.html">delete_atoms</A></TD><TD ><A HREF = "delete_bonds.html">delete_bonds</A></TD><TD ><A HREF = "dielectric.html">dielectric</A></TD><TD ><A HREF = "dihedral_coeff.html">dihedral_coeff</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "dihedral_style.html">dihedral_style</A></TD><TD ><A HREF = "dimension.html">dimension</A></TD><TD ><A HREF = "displace_atoms.html">displace_atoms</A></TD><TD ><A HREF = "displace_box.html">displace_box</A></TD><TD ><A HREF = "dump.html">dump</A></TD><TD ><A HREF = "dump_image.html">dump image</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "dump_modify.html">dump_modify</A></TD><TD ><A HREF = "echo.html">echo</A></TD><TD ><A HREF = "fix.html">fix</A></TD><TD ><A HREF = "fix_modify.html">fix_modify</A></TD><TD ><A HREF = "group.html">group</A></TD><TD ><A HREF = "if.html">if</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "improper_coeff.html">improper_coeff</A></TD><TD ><A HREF = "improper_style.html">improper_style</A></TD><TD ><A HREF = "include.html">include</A></TD><TD ><A HREF = "jump.html">jump</A></TD><TD ><A HREF = "kspace_modify.html">kspace_modify</A></TD><TD ><A HREF = "kspace_style.html">kspace_style</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "label.html">label</A></TD><TD ><A HREF = "lattice.html">lattice</A></TD><TD ><A HREF = "loadbalance.html">loadbalance</A></TD><TD ><A HREF = "log.html">log</A></TD><TD ><A HREF = "mass.html">mass</A></TD><TD ><A HREF = "minimize.html">minimize</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "min_modify.html">min_modify</A></TD><TD ><A HREF = "min_style.html">min_style</A></TD><TD ><A HREF = "neb.html">neb</A></TD><TD ><A HREF = "neigh_modify.html">neigh_modify</A></TD><TD ><A HREF = "neighbor.html">neighbor</A></TD><TD ><A HREF = "newton.html">newton</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "next.html">next</A></TD><TD ><A HREF = "package.html">package</A></TD><TD ><A HREF = "pair_coeff.html">pair_coeff</A></TD><TD ><A HREF = "pair_modify.html">pair_modify</A></TD><TD ><A HREF = "pair_style.html">pair_style</A></TD><TD ><A HREF = "pair_write.html">pair_write</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "partition.html">partition</A></TD><TD ><A HREF = "prd.html">prd</A></TD><TD ><A HREF = "print.html">print</A></TD><TD ><A HREF = "processors.html">processors</A></TD><TD ><A HREF = "quit.html">quit</A></TD><TD ><A HREF = "read_data.html">read_data</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "read_restart.html">read_restart</A></TD><TD ><A HREF = "region.html">region</A></TD><TD ><A HREF = "replicate.html">replicate</A></TD><TD ><A HREF = "reset_timestep.html">reset_timestep</A></TD><TD ><A HREF = "restart.html">restart</A></TD><TD ><A HREF = "run.html">run</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "run_style.html">run_style</A></TD><TD ><A HREF = "set.html">set</A></TD><TD ><A HREF = "shell.html">shell</A></TD><TD ><A HREF = "special_bonds.html">special_bonds</A></TD><TD ><A HREF = "suffix.html">suffix</A></TD><TD ><A HREF = "tad.html">tad</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "temper.html">temper</A></TD><TD ><A HREF = "thermo.html">thermo</A></TD><TD ><A HREF = "thermo_modify.html">thermo_modify</A></TD><TD ><A HREF = "thermo_style.html">thermo_style</A></TD><TD ><A HREF = "timestep.html">timestep</A></TD><TD ><A HREF = "uncompute.html">uncompute</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "undump.html">undump</A></TD><TD ><A HREF = "unfix.html">unfix</A></TD><TD ><A HREF = "units.html">units</A></TD><TD ><A HREF = "variable.html">variable</A></TD><TD ><A HREF = "velocity.html">velocity</A></TD><TD ><A HREF = "write_restart.html">write_restart</A>
<TR ALIGN="center"><TD ><A HREF = "dihedral_style.html">dihedral_style</A></TD><TD ><A HREF = "dimension.html">dimension</A></TD><TD ><A HREF = "displace_atoms.html">displace_atoms</A></TD><TD ><A HREF = "dump.html">dump</A></TD><TD ><A HREF = "dump_image.html">dump image</A></TD><TD ><A HREF = "dump_modify.html">dump_modify</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "echo.html">echo</A></TD><TD ><A HREF = "fix.html">fix</A></TD><TD ><A HREF = "fix_modify.html">fix_modify</A></TD><TD ><A HREF = "group.html">group</A></TD><TD ><A HREF = "if.html">if</A></TD><TD ><A HREF = "improper_coeff.html">improper_coeff</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "improper_style.html">improper_style</A></TD><TD ><A HREF = "include.html">include</A></TD><TD ><A HREF = "jump.html">jump</A></TD><TD ><A HREF = "kspace_modify.html">kspace_modify</A></TD><TD ><A HREF = "kspace_style.html">kspace_style</A></TD><TD ><A HREF = "label.html">label</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "lattice.html">lattice</A></TD><TD ><A HREF = "loadbalance.html">loadbalance</A></TD><TD ><A HREF = "log.html">log</A></TD><TD ><A HREF = "mass.html">mass</A></TD><TD ><A HREF = "minimize.html">minimize</A></TD><TD ><A HREF = "min_modify.html">min_modify</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "min_style.html">min_style</A></TD><TD ><A HREF = "neb.html">neb</A></TD><TD ><A HREF = "neigh_modify.html">neigh_modify</A></TD><TD ><A HREF = "neighbor.html">neighbor</A></TD><TD ><A HREF = "newton.html">newton</A></TD><TD ><A HREF = "next.html">next</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "package.html">package</A></TD><TD ><A HREF = "pair_coeff.html">pair_coeff</A></TD><TD ><A HREF = "pair_modify.html">pair_modify</A></TD><TD ><A HREF = "pair_style.html">pair_style</A></TD><TD ><A HREF = "pair_write.html">pair_write</A></TD><TD ><A HREF = "partition.html">partition</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "prd.html">prd</A></TD><TD ><A HREF = "print.html">print</A></TD><TD ><A HREF = "processors.html">processors</A></TD><TD ><A HREF = "quit.html">quit</A></TD><TD ><A HREF = "read_data.html">read_data</A></TD><TD ><A HREF = "read_restart.html">read_restart</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "region.html">region</A></TD><TD ><A HREF = "replicate.html">replicate</A></TD><TD ><A HREF = "reset_timestep.html">reset_timestep</A></TD><TD ><A HREF = "restart.html">restart</A></TD><TD ><A HREF = "run.html">run</A></TD><TD ><A HREF = "run_style.html">run_style</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "set.html">set</A></TD><TD ><A HREF = "shell.html">shell</A></TD><TD ><A HREF = "special_bonds.html">special_bonds</A></TD><TD ><A HREF = "suffix.html">suffix</A></TD><TD ><A HREF = "tad.html">tad</A></TD><TD ><A HREF = "temper.html">temper</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "thermo.html">thermo</A></TD><TD ><A HREF = "thermo_modify.html">thermo_modify</A></TD><TD ><A HREF = "thermo_style.html">thermo_style</A></TD><TD ><A HREF = "timestep.html">timestep</A></TD><TD ><A HREF = "uncompute.html">uncompute</A></TD><TD ><A HREF = "undump.html">undump</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "unfix.html">unfix</A></TD><TD ><A HREF = "units.html">units</A></TD><TD ><A HREF = "variable.html">variable</A></TD><TD ><A HREF = "velocity.html">velocity</A></TD><TD ><A HREF = "write_restart.html">write_restart</A>
</TD></TR></TABLE></DIV>
<HR>
@ -453,40 +453,40 @@ built with the <A HREF = "Section_accelerate.html">appropriate accelerated
package</A>.
</P>
<DIV ALIGN=center><TABLE BORDER=1 >
<TR ALIGN="center"><TD ><A HREF = "pair_adp.html">adp/omp</A></TD><TD ><A HREF = "pair_airebo.html">airebo/omp</A></TD><TD ><A HREF = "pair_born.html">born/coul/long/cuda</A></TD><TD ><A HREF = "pair_born.html">born/coul/long/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_born.html">born/coul/wolf/omp</A></TD><TD ><A HREF = "pair_born.html">born/omp</A></TD><TD ><A HREF = "pair_brownian.html">brownian/omp</A></TD><TD ><A HREF = "pair_brownian.html">brownian/poly/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/cut/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/omp</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/long/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/omp</A></TD><TD ><A HREF = "pair_buck_coul.html">buck/coul/omp</A></TD><TD ><A HREF = "pair_buck.html">buck/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/omp</A></TD><TD ><A HREF = "pair_colloid.html">colloid/omp</A></TD><TD ><A HREF = "pair_comb.html">comb/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/cut/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/debye/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/long/gpu</A></TD><TD ><A HREF = "pair_coul.html">coul/long/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/wolf</A></TD><TD ><A HREF = "pair_dipole.html">dipole/cut/omp</A></TD><TD ><A HREF = "pair_dipole.html">dipole/sf/omp</A></TD><TD ><A HREF = "pair_dpd.html">dpd/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_dpd.html">dpd/tstat/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/alloy/opt</A></TD><TD ><A HREF = "pair_eam.html">eam/cd/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/fs/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/opt</A></TD><TD ><A HREF = "pair_eam.html">eam/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/opt</A></TD><TD ><A HREF = "pair_edip.html">edip/omp</A></TD><TD ><A HREF = "pair_eim.html">eim/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gauss.html">gauss/omp</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/gpu</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hertz/history/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gran.html">gran/hooke/cuda</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/history/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/omp</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse/omp</A></TD><TD ><A HREF = "pair_line_lj.html">line/lj/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/cuda</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/cuda</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/cuda</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/opt</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/pppm/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/gpu</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/pppm/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/gpu</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_coul.html">lj/coul/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/opt</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/opt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/tip4p/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/experimental/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/opt</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_expand.html">lj/expand/gpu</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/omp</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/cuda</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs/cuda</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/omp</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/gpu</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/gpu</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/omp</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf/omp</A></TD><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/omp</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear/omp</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/cuda</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj96.html">lj96/cut/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/poly/omp</A></TD><TD ><A HREF = "pair_morse.html">morse/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_morse.html">morse/gpu</A></TD><TD ><A HREF = "pair_morse.html">morse/omp</A></TD><TD ><A HREF = "pair_morse.html">morse/opt</A></TD><TD ><A HREF = "pair_peri.html">peri/lps/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_peri.html">peri/pmb/omp</A></TD><TD ><A HREF = "pair_airebo.html">rebo/omp</A></TD><TD ><A HREF = "pair_resquared.html">resquared/gpu</A></TD><TD ><A HREF = "pair_resquared.html">resquared/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_soft.html">soft/omp</A></TD><TD ><A HREF = "pair_sw.html">sw/cuda</A></TD><TD ><A HREF = "pair_sw.html">sw/omp</A></TD><TD ><A HREF = "pair_table.html">table/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_table.html">table/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/cuda</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/table/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl/omp</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj/omp</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa/gpu</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid/omp</A>
<TR ALIGN="center"><TD ><A HREF = "pair_adp.html">adp/omp</A></TD><TD ><A HREF = "pair_airebo.html">airebo/omp</A></TD><TD ><A HREF = "pair_beck.html">beck/omp</A></TD><TD ><A HREF = "pair_born.html">born/coul/long/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_born.html">born/coul/long/omp</A></TD><TD ><A HREF = "pair_born.html">born/coul/wolf/omp</A></TD><TD ><A HREF = "pair_born.html">born/omp</A></TD><TD ><A HREF = "pair_brownian.html">brownian/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_brownian.html">brownian/poly/omp</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/cut/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/coul/long/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/coul/long/omp</A></TD><TD ><A HREF = "pair_buck_coul.html">buck/coul/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_buck.html">buck/cuda</A></TD><TD ><A HREF = "pair_buck.html">buck/gpu</A></TD><TD ><A HREF = "pair_buck.html">buck/omp</A></TD><TD ><A HREF = "pair_colloid.html">colloid/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_comb.html">comb/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/cut/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/debye/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/long/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_coul.html">coul/long/omp</A></TD><TD ><A HREF = "pair_coul.html">coul/wolf</A></TD><TD ><A HREF = "pair_dipole.html">dipole/cut/omp</A></TD><TD ><A HREF = "pair_dipole.html">dipole/sf/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_dpd.html">dpd/omp</A></TD><TD ><A HREF = "pair_dpd.html">dpd/tstat/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/alloy/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/alloy/opt</A></TD><TD ><A HREF = "pair_eam.html">eam/cd/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/fs/cuda</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/fs/opt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eam.html">eam/gpu</A></TD><TD ><A HREF = "pair_eam.html">eam/omp</A></TD><TD ><A HREF = "pair_eam.html">eam/opt</A></TD><TD ><A HREF = "pair_edip.html">edip/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_eim.html">eim/omp</A></TD><TD ><A HREF = "pair_gauss.html">gauss/omp</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/gpu</A></TD><TD ><A HREF = "pair_gayberne.html">gayberne/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gran.html">gran/hertz/history/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/cuda</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/history/omp</A></TD><TD ><A HREF = "pair_gran.html">gran/hooke/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/lj/omp</A></TD><TD ><A HREF = "pair_hbond_dreiding.html">hbond/dreiding/morse/omp</A></TD><TD ><A HREF = "pair_line_lj.html">line/lj/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/cuda</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/charmm/implicit/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/gpu</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/omp</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/long/opt</A></TD><TD ><A HREF = "pair_charmm.html">lj/charmm/coul/pppm/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/cut/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/coul/pppm/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/coul/long/omp</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/cuda</A></TD><TD ><A HREF = "pair_class2.html">lj/class2/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_class2.html">lj/class2/omp</A></TD><TD ><A HREF = "pair_lj_coul.html">lj/coul/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/cut/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/debye/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/opt</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/coul/long/tip4p/opt</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/coul/pppm/tip4p/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj.html">lj/cut/experimental/cuda</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/gpu</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/omp</A></TD><TD ><A HREF = "pair_lj.html">lj/cut/opt</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_expand.html">lj/expand/cuda</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/gpu</A></TD><TD ><A HREF = "pair_lj_expand.html">lj/expand/omp</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_gromacs.html">lj/gromacs/coul/gromacs/omp</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/cuda</A></TD><TD ><A HREF = "pair_gromacs.html">lj/gromacs/omp</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/gpu</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sdk.html">lj/sdk/omp</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/gpu</A></TD><TD ><A HREF = "pair_sdk.html">lj/sdk/coul/long/omp</A></TD><TD ><A HREF = "pair_lj_sf.html">lj/sf/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/cuda</A></TD><TD ><A HREF = "pair_lj_smooth.html">lj/smooth/omp</A></TD><TD ><A HREF = "pair_lj_smooth_linear.html">lj/smooth/linear/omp</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_lj96.html">lj96/cut/gpu</A></TD><TD ><A HREF = "pair_lj96.html">lj96/cut/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/omp</A></TD><TD ><A HREF = "pair_lubricate.html">lubricate/poly/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_meam_spline.html">meam/spline/omp</A></TD><TD ><A HREF = "pair_morse.html">morse/cuda</A></TD><TD ><A HREF = "pair_morse.html">morse/gpu</A></TD><TD ><A HREF = "pair_morse.html">morse/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_morse.html">morse/opt</A></TD><TD ><A HREF = "pair_peri.html">peri/lps/omp</A></TD><TD ><A HREF = "pair_peri.html">peri/pmb/omp</A></TD><TD ><A HREF = "pair_airebo.html">rebo/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_resquared.html">resquared/gpu</A></TD><TD ><A HREF = "pair_resquared.html">resquared/omp</A></TD><TD ><A HREF = "pair_soft.html">soft/omp</A></TD><TD ><A HREF = "pair_sw.html">sw/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_sw.html">sw/omp</A></TD><TD ><A HREF = "pair_table.html">table/gpu</A></TD><TD ><A HREF = "pair_table.html">table/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/cuda</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_tersoff.html">tersoff/omp</A></TD><TD ><A HREF = "pair_tersoff.html">tersoff/table/omp</A></TD><TD ><A HREF = "pair_tersoff_zbl.html">tersoff/zbl/omp</A></TD><TD ><A HREF = "pair_tri_lj.html">tri/lj/omp</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "pair_yukawa.html">yukawa/gpu</A></TD><TD ><A HREF = "pair_yukawa.html">yukawa/omp</A></TD><TD ><A HREF = "pair_yukawa_colloid.html">yukawa/colloid/omp</A>
</TD></TR></TABLE></DIV>
<HR>

View File

@ -286,7 +286,7 @@ Actions:
"delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html,
"displace_atoms"_displace_atoms.html,
"displace_box"_displace_box.html, "minimize"_minimize.html,
"change_box"_change_box.html, "minimize"_minimize.html,
"neb"_neb.html "prd"_prd.html, "run"_run.html, "temper"_temper.html
Miscellaneous:
@ -330,7 +330,6 @@ in the command's documentation.
"dihedral_style"_dihedral_style.html,
"dimension"_dimension.html,
"displace_atoms"_displace_atoms.html,
"displace_box"_displace_box.html,
"dump"_dump.html,
"dump image"_dump_image.html,
"dump_modify"_dump_modify.html,

View File

@ -1660,8 +1660,8 @@ derivative w.r.t. e_i, it follows that C_ij is also symmetric, with at
most 7*6/2 = 21 distinct elements.
</P>
<P>At zero temperature, it is easy to estimate these derivatives by
deforming the cell in one of the six directions using the command
<A HREF = "displace_box.html">displace_box</A> and measuring the change in the
deforming the simulation box in one of the six directions using the
<A HREF = "change_box.html">change_box</A> command and measuring the change in the
stress tensor. A general-purpose script that does this is given in the
examples/elastic directory described in <A HREF = "Section_example.html">this
section</A>.

View File

@ -1647,8 +1647,8 @@ derivative w.r.t. e_i, it follows that C_ij is also symmetric, with at
most 7*6/2 = 21 distinct elements.
At zero temperature, it is easy to estimate these derivatives by
deforming the cell in one of the six directions using the command
"displace_box"_displace_box.html and measuring the change in the
deforming the simulation box in one of the six directions using the
"change_box"_change_box.html command and measuring the change in the
stress tensor. A general-purpose script that does this is given in the
examples/elastic directory described in "this
section"_Section_example.html.

View File

@ -77,7 +77,10 @@ triclinic representations.
<P><B>Restrictions:</B>
</P>
<P>This command cannot be used after the simulation box is defined by a
<A HREF = "read_data.html">read_data</A> or <A HREF = "create_box.html">create_box</A> command.
<A HREF = "read_data.html">read_data</A> or <A HREF = "create_box.html">create_box</A> command or
<A HREF = "read_restart.html">read_restart</A> command. See the
<A HREF = "change_box.html">change_box</A> command for how to change the simulation
box boundaries after it has been defined.
</P>
<P>For 2d simulations, the z dimension must be periodic.
</P>

View File

@ -72,7 +72,10 @@ triclinic representations.
[Restrictions:]
This command cannot be used after the simulation box is defined by a
"read_data"_read_data.html or "create_box"_create_box.html command.
"read_data"_read_data.html or "create_box"_create_box.html command or
"read_restart"_read_restart.html command. See the
"change_box"_change_box.html command for how to change the simulation
box boundaries after it has been defined.
For 2d simulations, the z dimension must be periodic.

View File

@ -13,51 +13,298 @@
</H3>
<P><B>Syntax:</B>
</P>
<PRE>change_box style
<PRE>change_box group-ID parameter args ... keyword args ...
</PRE>
<LI>style = <I>ortho</I> or <I>triclinic</I>
<UL><LI>group-ID = ID of group of atoms to (optionally) displace
<PRE> <I>ortho</I> = convert simulation box from non-orthogonal (triclinic) to orthogonal
<I>triclinic</I> = convert simulation box from orthogonal to non-orthogonal (triclinic)
<LI>one or more parameter/arg pairs may be appended
<PRE>parameter = <I>x</I> or <I>y</I> or <I>z</I> or <I>xy</I> or <I>xz</I> or <I>yz</I> or <I>boundary</I> or <I>ortho</I> or <I>triclinic</I> or <I>set</I> or <I>remap</I>
<I>x</I>, <I>y</I>, <I>z</I> args = style value(s)
style = <I>final</I> or <I>delta</I> or <I>scale</I> or <I>volume</I>
<I>final</I> values = lo hi
lo hi = box boundaries after displacement (distance units)
<I>delta</I> values = dlo dhi
dlo dhi = change in box boundaries after displacement (distance units)
<I>scale</I> values = factor
factor = multiplicative factor for change in box length after displacement
<I>volume</I> value = none = adjust this dim to preserve volume of system
<I>xy</I>, <I>xz</I>, <I>yz</I> args = style value
style = <I>final</I> or <I>delta</I>
<I>final</I> value = tilt
tilt = tilt factor after displacement (distance units)
<I>delta</I> value = dtilt
dtilt = change in tilt factor after displacement (distance units)
<I>boundary</I> args = x y z
x,y,z = <I>p</I> or <I>s</I> or <I>f</I> or <I>m</I>, one or two letters
<I>p</I> is periodic
<I>f</I> is non-periodic and fixed
<I>s</I> is non-periodic and shrink-wrapped
<I>m</I> is non-periodic and shrink-wrapped with a minimum value
<I>ortho</I> args = none = change box to orthogonal
(triclinic</I> args = none = change box to triclinic
<I>set</I> args = none = store state of current box
<I>remap</I> args = none = remap atom coords from last saved state to current box
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>units</I>
<PRE> <I>units</I> value = <I>lattice</I> or <I>box</I>
lattice = distances are defined in lattice units
box = distances are defined in simulation box units
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>change_box ortho
change_box triclinic
<PRE>change_box all xy final -2.0 z final 0.0 5.0 boundary p p f remap units box
change_box all x scale 1.1 y volume z volume remap
</PRE>
<P><B>Description:</B>
</P>
<P>By default LAMMPS runs a simulation in an orthogonal, axis-aligned
simulation box. LAMMPS can also run simulations in <A HREF = "Section_howto.html#howto_12">non-orthogonal
(triclinic) simulation boxes</A>. A box is
defined as either orthogonal or non-orthogonal when it is created via
the <A HREF = "create_box.html">create_box</A>, <A HREF = "read_data.html">read_data</A>, or
<A HREF = "read_restart.html">read_restart</A> commands.
<P>Change the volume and/or shape and/or boundary conditions for the
simulation box. Orthogonal simulation boxes have 3 adjustable size
parameters (x,y,z). Triclinic (non-orthogonal) simulation boxes have
6 adjustable size/shape parameters (x,y,z,xy,xz,yz). Any or all of
them can be adjusted independently by this command. Thus it can be
used to expand or contract a box, or to apply a shear strain to a
non-orthogonal box. It can also be used to change the boundary
conditions for the simulation box, similar to the
<A HREF = "boundary.html">boundary</A> command.
</P>
<P>This command allows you to toggle the existing simulation box from
orthogonal to non-orthogonal and vice versa. For example, an initial
<P>The size and shape of the initial simulation box are specified by the
<A HREF = "create_box.html">create_box</A> or <A HREF = "read_data.html">read_data</A> or
<A HREF = "read_restart.html">read_restart</A> command used to setup the simulation.
The size and shape may be altered by subsequent runs, e.g. by use of
the <A HREF = "fix_nh.html">fix npt</A> or <A HREF = "fix_deform.html">fix deform</A> commands.
The <A HREF = "create_box.html">create_box</A>, <A HREF = "read_data.html">read data</A>, and
<A HREF = "read_restart.html">read_restart</A> commands also determine whether the
simulation box is orthogonal or triclinic and their doc pages explain
the meaning of the xy,xz,yz tilt factors.
</P>
<P>See <A HREF = "Section_howto.html#howto_12">Section_howto 12</A> of the doc pages
for a geometric description of triclinic boxes, as defined by LAMMPS,
and how to transform these parameters to and from other commonly used
triclinic representations.
</P>
<P>The keywords used in this command are applied sequentially to the
simulation box and the atoms in it, in the order specified.
</P>
<P>Before the sequence of keywords are invoked, the current box
size/shape are stored, in case a <I>remap</I> keyword is used to map the
atom coordinates from the previous box size/shape to the current one.
</P>
<P>After all the keywords have been processed, any shrink-wrap boundary
conditions are invoked (see the <A HREF = "boundary.html">boundary</A> command)
which may change simulation box boundaries, and atoms are migrated to
new owning processors.
</P>
<P>IMPORTANT NOTE: It is possible to lose atoms with this command.
E.g. by changing the box without remapping the atoms, and having atoms
end up outside of non-periodic boundaries. It is also possible when
remapping atoms to put them (nearly) on top of each other which will
lead to bad dynamics. E.g. by converting a boundary from non-periodic
to periodic.
</P>
<P>IMPORTANT NOTE: The simulation box size/shape can be changed by
arbitrarily large amounts by this command. This is not a problem,
except that the mapping of processors to the simulation box is not
changed from its initial 3d configuration; see the
<A HREF = "processors.html">processors</A> command. Thus, if the box size/shape
changes dramatically, the mapping of processors to the simulation box
may not end up as optimal as the initial mapping attempted to be.
</P>
<HR>
<P>For the <I>x</I>, <I>y</I>, and <I>z</I> parameters, this is the meaning of their
styles and values.
</P>
<P>For style <I>final</I>, the final lo and hi box boundaries of a dimension
are specified. The values can be in lattice or box distance units.
See the discussion of the units keyword below.
</P>
<P>For style <I>delta</I>, plus or minus changes in the lo/hi box boundaries
of a dimension are specified. The values can be in lattice or box
distance units. See the discussion of the units keyword below.
</P>
<P>For style <I>scale</I>, a multiplicative factor to apply to the box length
of a dimension is specified. For example, if the initial box length
is 10, and the factor is 1.1, then the final box length will be 11. A
factor less than 1.0 means compression.
</P>
<P>The <I>volume</I> style changes the specified dimension in such a way that
the overall box volume remains constant with respect to the operation
performed by the preceding keyword. The <I>volume</I> style can only be
used following a keyword that changed the volume, which is any of the
<I>x</I>, <I>y</I>, <I>z</I> keywords. If the preceding keyword "key" had a <I>volume</I>
style, then both it and the current keyword apply to the keyword
preceding "key". I.e. this sequence of keywords is allowed:
</P>
<PRE>change_box all x scale 1.1 y volume z volume
</PRE>
<P>The <I>volume</I> style changes the associated dimension so that the
overall box volume is unchanged relative to its value before the
preceding keyword was invoked.
</P>
<P>If the following command is used, then the z box length will shrink by
the same 1.1 factor the x box length was increased by:
</P>
<PRE>change_box all x scale 1.1 z volume
</PRE>
<P>If the following command is used, then the y,z box lengths will each
shrink by sqrt(1.1) to keep the volume constant. In this case, the
y,z box lengths shrink so as to keep their relative aspect ratio
constant:
</P>
<PRE>change_box all"x scale 1.1 y volume z volume
</PRE>
<P>If the following command is used, then the final box will be a factor
of 10% larger in x and y, and a factor of 21% smaller in z, so as to
keep the volume constant:
</P>
<PRE>change_box all x scale 1.1 z volume y scale 1.1 z volume
</PRE>
<P>IMPORTANT NOTE: For solids or liquids, when one dimension of the box
is expanded, it may be physically undesirable to hold the other 2 box
lengths constant since that implies a density change. For solids,
adjusting the other dimensions via the <I>volume</I> style may make
physical sense (just as for a liquid), but may not be correct for
materials and potentials whose Poisson ratio is not 0.5.
</P>
<P>For the <I>scale</I> and <I>volume</I> styles, the box length is expanded or
compressed around its mid point.
</P>
<HR>
<P>For the <I>xy</I>, <I>xz</I>, and <I>yz</I> parameters, this is the meaning of their
styles and values. Note that changing the tilt factors of a triclinic
box does not change its volume.
</P>
<P>For style <I>final</I>, the final tilt factor is specified. The value
can be in lattice or box distance units. See the discussion of the
units keyword below.
</P>
<P>For style <I>delta</I>, a plus or minus change in the tilt factor is
specified. The value can be in lattice or box distance units. See
the discussion of the units keyword below.
</P>
<P>All of these styles change the xy, xz, yz tilt factors. In LAMMPS,
tilt factors (xy,xz,yz) for triclinic boxes are required to be no more
than half the distance of the parallel box length. For example, if
xlo = 2 and xhi = 12, then the x box length is 10 and the xy tilt
factor must be between -5 and 5. Similarly, both xz and yz must be
between -(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are all equivalent. Any tilt factor specified by this command
must be within these limits.
</P>
<HR>
<P>The <I>boundary</I> keyword takes arguments that have exactly the same
meaning as they do for the <A HREF = "boundary.html">boundary</A> command. In each
dimension, a single letter assigns the same style to both the lower
and upper face of the box. Two letters assigns the first style to the
lower face and the second style to the upper face.
</P>
<P>The style <I>p</I> means the box is periodic; the other styles mean
non-periodic. For style <I>f</I>, the position of the face is fixed. For
style <I>s</I>, the position of the face is set so as to encompass the
atoms in that dimension (shrink-wrapping), no matter how far they
move. For style <I>m</I>, shrink-wrapping occurs, but is bounded by the
current box edge in that dimension, so that the box will become no
smaller. See the <A HREF = "boundary.html">boundary</A> command for more
explanation of these style options.
</P>
<P>Note that the "boundary" command itself can only be used before the
simulation box is defined via a <A HREF = "read_data.html">read_data</A> or
<A HREF = "create_box.html">create_box</A> or <A HREF = "read_restart.html">read_restart</A>
command. This command allows the boundary conditions to be changed
later in your input script. Also note that the
<A HREF = "read_restart.html">read_restart</A> will change boundary conditions to
match what is stored in the restart file. So if you wish to change
them, you should use the change_box command after the read_restart
command.
</P>
<HR>
<P>The <I>ortho</I> and <I>triclinic</I> keywords convert the simulation box to be
orthogonal or triclinic (non-orthongonal). See <A HREF = "Section_howto#howto_13">this
section</A> for a discussion of how non-orthongal
boxes are represented in LAMMPS.
</P>
<P>The simulation box is defined as either orthogonal or triclinic when
it is created via the <A HREF = "create_box.html">create_box</A>,
<A HREF = "read_data.html">read_data</A>, or <A HREF = "read_restart.html">read_restart</A>
commands.
</P>
<P>These keywords allow you to toggle the existing simulation box from
orthogonal to triclinic and vice versa. For example, an initial
equilibration simulation can be run in an orthogonal box, the box can
be toggled to non-orthogonal, and then a <A HREF = "Section_howto.html#howto_13">non-equilibrium MD (NEMD)
be toggled to triclinic, and then a <A HREF = "Section_howto.html#howto_13">non-equilibrium MD (NEMD)
simulation</A> can be run with deformation
via the <A HREF = "fix_deform.html">fix deform</A> command.
</P>
<P>Note that if the simulation box is currently non-orthogonal and has
non-zero tilt in xy, yz, or xz, then it cannot be converted to an
orthogonal box.
<P>If the simulation box is currently triclinic and has non-zero tilt in
xy, yz, or xz, then it cannot be converted to an orthogonal box.
</P>
<HR>
<P>The <I>set</I> keyword saves the current box size/shape. This can be
useful if you wish to use the <I>remap</I> keyword more than once or if you
wish it to be applied to an intermediate box size/shape in a sequence
of keyword operations. Note that the box size/shape is saved before
any of the keywords are processed, i.e. the box size/shape at the time
the create_box command is encountered in the input script.
</P>
<P>The <I>remap</I> keyword remaps atom coordinates from the last saved box
size/shape to the current box state. For example, if you stretch the
box in the x dimension or tilt it in the xy plane via the <I>x</I> and <I>xy</I>
keywords, then the <I>remap</I> commmand will dilate or tilt the atoms to
conform to the new box size/shape, as if the atoms moved with the box
as it deformed.
</P>
<P>Note that this operation is performed without regard to periodic
boundaries. Any shrink-wrapping of non-periodic boundaries (see the
<A HREF = "boundary.html">boundary</A> command occurs after all keywords, including
this one, have been processed.
</P>
<P>Only atoms in the specified group are remapped.
</P>
<P>IMPORTANT NOTE: If you do not explicitly specify the <I>remap</I> keyword,
atom coordinates will not be changed even though the box size/shape
changes. This may be the behavior you desire, but can also cause
atoms to be lost.
</P>
<HR>
<P>The <I>units</I> keyword determines the meaning of the distance units used
to define various arguments. 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.
</P>
<HR>
<P><B>Restrictions:</B>
</P>
<P>At the point in the input script when this command is issued, no
<A HREF = "dump.html">dumps</A> can be active, nor can a <A HREF = "fix_ave_spatial.html">fix
ave/spatial</A> or <A HREF = "fix_deform.html">fix deform</A> be
active. This is because these commands test whether the simulation
box is orthogonal when they are first issued. Note that these
commands can appear in your script before a change_box command is
issued, so long as an <A HREF = "undump.html">undump</A> or <A HREF = "unfix.html">unfix</A>
command is also used to turn them off.
<P>If you use the <I>ortho</I> or <I>triclinic</I> keywords, then at the point in
the input script when this command is issued, no <A HREF = "dump.html">dumps</A> can
be active, nor can a <A HREF = "fix_ave_spatial.html">fix ave/spatial</A> or <A HREF = "fix_deform.html">fix
deform</A> be active. This is because these commands
test whether the simulation box is orthogonal when they are first
issued. Note that these commands can be used in your script before a
change_box command is issued, so long as an <A HREF = "undump.html">undump</A> or
<A HREF = "unfix.html">unfix</A> command is also used to turn them off.
</P>
<P><B>Related commands:</B> none
<P><B>Related commands:</B>
</P>
<P><B>Default:</B> none
<P><A HREF = "fix_deform.html">fix deform</A>, <A HREF = "boundary.html">boundary</A>
</P>
<P><B>Default:</B>
</P>
<P>The option default is units = lattice.
</P>
</HTML>

View File

@ -10,48 +10,291 @@ change_box command :h3
[Syntax:]
change_box style :pre
change_box group-ID parameter args ... keyword args ... :pre
style = {ortho} or {triclinic} :l
{ortho} = convert simulation box from non-orthogonal (triclinic) to orthogonal
{triclinic} = convert simulation box from orthogonal to non-orthogonal (triclinic) :pre
group-ID = ID of group of atoms to (optionally) displace :ulb,l
one or more parameter/arg pairs may be appended :l
parameter = {x} or {y} or {z} or {xy} or {xz} or {yz} or {boundary} or {ortho} or {triclinic} or {set} or {remap}
{x}, {y}, {z} args = style value(s)
style = {final} or {delta} or {scale} or {volume}
{final} values = lo hi
lo hi = box boundaries after displacement (distance units)
{delta} values = dlo dhi
dlo dhi = change in box boundaries after displacement (distance units)
{scale} values = factor
factor = multiplicative factor for change in box length after displacement
{volume} value = none = adjust this dim to preserve volume of system
{xy}, {xz}, {yz} args = style value
style = {final} or {delta}
{final} value = tilt
tilt = tilt factor after displacement (distance units)
{delta} value = dtilt
dtilt = change in tilt factor after displacement (distance units)
{boundary} args = x y z
x,y,z = {p} or {s} or {f} or {m}, one or two letters
{p} is periodic
{f} is non-periodic and fixed
{s} is non-periodic and shrink-wrapped
{m} is non-periodic and shrink-wrapped with a minimum value
{ortho} args = none = change box to orthogonal
(triclinic} args = none = change box to triclinic
{set} args = none = store state of current box
{remap} args = none = remap atom coords from last saved state to current box :pre
zero or more keyword/value pairs may be appended :l
keyword = {units} :l
{units} value = {lattice} or {box}
lattice = distances are defined in lattice units
box = distances are defined in simulation box units :pre
:ule
[Examples:]
change_box ortho
change_box triclinic :pre
change_box all xy final -2.0 z final 0.0 5.0 boundary p p f remap units box
change_box all x scale 1.1 y volume z volume remap :pre
[Description:]
By default LAMMPS runs a simulation in an orthogonal, axis-aligned
simulation box. LAMMPS can also run simulations in "non-orthogonal
(triclinic) simulation boxes"_Section_howto.html#howto_12. A box is
defined as either orthogonal or non-orthogonal when it is created via
the "create_box"_create_box.html, "read_data"_read_data.html, or
"read_restart"_read_restart.html commands.
Change the volume and/or shape and/or boundary conditions for the
simulation box. Orthogonal simulation boxes have 3 adjustable size
parameters (x,y,z). Triclinic (non-orthogonal) simulation boxes have
6 adjustable size/shape parameters (x,y,z,xy,xz,yz). Any or all of
them can be adjusted independently by this command. Thus it can be
used to expand or contract a box, or to apply a shear strain to a
non-orthogonal box. It can also be used to change the boundary
conditions for the simulation box, similar to the
"boundary"_boundary.html command.
This command allows you to toggle the existing simulation box from
orthogonal to non-orthogonal and vice versa. For example, an initial
The size and shape of the initial simulation box are specified by the
"create_box"_create_box.html or "read_data"_read_data.html or
"read_restart"_read_restart.html command used to setup the simulation.
The size and shape may be altered by subsequent runs, e.g. by use of
the "fix npt"_fix_nh.html or "fix deform"_fix_deform.html commands.
The "create_box"_create_box.html, "read data"_read_data.html, and
"read_restart"_read_restart.html commands also determine whether the
simulation box is orthogonal or triclinic and their doc pages explain
the meaning of the xy,xz,yz tilt factors.
See "Section_howto 12"_Section_howto.html#howto_12 of the doc pages
for a geometric description of triclinic boxes, as defined by LAMMPS,
and how to transform these parameters to and from other commonly used
triclinic representations.
The keywords used in this command are applied sequentially to the
simulation box and the atoms in it, in the order specified.
Before the sequence of keywords are invoked, the current box
size/shape are stored, in case a {remap} keyword is used to map the
atom coordinates from the previous box size/shape to the current one.
After all the keywords have been processed, any shrink-wrap boundary
conditions are invoked (see the "boundary"_boundary.html command)
which may change simulation box boundaries, and atoms are migrated to
new owning processors.
IMPORTANT NOTE: It is possible to lose atoms with this command.
E.g. by changing the box without remapping the atoms, and having atoms
end up outside of non-periodic boundaries. It is also possible when
remapping atoms to put them (nearly) on top of each other which will
lead to bad dynamics. E.g. by converting a boundary from non-periodic
to periodic.
IMPORTANT NOTE: The simulation box size/shape can be changed by
arbitrarily large amounts by this command. This is not a problem,
except that the mapping of processors to the simulation box is not
changed from its initial 3d configuration; see the
"processors"_processors.html command. Thus, if the box size/shape
changes dramatically, the mapping of processors to the simulation box
may not end up as optimal as the initial mapping attempted to be.
:line
For the {x}, {y}, and {z} parameters, this is the meaning of their
styles and values.
For style {final}, the final lo and hi box boundaries of a dimension
are specified. The values can be in lattice or box distance units.
See the discussion of the units keyword below.
For style {delta}, plus or minus changes in the lo/hi box boundaries
of a dimension are specified. The values can be in lattice or box
distance units. See the discussion of the units keyword below.
For style {scale}, a multiplicative factor to apply to the box length
of a dimension is specified. For example, if the initial box length
is 10, and the factor is 1.1, then the final box length will be 11. A
factor less than 1.0 means compression.
The {volume} style changes the specified dimension in such a way that
the overall box volume remains constant with respect to the operation
performed by the preceding keyword. The {volume} style can only be
used following a keyword that changed the volume, which is any of the
{x}, {y}, {z} keywords. If the preceding keyword "key" had a {volume}
style, then both it and the current keyword apply to the keyword
preceding "key". I.e. this sequence of keywords is allowed:
change_box all x scale 1.1 y volume z volume :pre
The {volume} style changes the associated dimension so that the
overall box volume is unchanged relative to its value before the
preceding keyword was invoked.
If the following command is used, then the z box length will shrink by
the same 1.1 factor the x box length was increased by:
change_box all x scale 1.1 z volume :pre
If the following command is used, then the y,z box lengths will each
shrink by sqrt(1.1) to keep the volume constant. In this case, the
y,z box lengths shrink so as to keep their relative aspect ratio
constant:
change_box all"x scale 1.1 y volume z volume :pre
If the following command is used, then the final box will be a factor
of 10% larger in x and y, and a factor of 21% smaller in z, so as to
keep the volume constant:
change_box all x scale 1.1 z volume y scale 1.1 z volume :pre
IMPORTANT NOTE: For solids or liquids, when one dimension of the box
is expanded, it may be physically undesirable to hold the other 2 box
lengths constant since that implies a density change. For solids,
adjusting the other dimensions via the {volume} style may make
physical sense (just as for a liquid), but may not be correct for
materials and potentials whose Poisson ratio is not 0.5.
For the {scale} and {volume} styles, the box length is expanded or
compressed around its mid point.
:line
For the {xy}, {xz}, and {yz} parameters, this is the meaning of their
styles and values. Note that changing the tilt factors of a triclinic
box does not change its volume.
For style {final}, the final tilt factor is specified. The value
can be in lattice or box distance units. See the discussion of the
units keyword below.
For style {delta}, a plus or minus change in the tilt factor is
specified. The value can be in lattice or box distance units. See
the discussion of the units keyword below.
All of these styles change the xy, xz, yz tilt factors. In LAMMPS,
tilt factors (xy,xz,yz) for triclinic boxes are required to be no more
than half the distance of the parallel box length. For example, if
xlo = 2 and xhi = 12, then the x box length is 10 and the xy tilt
factor must be between -5 and 5. Similarly, both xz and yz must be
between -(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not a
limitation, since if the maximum tilt factor is 5 (as in this
example), then configurations with tilt = ..., -15, -5, 5, 15, 25,
... are all equivalent. Any tilt factor specified by this command
must be within these limits.
:line
The {boundary} keyword takes arguments that have exactly the same
meaning as they do for the "boundary"_boundary.html command. In each
dimension, a single letter assigns the same style to both the lower
and upper face of the box. Two letters assigns the first style to the
lower face and the second style to the upper face.
The style {p} means the box is periodic; the other styles mean
non-periodic. For style {f}, the position of the face is fixed. For
style {s}, the position of the face is set so as to encompass the
atoms in that dimension (shrink-wrapping), no matter how far they
move. For style {m}, shrink-wrapping occurs, but is bounded by the
current box edge in that dimension, so that the box will become no
smaller. See the "boundary"_boundary.html command for more
explanation of these style options.
Note that the "boundary" command itself can only be used before the
simulation box is defined via a "read_data"_read_data.html or
"create_box"_create_box.html or "read_restart"_read_restart.html
command. This command allows the boundary conditions to be changed
later in your input script. Also note that the
"read_restart"_read_restart.html will change boundary conditions to
match what is stored in the restart file. So if you wish to change
them, you should use the change_box command after the read_restart
command.
:line
The {ortho} and {triclinic} keywords convert the simulation box to be
orthogonal or triclinic (non-orthongonal). See "this
section"_Section_howto#howto_13 for a discussion of how non-orthongal
boxes are represented in LAMMPS.
The simulation box is defined as either orthogonal or triclinic when
it is created via the "create_box"_create_box.html,
"read_data"_read_data.html, or "read_restart"_read_restart.html
commands.
These keywords allow you to toggle the existing simulation box from
orthogonal to triclinic and vice versa. For example, an initial
equilibration simulation can be run in an orthogonal box, the box can
be toggled to non-orthogonal, and then a "non-equilibrium MD (NEMD)
be toggled to triclinic, and then a "non-equilibrium MD (NEMD)
simulation"_Section_howto.html#howto_13 can be run with deformation
via the "fix deform"_fix_deform.html command.
Note that if the simulation box is currently non-orthogonal and has
non-zero tilt in xy, yz, or xz, then it cannot be converted to an
orthogonal box.
If the simulation box is currently triclinic and has non-zero tilt in
xy, yz, or xz, then it cannot be converted to an orthogonal box.
:line
The {set} keyword saves the current box size/shape. This can be
useful if you wish to use the {remap} keyword more than once or if you
wish it to be applied to an intermediate box size/shape in a sequence
of keyword operations. Note that the box size/shape is saved before
any of the keywords are processed, i.e. the box size/shape at the time
the create_box command is encountered in the input script.
The {remap} keyword remaps atom coordinates from the last saved box
size/shape to the current box state. For example, if you stretch the
box in the x dimension or tilt it in the xy plane via the {x} and {xy}
keywords, then the {remap} commmand will dilate or tilt the atoms to
conform to the new box size/shape, as if the atoms moved with the box
as it deformed.
Note that this operation is performed without regard to periodic
boundaries. Any shrink-wrapping of non-periodic boundaries (see the
"boundary"_boundary.html command occurs after all keywords, including
this one, have been processed.
Only atoms in the specified group are remapped.
IMPORTANT NOTE: If you do not explicitly specify the {remap} keyword,
atom coordinates will not be changed even though the box size/shape
changes. This may be the behavior you desire, but can also cause
atoms to be lost.
:line
The {units} keyword determines the meaning of the distance units used
to define various arguments. 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.
:line
[Restrictions:]
At the point in the input script when this command is issued, no
"dumps"_dump.html can be active, nor can a "fix
ave/spatial"_fix_ave_spatial.html or "fix deform"_fix_deform.html be
active. This is because these commands test whether the simulation
box is orthogonal when they are first issued. Note that these
commands can appear in your script before a change_box command is
issued, so long as an "undump"_undump.html or "unfix"_unfix.html
command is also used to turn them off.
If you use the {ortho} or {triclinic} keywords, then at the point in
the input script when this command is issued, no "dumps"_dump.html can
be active, nor can a "fix ave/spatial"_fix_ave_spatial.html or "fix
deform"_fix_deform.html be active. This is because these commands
test whether the simulation box is orthogonal when they are first
issued. Note that these commands can be used in your script before a
change_box command is issued, so long as an "undump"_undump.html or
"unfix"_unfix.html command is also used to turn them off.
[Related commands:] none
[Related commands:]
[Default:] none
"fix deform"_fix_deform.html, "boundary"_boundary.html
[Default:]
The option default is units = lattice.

View File

@ -76,29 +76,29 @@ define the lattice spacing.
</P>
<HR>
<P>Care should be taken not to move atoms on top of other atoms. After
the move, atoms are remapped into the periodic simulation box if
needed.
<P>IMPORTANT NOTE: Care should be taken not to move atoms on top of other
atoms. After the move, atoms are remapped into the periodic
simulation box if needed, and any shrink-wrap boundary conditions (see
the <A HREF = "boundary.html">boundary</A> command) are enforced which may change
the box size. Other than this effect, this command does not change
the size or shape of the simulation box. See the
<A HREF = "change_box.html">change_box</A> command if that effect is desired.
</P>
<P>Atoms can be moved arbitrarily long distances by this command. If the
simulation box is non-periodic, this can change its size or shape.
This is not a problem, except that the mapping of processors to the
simulation box is not changed by this command from its initial 3d
configuration; see the <A HREF = "processors.html">processors</A> command. Thus, if
the box size or shape changes dramatically, the simulation may not be
as well load-balanced (atoms per processor) as the initial mapping
tried to achieve.
<P>IMPORTANT NOTE: Atoms can be moved arbitrarily long distances by this
command. If the simulation box is non-periodic and shrink-wrapped
(see the <A HREF = "boundary.html">boundary</A> command), this can change its size
or shape. This is not a problem, except that the mapping of
processors to the simulation box is not changed by this command from
its initial 3d configuration; see the <A HREF = "processors.html">processors</A>
command. Thus, if the box size/shape changes dramatically, the
mapping of processors to the simulation box may not end up as optimal
as the initial mapping attempted to be.
</P>
<P><B>Restrictions:</B>
</P>
<P>This command requires inter-processor communication to migrate atoms
once they have been displaced. This means that your system must be
ready to perform a simulation before using this command (force fields
are setup, atom masses are set, etc).
<P><B>Restrictions:</B> none
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "lattice.html">lattice</A>
<P><A HREF = "lattice.html">lattice</A>, <A HREF = "change_box.html">change_box</A>
</P>
<P><B>Default:</B>
</P>

View File

@ -68,29 +68,29 @@ define the lattice spacing.
:line
Care should be taken not to move atoms on top of other atoms. After
the move, atoms are remapped into the periodic simulation box if
needed.
IMPORTANT NOTE: Care should be taken not to move atoms on top of other
atoms. After the move, atoms are remapped into the periodic
simulation box if needed, and any shrink-wrap boundary conditions (see
the "boundary"_boundary.html command) are enforced which may change
the box size. Other than this effect, this command does not change
the size or shape of the simulation box. See the
"change_box"_change_box.html command if that effect is desired.
Atoms can be moved arbitrarily long distances by this command. If the
simulation box is non-periodic, this can change its size or shape.
This is not a problem, except that the mapping of processors to the
simulation box is not changed by this command from its initial 3d
configuration; see the "processors"_processors.html command. Thus, if
the box size or shape changes dramatically, the simulation may not be
as well load-balanced (atoms per processor) as the initial mapping
tried to achieve.
IMPORTANT NOTE: Atoms can be moved arbitrarily long distances by this
command. If the simulation box is non-periodic and shrink-wrapped
(see the "boundary"_boundary.html command), this can change its size
or shape. This is not a problem, except that the mapping of
processors to the simulation box is not changed by this command from
its initial 3d configuration; see the "processors"_processors.html
command. Thus, if the box size/shape changes dramatically, the
mapping of processors to the simulation box may not end up as optimal
as the initial mapping attempted to be.
[Restrictions:]
This command requires inter-processor communication to migrate atoms
once they have been displaced. This means that your system must be
ready to perform a simulation before using this command (force fields
are setup, atom masses are set, etc).
[Restrictions:] none
[Related commands:]
"lattice"_lattice.html
"lattice"_lattice.html, "change_box"_change_box.html
[Default:]

View File

@ -1,191 +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>displace_box command
</H3>
<P><B>Syntax:</B>
</P>
<PRE>displace_box group-ID parameter args ... keyword value ...
</PRE>
<UL><LI>group-ID = ID of group of atoms to displace
<LI>one or more parameter/arg pairs may be appended
<PRE>parameter = <I>x</I> or <I>y</I> or <I>z</I> or <I>xy</I> or <I>xz</I> or <I>yz</I>
<I>x</I>, <I>y</I>, <I>z</I> args = style value(s)
style = <I>final</I> or <I>delta</I> or <I>scale</I> or <I>volume</I>
<I>final</I> values = lo hi
lo hi = box boundaries at end of run (distance units)
<I>delta</I> values = dlo dhi
dlo dhi = change in box boundaries at end of run (distance units)
<I>scale</I> values = factor
factor = multiplicative factor for change in box length at end of run
<I>volume</I> value = none = adjust this dim to preserve volume of system
<I>xy</I>, <I>xz</I>, <I>yz</I> args = style value
style = <I>final</I> or <I>delta</I>
<I>final</I> value = tilt
tilt = tilt factor at end of run (distance units)
<I>delta</I> value = dtilt
dtilt = change in tilt factor at end of run (distance units)
</PRE>
<LI>zero or more keyword/value pairs may be appended
<LI>keyword = <I>remap</I> or <I>units</I>
<PRE> <I>remap</I> value = <I>x</I> or <I>none</I>
x = remap coords of atoms in group into deforming box
none = no remapping of coords
<I>units</I> value = <I>lattice</I> or <I>box</I>
lattice = distances are defined in lattice units
box = distances are defined in simulation box units
</PRE>
</UL>
<P><B>Examples:</B>
</P>
<PRE>displace_box all xy final -2.0 z final 0.0 5.0 units box
displace_box all x scale 1.1 y volume z volume
</PRE>
<P><B>Description:</B>
</P>
<P>Change the volume and/or shape of the simulation box. Orthogonal
simulation boxes have 3 adjustable parameters (x,y,z). Triclinic
(non-orthogonal) simulation boxes have 6 adjustable parameters
(x,y,z,xy,xz,yz). Any or all of them can be adjusted independently
and simultaneously by this command. This fix can be used to expand or
contract a box, or to apply a shear strain to a non-orthogonal box.
</P>
<P>Any parameter varied by this command must refer to a periodic
dimension - see the <A HREF = "boundary.html">boundary</A> command. For parameters
"xy", "xz", and "yz" this means both affected dimensions must be
periodic, e.g. x and y for "xy". Dimensions not varied by this
command can be periodic or non-periodic.
</P>
<P>The size and shape of the initial simulation box are specified by the
<A HREF = "create_box.html">create_box</A> or <A HREF = "read_data.html">read_data</A> or
<A HREF = "read_restart.html">read_restart</A> command used to setup the simulation,
or they are the values from the end of the previous run. The
<A HREF = "create_box.html">create_box</A>, <A HREF = "read_data.html">read data</A>, and
<A HREF = "read_restart.html">read_restart</A> commands also determine whether the
simulation box is orthogonal or triclinic and their doc pages explain
the meaning of the xy,xz,yz tilt factors. If the displace_box command
changes the xy,xz,yz tilt factors, then the simulation box must be
triclinic, even if its initial tilt factors are 0.0.
</P>
<HR>
<P>For the <I>x</I>, <I>y</I>, and <I>z</I> parameters, this is the meaning of their
styles and values.
</P>
<P>For style <I>final</I>, the final lo and hi box boundaries of a dimension
are specified. The values can be in lattice or box distance units.
See the discussion of the units keyword below.
</P>
<P>For style <I>delta</I>, plus or minus changes in the lo/hi box boundaries
of a dimension are specified. The values can be in lattice or box
distance units. See the discussion of the units keyword below.
</P>
<P>For style <I>scale</I>, a multiplicative factor to apply to the box length
of a dimension is specified. For example, if the initial box length
is 10, and the factor is 1.1, then the final box length will be 11. A
factor less than 1.0 means compression.
</P>
<P>The <I>volume</I> style changes the specified dimension in such a way that
the box volume remains constant while other box dimensions are changed
explicitly via the styles discussed above. For example, "x scale 1.1
y scale 1.1 z volume" will shrink the z box length as the x,y box
lengths increase, to keep the volume constant (product of x,y,z
lengths). If "x scale 1.1 z volume" is specified and parameter <I>y</I> is
unspecified, then the z box length will shrink as x increases to keep
the product of x,z lengths constant. If "x scale 1.1 y volume z
volume" is specified, then both the y,z box lengths will shrink as x
increases to keep the volume constant (product of x,y,z lengths). In
this case, the y,z box lengths shrink so as to keep their relative
aspect ratio constant.
</P>
<P>For solids or liquids, note that when one dimension of the box is
expanded by this command, it may be physically undesirable to hold the
other 2 box lengths constant (unspecified by this command) since that
implies a density change. Using the <I>volume</I> style for those 2
dimensions to keep the box volume constant may make more physical
sense, but may also not be correct for materials and potentials whose
Poisson ratio is not 0.5.
</P>
<P>For the <I>scale</I> and <I>volume</I> styles, the box length is expanded or
compressed around its mid point.
</P>
<HR>
<P>For the <I>xy</I>, <I>xz</I>, and <I>yz</I> parameters, this is the meaning of their
styles and values. Note that changing the tilt factors of a triclinic
box does not change its volume.
</P>
<P>For style <I>final</I>, the final tilt factor is specified. The value
can be in lattice or box distance units. See the discussion of the
units keyword below.
</P>
<P>For style <I>delta</I>, a plus or minus change in the tilt factor is
specified. The value can be in lattice or box distance units. See
the discussion of the units keyword below.
</P>
<P>All of these styles change the xy, xz, yz tilt factors. In LAMMPS,
tilt factors (xy,xz,yz) for triclinic boxes are always bounded by half
the distance of the parallel box length. For example, if xlo = 2 and
xhi = 12, then the x box length is 10 and the xy tilt factor must be
between -5 and 5. Similarly, both xz and yz must be between
-(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not a limitation,
since if the maximum tilt factor is 5 (as in this example), then
configurations with tilt = ..., -15, -5, 5, 15, 25, ... are all
equivalent. Any tilt factor specified by this command must be within
these limits.
</P>
<HR>
<P>The <I>remap</I> keyword determines whether atom positions are re-mapped to
the new box. If <I>remap</I> is set to <I>x</I> (the default), atoms in the fix
group are re-mapped; otherwise they are not. If <I>remap</I> is set to
<I>none</I>, then this remapping does not take place.
</P>
<P>The <I>units</I> keyword determines the meaning of the distance units used
to define various arguments. 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.
</P>
<HR>
<P>The simulation box size or shape can be changed by arbitrarily large
amounts by this command. This is not a problem, except that the
mapping of processors to the simulation box is not changed by this
command from its initial 3d configuration; see the
<A HREF = "processors.html">processors</A> command. Thus, if the box size or shape
changes dramatically, the simulation may not be as well load-balanced
(atoms per processor) as the initial mapping tried to achieve.
</P>
<P><B>Restrictions:</B>
</P>
<P>Any box dimension varied by this fix must be periodic.
</P>
<P>This command requires inter-processor communication to migrate atoms
once they have moved. This means that your system must be ready to
perform a simulation before using this command (force fields are
setup, atom masses are set, etc).
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "fix_deform.html">fix deform</A>
</P>
<P><B>Default:</B>
</P>
<P>The option defaults are remap = x and units = lattice.
</P>
</HTML>

View File

@ -1,181 +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
displace_box command :h3
[Syntax:]
displace_box group-ID parameter args ... keyword value ... :pre
group-ID = ID of group of atoms to displace :ulb,l
one or more parameter/arg pairs may be appended :l
parameter = {x} or {y} or {z} or {xy} or {xz} or {yz}
{x}, {y}, {z} args = style value(s)
style = {final} or {delta} or {scale} or {volume}
{final} values = lo hi
lo hi = box boundaries at end of run (distance units)
{delta} values = dlo dhi
dlo dhi = change in box boundaries at end of run (distance units)
{scale} values = factor
factor = multiplicative factor for change in box length at end of run
{volume} value = none = adjust this dim to preserve volume of system
{xy}, {xz}, {yz} args = style value
style = {final} or {delta}
{final} value = tilt
tilt = tilt factor at end of run (distance units)
{delta} value = dtilt
dtilt = change in tilt factor at end of run (distance units) :pre
zero or more keyword/value pairs may be appended :l
keyword = {remap} or {units} :l
{remap} value = {x} or {none}
x = remap coords of atoms in group into deforming box
none = no remapping of coords
{units} value = {lattice} or {box}
lattice = distances are defined in lattice units
box = distances are defined in simulation box units :pre
:ule
[Examples:]
displace_box all xy final -2.0 z final 0.0 5.0 units box
displace_box all x scale 1.1 y volume z volume :pre
[Description:]
Change the volume and/or shape of the simulation box. Orthogonal
simulation boxes have 3 adjustable parameters (x,y,z). Triclinic
(non-orthogonal) simulation boxes have 6 adjustable parameters
(x,y,z,xy,xz,yz). Any or all of them can be adjusted independently
and simultaneously by this command. This fix can be used to expand or
contract a box, or to apply a shear strain to a non-orthogonal box.
Any parameter varied by this command must refer to a periodic
dimension - see the "boundary"_boundary.html command. For parameters
"xy", "xz", and "yz" this means both affected dimensions must be
periodic, e.g. x and y for "xy". Dimensions not varied by this
command can be periodic or non-periodic.
The size and shape of the initial simulation box are specified by the
"create_box"_create_box.html or "read_data"_read_data.html or
"read_restart"_read_restart.html command used to setup the simulation,
or they are the values from the end of the previous run. The
"create_box"_create_box.html, "read data"_read_data.html, and
"read_restart"_read_restart.html commands also determine whether the
simulation box is orthogonal or triclinic and their doc pages explain
the meaning of the xy,xz,yz tilt factors. If the displace_box command
changes the xy,xz,yz tilt factors, then the simulation box must be
triclinic, even if its initial tilt factors are 0.0.
:line
For the {x}, {y}, and {z} parameters, this is the meaning of their
styles and values.
For style {final}, the final lo and hi box boundaries of a dimension
are specified. The values can be in lattice or box distance units.
See the discussion of the units keyword below.
For style {delta}, plus or minus changes in the lo/hi box boundaries
of a dimension are specified. The values can be in lattice or box
distance units. See the discussion of the units keyword below.
For style {scale}, a multiplicative factor to apply to the box length
of a dimension is specified. For example, if the initial box length
is 10, and the factor is 1.1, then the final box length will be 11. A
factor less than 1.0 means compression.
The {volume} style changes the specified dimension in such a way that
the box volume remains constant while other box dimensions are changed
explicitly via the styles discussed above. For example, "x scale 1.1
y scale 1.1 z volume" will shrink the z box length as the x,y box
lengths increase, to keep the volume constant (product of x,y,z
lengths). If "x scale 1.1 z volume" is specified and parameter {y} is
unspecified, then the z box length will shrink as x increases to keep
the product of x,z lengths constant. If "x scale 1.1 y volume z
volume" is specified, then both the y,z box lengths will shrink as x
increases to keep the volume constant (product of x,y,z lengths). In
this case, the y,z box lengths shrink so as to keep their relative
aspect ratio constant.
For solids or liquids, note that when one dimension of the box is
expanded by this command, it may be physically undesirable to hold the
other 2 box lengths constant (unspecified by this command) since that
implies a density change. Using the {volume} style for those 2
dimensions to keep the box volume constant may make more physical
sense, but may also not be correct for materials and potentials whose
Poisson ratio is not 0.5.
For the {scale} and {volume} styles, the box length is expanded or
compressed around its mid point.
:line
For the {xy}, {xz}, and {yz} parameters, this is the meaning of their
styles and values. Note that changing the tilt factors of a triclinic
box does not change its volume.
For style {final}, the final tilt factor is specified. The value
can be in lattice or box distance units. See the discussion of the
units keyword below.
For style {delta}, a plus or minus change in the tilt factor is
specified. The value can be in lattice or box distance units. See
the discussion of the units keyword below.
All of these styles change the xy, xz, yz tilt factors. In LAMMPS,
tilt factors (xy,xz,yz) for triclinic boxes are always bounded by half
the distance of the parallel box length. For example, if xlo = 2 and
xhi = 12, then the x box length is 10 and the xy tilt factor must be
between -5 and 5. Similarly, both xz and yz must be between
-(xhi-xlo)/2 and +(yhi-ylo)/2. Note that this is not a limitation,
since if the maximum tilt factor is 5 (as in this example), then
configurations with tilt = ..., -15, -5, 5, 15, 25, ... are all
equivalent. Any tilt factor specified by this command must be within
these limits.
:line
The {remap} keyword determines whether atom positions are re-mapped to
the new box. If {remap} is set to {x} (the default), atoms in the fix
group are re-mapped; otherwise they are not. If {remap} is set to
{none}, then this remapping does not take place.
The {units} keyword determines the meaning of the distance units used
to define various arguments. 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.
:line
The simulation box size or shape can be changed by arbitrarily large
amounts by this command. This is not a problem, except that the
mapping of processors to the simulation box is not changed by this
command from its initial 3d configuration; see the
"processors"_processors.html command. Thus, if the box size or shape
changes dramatically, the simulation may not be as well load-balanced
(atoms per processor) as the initial mapping tried to achieve.
[Restrictions:]
Any box dimension varied by this fix must be periodic.
This command requires inter-processor communication to migrate atoms
once they have moved. This means that your system must be ready to
perform a simulation before using this command (force fields are
setup, atom masses are set, etc).
[Related commands:]
"fix deform"_fix_deform.html
[Default:]
The option defaults are remap = x and units = lattice.

View File

@ -533,7 +533,7 @@ xy) that is shrink-wrapped via the <A HREF = "boundary.html">boundary</A> comamn
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "displace_box.html">displace_box</A>
<P><A HREF = "change_box.html">change_box</A>
</P>
<P><B>Default:</B>
</P>

View File

@ -523,7 +523,7 @@ xy) that is shrink-wrapped via the "boundary"_boundary.html comamnd.
[Related commands:]
"displace_box"_displace_box.html
"change_box"_change_box.html
[Default:]

View File

@ -33,8 +33,8 @@ class lammps:
except:
try:
self.lib = CDLL("_lammps_serial.so")
#except:
# raise OSError,"Could not load LAMMPS dynamic library"
except:
raise OSError,"Could not load LAMMPS dynamic library"
# create an instance of LAMMPS
# don't know how to pass an MPI communicator from PyPar

View File

@ -874,7 +874,7 @@ void PPPM::set_grid()
acons[7][5] = 1755948832039.0 / 36229939200000.0;
acons[7][6] = 4887769399.0 / 37838389248.0;
double q2 = qsqsum / force->dielectric;
double q2 = qsqsum * force->qqrd2e / force->dielectric;
bigint natoms = atom->natoms;
// use xprd,yprd,zprd even if triclinic so grid size is the same

View File

@ -111,7 +111,8 @@ FixBondCreate::FixBondCreate(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Cannot use fix bond/create with non-molecular systems");
if (iatomtype == jatomtype &&
((imaxbond != jmaxbond) || (inewtype != jnewtype)))
error->all(FLERR,"Inconsistent iparam/jparam values in fix bond/create command");
error->all(FLERR,
"Inconsistent iparam/jparam values in fix bond/create command");
// initialize Marsaglia RNG with processor-unique seed
@ -249,7 +250,8 @@ void FixBondCreate::setup(int vflag)
if (newton_bond) {
m = atom->map(bond_atom[i][j]);
if (m < 0)
error->one(FLERR,"Could not count initial bonds in fix bond/create");
error->one(FLERR,
"Could not count initial bonds in fix bond/create");
bondcount[m]++;
}
}
@ -422,7 +424,8 @@ void FixBondCreate::post_integrate()
n1 = nspecial[i][0];
n3 = nspecial[i][2];
if (n3 == atom->maxspecial)
error->one(FLERR,"New bond exceeded special list size in fix bond/create");
error->one(FLERR,
"New bond exceeded special list size in fix bond/create");
for (m = n3; m > n1; m--) slist[m+1] = slist[m];
slist[n1] = tag[j];
nspecial[i][0]++;

View File

@ -195,9 +195,9 @@ void PairEAMCuda::array2spline()
memory->destroy(rhor_spline);
memory->destroy(z2r_spline);
memory->create(frho_spline,nfrho,nrho+1,7,"pair:frho");
memory->create(rhor_spline,nrhor,nr+1,7,"pair:rhor");
memory->create(z2r_spline,nz2r,nr+1,7,"pair:z2r");
memory->create(frho_spline,nfrho,nrho+1,8,"pair:frho");
memory->create(rhor_spline,nrhor,nr+1,8,"pair:rhor");
memory->create(z2r_spline,nz2r,nr+1,8,"pair:z2r");
for (int i = 0; i < nfrho; i++){
interpolate(nrho,drho,frho[i],frho_spline[i]);

View File

@ -11,17 +11,28 @@
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "change_box.h"
#include "domain.h"
#include "atom.h"
#include "modify.h"
#include "fix.h"
#include "domain.h"
#include "lattice.h"
#include "comm.h"
#include "irregular.h"
#include "output.h"
#include "group.h"
#include "error.h"
using namespace LAMMPS_NS;
enum{ORTHO,TRICLINIC};
enum{XYZ,TILT,BOUNDARY,ORTHO,TRICLINIC,SET,REMAP};
enum{FINAL,DELTA,SCALE};
enum{X,Y,Z,YZ,XZ,XY};
/* ---------------------------------------------------------------------- */
@ -31,34 +42,412 @@ ChangeBox::ChangeBox(LAMMPS *lmp) : Pointers(lmp) {}
void ChangeBox::command(int narg, char **arg)
{
int i;
if (domain->box_exist == 0)
error->all(FLERR,"Change_box command before simulation box is defined");
if (narg != 1) error->all(FLERR,"Illegal change_box command");
if (narg < 2) error->all(FLERR,"Illegal change_box command");
if (modify->nfix_restart_peratom)
error->all(FLERR,"Cannot change_box after "
"reading restart file with per-atom info");
int style;
if (strcmp(arg[0],"ortho") == 0) style = ORTHO;
else if (strcmp(arg[0],"triclinic") == 0) style = TRICLINIC;
else error->all(FLERR,"Illegal change_box command");
if (comm->me == 0 && screen) fprintf(screen,"Changing box ...\n");
if (style == ORTHO && domain->triclinic == 0)
error->all(FLERR,"Change_box operation is invalid");
if (style == TRICLINIC && domain->triclinic == 1)
error->all(FLERR,"Change_box operation is invalid");
if (style == ORTHO &&
(domain->xy != 0.0 || domain->yz != 0.0 || domain->xz != 0.0))
error->all(FLERR,"Cannot change box to orthogonal when tilt is non-zero");
// group
if (output->ndump)
error->all(FLERR,"Cannot change box with dumps defined");
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->no_change_box)
error->all(FLERR,"Cannot change box with certain fixes defined");
int igroup = group->find(arg[0]);
if (igroup == -1) error->all(FLERR,"Could not find change_box group ID");
int groupbit = group->bitmask[igroup];
if (style == ORTHO) domain->triclinic = 0;
else domain->triclinic = 1;
domain->xy = domain->yz = domain->xz = 0.0;
// parse operation arguments
// allocate ops to max possible length
// volume option does not increment nops
domain->set_global_box();
if (style == TRICLINIC) domain->set_lamda_box();
domain->set_local_box();
int dimension = domain->dimension;
ops = new Operation[narg-1];
nops = 0;
int index;
int iarg = 1;
while (iarg < narg) {
if (strcmp(arg[iarg],"x") == 0 || strcmp(arg[iarg],"y") == 0 ||
strcmp(arg[iarg],"z") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = XYZ;
if (strcmp(arg[iarg],"x") == 0) ops[nops].dim = X;
else if (strcmp(arg[iarg],"y") == 0) ops[nops].dim = Y;
else if (strcmp(arg[iarg],"z") == 0) ops[nops].dim = Z;
if (dimension == 2 && ops[nops].dim == Z)
error->all(FLERR,"Cannot change_box in z dimension for 2d simulation");
if (strcmp(arg[iarg+1],"final") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].flavor = FINAL;
ops[nops].flo = atof(arg[iarg+2]);
ops[nops].fhi = atof(arg[iarg+3]);
ops[nops].vdim1 = ops[nops].vdim2 = -1;
nops++;
iarg += 4;
} else if (strcmp(arg[iarg+1],"delta") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].flavor = DELTA;
ops[nops].dlo = atof(arg[iarg+2]);
ops[nops].dhi = atof(arg[iarg+3]);
ops[nops].vdim1 = ops[nops].vdim2 = -1;
nops++;
iarg += 4;
} else if (strcmp(arg[iarg+1],"scale") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].flavor = SCALE;
ops[nops].scale = atof(arg[iarg+2]);
ops[nops].vdim1 = ops[nops].vdim2 = -1;
nops++;
iarg += 3;
} else if (strcmp(arg[iarg+1],"volume") == 0) {
if (nops == 0 || ops[nops-1].style != XYZ ||
ops[nops].dim == ops[nops-1].dim)
error->all(FLERR,"Change_box volume used incorrectly");
if (ops[nops-1].vdim2 >= 0)
error->all(FLERR,"Change_box volume used incorrectly");
else if (ops[nops-1].vdim1 >= 0) ops[nops-1].vdim2 = ops[nops].dim;
else ops[nops-1].vdim1 = ops[nops].dim;
iarg += 2;
} else error->all(FLERR,"Illegal change_box command");
} else if (strcmp(arg[iarg],"xy") == 0 || strcmp(arg[iarg],"xz") == 0 ||
strcmp(arg[iarg],"yz") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = TILT;
if (strcmp(arg[iarg],"xy") == 0) ops[nops].dim = XY;
else if (strcmp(arg[iarg],"xz") == 0) ops[nops].dim = XZ;
else if (strcmp(arg[iarg],"yz") == 0) ops[nops].dim = YZ;
if (dimension == 2 && (ops[nops].dim == XZ || ops[nops].dim == YZ))
error->all(FLERR,"Cannot change_box in xz or yz for 2d simulation");
if (strcmp(arg[iarg+1],"final") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].flavor = FINAL;
ops[nops].ftilt = atof(arg[iarg+2]);
nops++;
iarg += 3;
} else if (strcmp(arg[iarg+1],"delta") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].flavor = DELTA;
ops[nops].dtilt = atof(arg[iarg+2]);
nops++;
iarg += 3;
} else error->all(FLERR,"Illegal change_box command");
} else if (strcmp(arg[iarg],"boundary") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = BOUNDARY;
ops[nops].boundindex = iarg+1;
nops++;
iarg += 4;
} else if (strcmp(arg[iarg],"ortho") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = ORTHO;
nops++;
iarg += 1;
} else if (strcmp(arg[iarg],"triclinic") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = TRICLINIC;
nops++;
iarg += 1;
} else if (strcmp(arg[iarg],"set") == 0) {
if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = SET;
nops++;
iarg += 1;
} else if (strcmp(arg[iarg],"remap") == 0) {
if (iarg+1 > narg) error->all(FLERR,"Illegal change_box command");
ops[nops].style = REMAP;
nops++;
iarg += 1;
} else break;
}
if (nops == 0) error->all(FLERR,"Illegal change_box command");
// read options from end of input line
options(narg-iarg,&arg[iarg]);
// compute scale factors if FINAL,DELTA used since they have distance units
int flag = 0;
for (int i = 0; i < nops; i++)
if (ops[i].style == FINAL || ops[i].style == DELTA) flag = 1;
if (flag && scaleflag && domain->lattice == NULL)
error->all(FLERR,"Use of change_box with undefined lattice");
if (flag && scaleflag) {
scale[0] = domain->lattice->xlattice;
scale[1] = domain->lattice->ylattice;
scale[2] = domain->lattice->zlattice;
}
else scale[0] = scale[1] = scale[2] = 1.0;
// perform sequence of operations
// first insure atoms are in current box & update box via shrink-wrap
// then save current box state so can remap atoms from it
domain->pbc();
domain->reset_box();
save_box_state();
for (int i = 0; i < nops; i++) {
if (ops[i].style == XYZ) {
double volume;
if (domain->dimension == 2) volume = domain->xprd * domain->yprd;
else volume = domain->xprd * domain->yprd * domain->zprd;
if (ops[i].flavor == FINAL) {
domain->boxlo[ops[i].dim] = scale[ops[i].dim]*ops[i].flo;
domain->boxhi[ops[i].dim] = scale[ops[i].dim]*ops[i].fhi;
if (ops[i].vdim1)
volume_preserve(ops[i].vdim1,ops[i].vdim2,volume);
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
} else if (ops[i].flavor == DELTA) {
domain->boxlo[ops[i].dim] += scale[ops[i].dim]*ops[i].dlo;
domain->boxhi[ops[i].dim] += scale[ops[i].dim]*ops[i].dhi;
if (ops[i].vdim1)
volume_preserve(ops[i].vdim1,ops[i].vdim2,volume);
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
} else if (ops[i].flavor == SCALE) {
double mid = 0.5 *
(domain->boxlo[ops[i].dim] + domain->boxhi[ops[i].dim]);
double delta = domain->boxlo[ops[i].dim] - mid;
domain->boxlo[ops[i].dim] = mid + ops[i].scale*delta;
delta = domain->boxhi[ops[i].dim] - mid;
domain->boxhi[ops[i].dim] = mid + ops[i].scale*delta;
if (ops[i].vdim1)
volume_preserve(ops[i].vdim1,ops[i].vdim2,volume);
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
}
} else if (ops[i].style == TILT) {
if (domain->triclinic == 0)
error->all(FLERR,"Cannot change box tilt factors for orthogonal box");
if (ops[i].flavor == FINAL) {
if (ops[i].dim == XY) domain->xy = scale[X]*ops[i].ftilt;
else if (ops[i].dim == XZ) domain->xz = scale[X]*ops[i].ftilt;
else if (ops[i].dim == YZ) domain->yz = scale[Y]*ops[i].ftilt;
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
} else if (ops[i].flavor == DELTA) {
if (ops[i].dim == XY) domain->xy += scale[X]*ops[i].dtilt;
else if (ops[i].dim == XZ) domain->xz += scale[X]*ops[i].dtilt;
else if (ops[i].dim == YZ) domain->yz += scale[Y]*ops[i].dtilt;
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
}
} else if (ops[i].style == BOUNDARY) {
domain->set_boundary(3,&arg[ops[i].boundindex],1);
if (domain->dimension == 2 && domain->zperiodic == 0)
error->all(FLERR,
"Cannot run 2d simulation with nonperiodic Z dimension");
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
} else if (ops[i].style == ORTHO) {
if (domain->xy != 0.0 || domain->yz != 0.0 || domain->xz != 0.0)
error->all(FLERR,
"Cannot change box to orthogonal when tilt is non-zero");
if (output->ndump)
error->all(FLERR,
"Cannot change box ortho/triclinic with dumps defined");
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->no_change_box)
error->all(FLERR,
"Cannot change box ortho/triclinic with "
"certain fixes defined");
domain->triclinic = 0;
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
} else if (ops[i].style == TRICLINIC) {
if (output->ndump)
error->all(FLERR,
"Cannot change box ortho/triclinic with dumps defined");
for (int i = 0; i < modify->nfix; i++)
if (modify->fix[i]->no_change_box)
error->all(FLERR,
"Cannot change box ortho/triclinic with "
"certain fixes defined");
domain->triclinic = 1;
domain->set_lamda_box();
domain->set_initial_box();
domain->set_global_box();
domain->set_local_box();
domain->print_box(" ");
} else if (ops[i].style == SET) {
save_box_state();
} else if (ops[i].style == REMAP) {
// convert atoms to lamda coords, using last box state
// convert atoms back to box coords, using current box state
// save current box state
double **x = atom->x;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
domain->x2lamda(x[i],x[i],boxlo,h_inv);
for (i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
domain->lamda2x(x[i],x[i]);
save_box_state();
}
}
// clean up
delete [] ops;
// apply shrink-wrap boundary conditions
if (domain->nonperiodic == 2) domain->reset_box();
// move atoms back inside simulation box and to new processors
// use remap() instead of pbc()
// in case box moved a long distance relative to atoms
// use irregular() in case box moved a long distance relative to atoms
double **x = atom->x;
int *image = atom->image;
int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]);
if (domain->triclinic) domain->x2lamda(atom->nlocal);
domain->reset_box();
Irregular *irregular = new Irregular(lmp);
irregular->migrate_atoms();
delete irregular;
if (domain->triclinic) domain->lamda2x(atom->nlocal);
// check if any atoms were lost
bigint natoms;
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (natoms != atom->natoms) {
char str[128];
sprintf(str,"Lost atoms via change_box: original " BIGINT_FORMAT
" current " BIGINT_FORMAT,atom->natoms,natoms);
error->warning(FLERR,str);
}
}
/* ----------------------------------------------------------------------
parse optional parameters
------------------------------------------------------------------------- */
void ChangeBox::options(int narg, char **arg)
{
if (narg < 0) error->all(FLERR,"Illegal change_box command");
scaleflag = 1;
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"units") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal change_box command");
if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0;
else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1;
else error->all(FLERR,"Illegal change_box command");
iarg += 2;
} else error->all(FLERR,"Illegal change_box command");
}
}
/* ----------------------------------------------------------------------
save current box state for converting atoms to lamda coords
------------------------------------------------------------------------- */
void ChangeBox::save_box_state()
{
boxlo[0] = domain->boxlo[0];
boxlo[1] = domain->boxlo[1];
boxlo[2] = domain->boxlo[2];
for (int i = 0; i < 6; i++)
h_inv[i] = domain->h_inv[i];
}
/* ----------------------------------------------------------------------
reset box lengths of dim1/2 to preserve old volume
which changed due to change in 3rd dim
------------------------------------------------------------------------- */
void ChangeBox::volume_preserve(int dim1, int dim2, double oldvol)
{
double newvol;
if (domain->dimension == 2) newvol = domain->xprd * domain->yprd;
else newvol = domain->xprd * domain->yprd * domain->zprd;
double scale = oldvol/newvol;
double mid,delta;
// change dim1 only
if (dim2 < 0) {
mid = 0.5 * (domain->boxlo[dim1] + domain->boxhi[dim1]);
delta = domain->boxlo[dim1] - mid;
domain->boxlo[dim1] = mid + scale*delta;
delta = domain->boxhi[dim1] - mid;
domain->boxhi[dim1] = mid + scale*delta;
// change dim1 and dim2, keeping their relative aspect constant
// means both are scaled by sqrt(scale)
} else {
mid = 0.5 * (domain->boxlo[dim1] + domain->boxhi[dim1]);
delta = domain->boxlo[dim1] - mid;
domain->boxlo[dim1] = mid + sqrt(scale)*delta;
delta = domain->boxhi[dim1] - mid;
domain->boxhi[dim1] = mid + sqrt(scale)*delta;
mid = 0.5 * (domain->boxlo[dim2] + domain->boxhi[dim2]);
delta = domain->boxlo[dim2] - mid;
domain->boxlo[dim2] = mid + sqrt(scale)*delta;
delta = domain->boxhi[dim2] - mid;
domain->boxhi[dim2] = mid + sqrt(scale)*delta;
}
}

View File

@ -28,6 +28,28 @@ class ChangeBox : protected Pointers {
public:
ChangeBox(class LAMMPS *);
void command(int, char **);
private:
int scaleflag;
double scale[3];
struct Operation {
int style,flavor;
int dim,boundindex;
int vdim1,vdim2;
double flo,fhi,ftilt;
double dlo,dhi,dtilt;
double scale;
};
Operation *ops;
int nops;
double boxlo[3],h_inv[6];
void options(int, char **);
void save_box_state();
void volume_preserve(int, int, double);
};
}
@ -37,7 +59,7 @@ class ChangeBox : protected Pointers {
/* ERROR/WARNING messages:
E: Change_box command before simulation box is defined
E: Displace_box command before simulation box is defined
Self-explanatory.
@ -47,22 +69,41 @@ Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Change_box operation is invalid
E: Cannot displace_box after reading restart file with per-atom info
Cannot change orthogonal box to orthogonal or a triclinic box to
triclinic.
This is because the restart file info cannot be migrated with the
atoms. You can get around this by performing a 0-timestep run which
will assign the restart file info to actual atoms.
E: Cannot change box to orthogonal when tilt is non-zero
E: Could not find displace_box group ID
Self-explanatory
Group ID used in the displace_box command does not exist.
E: Cannot change box with dumps defined
E: Displace_box tilt factors require triclinic box
Cannot use tilt factors unless the simulation box is
non-orthogonal.
E: Cannot displace_box on a non-periodic boundary
Self-explanatory.
E: Cannot change box with certain fixes defined
E: Use of displace_box with undefined lattice
The change_box command cannot be used when fix ave/spatial or
fix/deform are defined .
Must use lattice command with displace_box command if units option is
set to lattice.
E: Fix deform volume setting is invalid
Cannot use volume style unless other dimensions are being controlled.
E: Induced tilt by displace_box is too large
The final tilt value must be between -1/2 and 1/2 of the perpendicular
box length.
E: Lost atoms via displace_box: original %ld current %ld
UNDOCUMENTED
*/

View File

@ -1,418 +0,0 @@
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#include "lmptype.h"
#include "mpi.h"
#include "math.h"
#include "stdlib.h"
#include "string.h"
#include "displace_box.h"
#include "atom.h"
#include "modify.h"
#include "domain.h"
#include "lattice.h"
#include "comm.h"
#include "irregular.h"
#include "group.h"
#include "error.h"
using namespace LAMMPS_NS;
enum{NONE,FINAL,DELTA,SCALE,VOLUME};
enum{ONE_FROM_ONE,ONE_FROM_TWO,TWO_FROM_ONE};
enum{NO_REMAP,X_REMAP};
/* ---------------------------------------------------------------------- */
DisplaceBox::DisplaceBox(LAMMPS *lmp) : Pointers(lmp) {}
/* ---------------------------------------------------------------------- */
void DisplaceBox::command(int narg, char **arg)
{
int i;
if (domain->box_exist == 0)
error->all(FLERR,"Displace_box command before simulation box is defined");
if (narg < 2) error->all(FLERR,"Illegal displace_box command");
if (modify->nfix_restart_peratom)
error->all(FLERR,"Cannot displace_box after "
"reading restart file with per-atom info");
if (comm->me == 0 && screen) fprintf(screen,"Displacing box ...\n");
// group
int igroup = group->find(arg[0]);
if (igroup == -1) error->all(FLERR,"Could not find displace_box group ID");
int groupbit = group->bitmask[igroup];
// set defaults
set = new Set[6];
set[0].style = set[1].style = set[2].style =
set[3].style = set[4].style = set[5].style = NONE;
// parse arguments
int triclinic = domain->triclinic;
int index;
int iarg = 1;
while (iarg < narg) {
if (strcmp(arg[iarg],"x") == 0 || strcmp(arg[iarg],"y") == 0 ||
strcmp(arg[iarg],"z") == 0) {
if (strcmp(arg[iarg],"x") == 0) index = 0;
else if (strcmp(arg[iarg],"y") == 0) index = 1;
else if (strcmp(arg[iarg],"z") == 0) index = 2;
if (iarg+2 > narg) error->all(FLERR,"Illegal displace_box command");
if (strcmp(arg[iarg+1],"final") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal displace_box command");
set[index].style = FINAL;
set[index].flo = atof(arg[iarg+2]);
set[index].fhi = atof(arg[iarg+3]);
iarg += 4;
} else if (strcmp(arg[iarg+1],"delta") == 0) {
if (iarg+4 > narg) error->all(FLERR,"Illegal displace_box command");
set[index].style = DELTA;
set[index].dlo = atof(arg[iarg+2]);
set[index].dhi = atof(arg[iarg+3]);
iarg += 4;
} else if (strcmp(arg[iarg+1],"scale") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal displace_box command");
set[index].style = SCALE;
set[index].scale = atof(arg[iarg+2]);
iarg += 3;
} else if (strcmp(arg[iarg+1],"volume") == 0) {
set[index].style = VOLUME;
iarg += 2;
} else error->all(FLERR,"Illegal displace_box command");
} else if (strcmp(arg[iarg],"xy") == 0 || strcmp(arg[iarg],"xz") == 0 ||
strcmp(arg[iarg],"yz") == 0) {
if (triclinic == 0)
error->all(FLERR,"Displace_box tilt factors require triclinic box");
if (strcmp(arg[iarg],"xy") == 0) index = 5;
else if (strcmp(arg[iarg],"xz") == 0) index = 4;
else if (strcmp(arg[iarg],"yz") == 0) index = 3;
if (iarg+2 > narg) error->all(FLERR,"Illegal displace_box command");
if (strcmp(arg[iarg+1],"final") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal displace_box command");
set[index].style = FINAL;
set[index].ftilt = atof(arg[iarg+2]);
iarg += 3;
} else if (strcmp(arg[iarg+1],"delta") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal displace_box command");
set[index].style = DELTA;
set[index].dtilt = atof(arg[iarg+2]);
iarg += 3;
} else error->all(FLERR,"Illegal displace_box command");
} else break;
}
// read options from end of input line
options(narg-iarg,&arg[iarg]);
// check periodicity
if ((set[0].style && domain->xperiodic == 0) ||
(set[1].style && domain->yperiodic == 0) ||
(set[2].style && domain->zperiodic == 0))
error->all(FLERR,"Cannot displace_box on a non-periodic boundary");
if (set[3].style && (domain->yperiodic == 0 || domain->zperiodic == 0))
error->all(FLERR,"Cannot displace_box on a non-periodic boundary");
if (set[4].style && (domain->xperiodic == 0 || domain->zperiodic == 0))
error->all(FLERR,"Cannot displace_box on a non-periodic boundary");
if (set[5].style && (domain->xperiodic == 0 || domain->yperiodic == 0))
error->all(FLERR,"Cannot displace_box on a non-periodic boundary");
// apply scaling to FINAL,DELTA since they have distance units
int flag = 0;
for (int i = 0; i < 6; i++)
if (set[i].style == FINAL || set[i].style == DELTA) flag = 1;
if (flag && scaleflag && domain->lattice == NULL)
error->all(FLERR,"Use of displace_box with undefined lattice");
double xscale,yscale,zscale;
if (flag && scaleflag) {
xscale = domain->lattice->xlattice;
yscale = domain->lattice->ylattice;
zscale = domain->lattice->zlattice;
}
else xscale = yscale = zscale = 1.0;
// for 3,4,5 scaling is in 1st dimension, e.g. x for xz
double map[6];
map[0] = xscale; map[1] = yscale; map[2] = zscale;
map[3] = yscale; map[4] = xscale; map[5] = xscale;
for (int i = 0; i < 3; i++) {
if (set[i].style == FINAL) {
set[i].flo *= map[i];
set[i].fhi *= map[i];
} else if (set[i].style == DELTA) {
set[i].dlo *= map[i];
set[i].dhi *= map[i];
}
}
for (int i = 3; i < 6; i++) {
if (set[i].style == FINAL) set[i].ftilt *= map[i];
else if (set[i].style == DELTA) set[i].dtilt *= map[i];
}
// set initial/final values for box size and shape
// final = initial if no setting
for (int i = 0; i < 3; i++) {
set[i].lo_stop = set[i].lo_start = domain->boxlo[i];
set[i].hi_stop = set[i].hi_start = domain->boxhi[i];
if (set[i].style == FINAL) {
set[i].lo_stop = set[i].flo;
set[i].hi_stop = set[i].fhi;
} else if (set[i].style == DELTA) {
set[i].lo_stop = set[i].lo_start + set[i].dlo;
set[i].hi_stop = set[i].hi_start + set[i].dhi;
} else if (set[i].style == SCALE) {
set[i].lo_stop = 0.5*(set[i].lo_start+set[i].hi_start) -
0.5*set[i].scale*(set[i].hi_start-set[i].lo_start);
set[i].hi_stop = 0.5*(set[i].lo_start+set[i].hi_start) +
0.5*set[i].scale*(set[i].hi_start-set[i].lo_start);
}
}
for (int i = 3; i < 6; i++) {
if (i == 5) set[i].tilt_start = domain->xy;
else if (i == 4) set[i].tilt_start = domain->xz;
else if (i == 3) set[i].tilt_start = domain->yz;
set[i].tilt_stop = set[i].tilt_start;
if (set[i].style == FINAL) {
set[i].tilt_stop = set[i].ftilt;
} else if (set[i].style == DELTA) {
set[i].tilt_stop = set[i].tilt_start + set[i].dtilt;
}
}
// for VOLUME, setup links to other dims
// fixed, dynamic1,2, vol_start
for (int i = 0; i < 3; i++) {
set[i].vol_start = domain->xprd * domain->yprd * domain->zprd;
if (set[i].style != VOLUME) continue;
int other1 = (i+1) % 3;
int other2 = (i+2) % 3;
if (set[other1].style == NONE) {
if (set[other2].style == NONE || set[other2].style == VOLUME)
error->all(FLERR,"Fix deform volume setting is invalid");
set[i].substyle = ONE_FROM_ONE;
set[i].fixed = other1;
set[i].dynamic1 = other2;
} else if (set[other2].style == NONE) {
if (set[other1].style == NONE || set[other1].style == VOLUME)
error->all(FLERR,"Fix deform volume setting is invalid");
set[i].substyle = ONE_FROM_ONE;
set[i].fixed = other2;
set[i].dynamic1 = other1;
} else if (set[other1].style == VOLUME) {
if (set[other2].style == NONE || set[other2].style == VOLUME)
error->all(FLERR,"Fix deform volume setting is invalid");
set[i].substyle = TWO_FROM_ONE;
set[i].fixed = other1;
set[i].dynamic1 = other2;
} else if (set[other2].style == VOLUME) {
if (set[other1].style == NONE || set[other1].style == VOLUME)
error->all(FLERR,"Fix deform volume setting is invalid");
set[i].substyle = TWO_FROM_ONE;
set[i].fixed = other2;
set[i].dynamic1 = other1;
} else {
set[i].substyle = ONE_FROM_TWO;
set[i].dynamic2 = other1;
set[i].dynamic2 = other2;
}
}
// set new box size for VOLUME dims that are linked to other dims
for (int i = 0; i < 3; i++) {
if (set[i].style != VOLUME) continue;
if (set[i].substyle == ONE_FROM_ONE) {
set[i].lo_stop = 0.5*(set[i].lo_start+set[i].hi_start) -
0.5*(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].fixed].hi_start-set[set[i].fixed].lo_start));
set[i].hi_stop = 0.5*(set[i].lo_start+set[i].hi_start) +
0.5*(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].fixed].hi_start-set[set[i].fixed].lo_start));
} else if (set[i].substyle == ONE_FROM_TWO) {
set[i].lo_stop = 0.5*(set[i].lo_start+set[i].hi_start) -
0.5*(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].dynamic2].hi_stop -
set[set[i].dynamic2].lo_stop));
set[i].hi_stop = 0.5*(set[i].lo_start+set[i].hi_start) +
0.5*(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].dynamic2].hi_stop -
set[set[i].dynamic2].lo_stop));
} else if (set[i].substyle == TWO_FROM_ONE) {
set[i].lo_stop = 0.5*(set[i].lo_start+set[i].hi_start) -
0.5*sqrt(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].fixed].hi_start -
set[set[i].fixed].lo_start) *
(set[i].hi_start - set[i].lo_start));
set[i].hi_stop = 0.5*(set[i].lo_start+set[i].hi_start) +
0.5*sqrt(set[i].vol_start /
(set[set[i].dynamic1].hi_stop -
set[set[i].dynamic1].lo_stop) /
(set[set[i].fixed].hi_start -
set[set[i].fixed].lo_start) *
(set[i].hi_start - set[i].lo_start));
}
}
// check that final tilt is not illegal value
double xprd_stop = set[0].hi_stop - set[0].lo_stop;
double yprd_stop = set[0].hi_stop - set[0].lo_stop;
if (set[3].tilt_stop < -0.5*yprd_stop || set[3].tilt_stop > 0.5*yprd_stop ||
set[4].tilt_stop < -0.5*xprd_stop || set[4].tilt_stop > 0.5*xprd_stop ||
set[5].tilt_stop < -0.5*xprd_stop || set[5].tilt_stop > 0.5*xprd_stop)
error->all(FLERR,"Induced tilt by displace_box is too large");
// convert atoms to lamda coords
if (remapflag == X_REMAP) {
double **x = atom->x;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
domain->x2lamda(x[i],x[i]);
}
// reset global and local box to new size/shape
domain->boxlo[0] = set[0].lo_stop;
domain->boxlo[1] = set[1].lo_stop;
domain->boxlo[2] = set[2].lo_stop;
domain->boxhi[0] = set[0].hi_stop;
domain->boxhi[1] = set[1].hi_stop;
domain->boxhi[2] = set[2].hi_stop;
if (triclinic) {
domain->yz = set[3].tilt_stop;
domain->xz = set[4].tilt_stop;
domain->xy = set[5].tilt_stop;
}
domain->set_global_box();
domain->set_local_box();
// convert atoms back to box coords
if (remapflag == X_REMAP) {
double **x = atom->x;
int *mask = atom->mask;
int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++)
if (mask[i] & groupbit)
domain->lamda2x(x[i],x[i]);
}
// move atoms back inside simulation box and to new processors
// use remap() instead of pbc()
// in case box moved a long distance relative to atoms
// use irregular() in case box moved a long distance relative to atoms
double **x = atom->x;
int *image = atom->image;
int nlocal = atom->nlocal;
for (i = 0; i < nlocal; i++) domain->remap(x[i],image[i]);
if (domain->triclinic) domain->x2lamda(atom->nlocal);
domain->reset_box();
Irregular *irregular = new Irregular(lmp);
irregular->migrate_atoms();
delete irregular;
if (domain->triclinic) domain->lamda2x(atom->nlocal);
// clean up
delete [] set;
// check if any atoms were lost
bigint natoms;
bigint nblocal = atom->nlocal;
MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (natoms != atom->natoms) {
char str[128];
sprintf(str,"Lost atoms via displace_box: original " BIGINT_FORMAT
" current " BIGINT_FORMAT,atom->natoms,natoms);
error->all(FLERR,str);
}
}
/* ----------------------------------------------------------------------
parse optional parameters at end of displace_box input line
------------------------------------------------------------------------- */
void DisplaceBox::options(int narg, char **arg)
{
if (narg < 0) error->all(FLERR,"Illegal displace_box command");
remapflag = X_REMAP;
scaleflag = 1;
int iarg = 0;
while (iarg < narg) {
if (strcmp(arg[iarg],"remap") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal displace_box command");
if (strcmp(arg[iarg+1],"x") == 0) remapflag = X_REMAP;
else if (strcmp(arg[iarg+1],"none") == 0) remapflag = NO_REMAP;
else error->all(FLERR,"Illegal displace_box command");
iarg += 2;
} else if (strcmp(arg[iarg],"units") == 0) {
if (iarg+2 > narg) error->all(FLERR,"Illegal displace_box command");
if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0;
else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1;
else error->all(FLERR,"Illegal displace_box command");
iarg += 2;
} else error->all(FLERR,"Illegal displace_box command");
}
}

View File

@ -1,105 +0,0 @@
/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifdef COMMAND_CLASS
CommandStyle(displace_box,DisplaceBox)
#else
#ifndef LMP_DISPLACE_BOX_H
#define LMP_DISPLACE_BOX_H
#include "pointers.h"
namespace LAMMPS_NS {
class DisplaceBox : protected Pointers {
public:
DisplaceBox(class LAMMPS *);
void command(int, char **);
private:
int remapflag,scaleflag;
struct Set {
int style,substyle;
double flo,fhi,ftilt;
double dlo,dhi,dtilt;
double scale;
double lo_start,hi_start;
double lo_stop,hi_stop;
double tilt_start,tilt_stop;
double vol_start;
int fixed,dynamic1,dynamic2;
};
Set *set;
void options(int, char **);
};
}
#endif
#endif
/* ERROR/WARNING messages:
E: Displace_box command before simulation box is defined
Self-explanatory.
E: Illegal ... command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Cannot displace_box after reading restart file with per-atom info
This is because the restart file info cannot be migrated with the
atoms. You can get around this by performing a 0-timestep run which
will assign the restart file info to actual atoms.
E: Could not find displace_box group ID
Group ID used in the displace_box command does not exist.
E: Displace_box tilt factors require triclinic box
Cannot use tilt factors unless the simulation box is
non-orthogonal.
E: Cannot displace_box on a non-periodic boundary
Self-explanatory.
E: Use of displace_box with undefined lattice
Must use lattice command with displace_box command if units option is
set to lattice.
E: Fix deform volume setting is invalid
Cannot use volume style unless other dimensions are being controlled.
E: Induced tilt by displace_box is too large
The final tilt value must be between -1/2 and 1/2 of the perpendicular
box length.
E: Lost atoms via displace_box: original %ld current %ld
UNDOCUMENTED
*/

View File

@ -1121,10 +1121,12 @@ int Domain::find_region(char *name)
}
/* ----------------------------------------------------------------------
boundary settings from the input script
(re)set boundary settings
flag = 0, called from the input script
flag = 1, called from change box command
------------------------------------------------------------------------- */
void Domain::set_boundary(int narg, char **arg)
void Domain::set_boundary(int narg, char **arg, int flag)
{
if (narg != 3) error->all(FLERR,"Illegal boundary command");
@ -1139,7 +1141,10 @@ void Domain::set_boundary(int narg, char **arg)
else if (c == 'f') boundary[idim][iside] = 1;
else if (c == 's') boundary[idim][iside] = 2;
else if (c == 'm') boundary[idim][iside] = 3;
else error->all(FLERR,"Illegal boundary command");
else {
if (flag == 0) error->all(FLERR,"Illegal boundary command");
if (flag == 1) error->all(FLERR,"Illegal change_box command");
}
}
for (int idim = 0; idim < 3; idim++)
@ -1269,6 +1274,26 @@ void Domain::x2lamda(double *x, double *lamda)
lamda[2] = h_inv[2]*delta[2];
}
/* ----------------------------------------------------------------------
convert box coords to triclinic 0-1 lamda coords for one atom
use my_boxlo & my_h_inv stored by caller for previous state of box
lamda = H^-1 (x - x0)
x and lamda can point to same 3-vector
------------------------------------------------------------------------- */
void Domain::x2lamda(double *x, double *lamda,
double *my_boxlo, double *my_h_inv)
{
double delta[3];
delta[0] = x[0] - my_boxlo[0];
delta[1] = x[1] - my_boxlo[1];
delta[2] = x[2] - my_boxlo[2];
lamda[0] = my_h_inv[0]*delta[0] + my_h_inv[5]*delta[1] + my_h_inv[4]*delta[2];
lamda[1] = my_h_inv[1]*delta[1] + my_h_inv[3]*delta[2];
lamda[2] = my_h_inv[2]*delta[2];
}
/* ----------------------------------------------------------------------
convert 8 lamda corner pts of lo/hi box to box coords
return bboxlo/hi = bounding box around 8 corner pts in box coords

View File

@ -107,7 +107,7 @@ class Domain : protected Pointers {
void add_region(int, char **);
void delete_region(int, char **);
int find_region(char *);
void set_boundary(int, char **);
void set_boundary(int, char **, int);
void print_box(const char *);
// load balancing
@ -118,6 +118,7 @@ class Domain : protected Pointers {
virtual void x2lamda(int);
void lamda2x(double *, double *);
void x2lamda(double *, double *);
void x2lamda(double *, double *, double *, double *);
void bbox(double *, double *, double *, double *);
void box_corners();

View File

@ -930,7 +930,7 @@ void Input::boundary()
{
if (domain->box_exist)
error->all(FLERR,"Boundary command after simulation box is defined");
domain->set_boundary(narg,arg);
domain->set_boundary(narg,arg,0);
}
/* ---------------------------------------------------------------------- */

View File

@ -16,6 +16,7 @@
#include "string.h"
#include "ctype.h"
#include "pair_hybrid.h"
#include "style_pair.h"
#include "atom.h"
#include "force.h"
#include "pair.h"
@ -763,4 +764,3 @@ double PairHybrid::memory_usage()
for (int m = 0; m < nstyles; m++) bytes += styles[m]->memory_usage();
return bytes;
}

View File

@ -622,8 +622,8 @@ void PairTable::compute_table(Table *tb)
// ep0,epn = dE/dr at inner and at cut
double ep0 = - tb->f[0];
double epn = - tb->f[tlm1];
double ep0 = - tb->f[0] / (2.0 * sqrt(tb->innersq));
double epn = - tb->f[tlm1] / (2.0 * tb->cut);
spline(tb->rsq,tb->e,tablength,ep0,epn,tb->e2);
// fp0,fpn = dh/dg at inner and at cut

View File

@ -464,7 +464,8 @@ void ReadRestart::header()
if (flag == VERSION) {
char *version = read_char();
if (strcmp(version,universe->version) != 0 && me == 0) {
error->warning(FLERR,"Restart file version does not match LAMMPS version");
error->warning(FLERR,
"Restart file version does not match LAMMPS version");
if (screen) fprintf(screen," restart file = %s, LAMMPS = %s\n",
version,universe->version);
}
@ -581,7 +582,8 @@ void ReadRestart::header()
boundary[2][0] != domain->boundary[2][0] ||
boundary[2][1] != domain->boundary[2][1]) {
if (me == 0)
error->warning(FLERR,"Restart file used different boundary settings, "
error->warning(FLERR,
"Restart file used different boundary settings, "
"using restart file values");
}
}

View File

@ -1 +1 @@
#define LAMMPS_VERSION "8 Feb 2012"
#define LAMMPS_VERSION "10 Feb 2012"