diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index fcdc83034..0553cddfe 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -1,1079 +1,1080 @@ "Previous Section"_Section_start.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_packages.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 3. Commands :h3 This section describes how a LAMMPS input script is formatted and the input script commands used to define a LAMMPS simulation. 3.1 "LAMMPS input script"_#cmd_1 3.2 "Parsing rules"_#cmd_2 3.3 "Input script structure"_#cmd_3 3.4 "Commands listed by category"_#cmd_4 3.5 "Commands listed alphabetically"_#cmd_5 :all(b) :line :line 3.1 LAMMPS input script :link(cmd_1),h4 LAMMPS executes by reading commands from a input script (text file), one line at a time. When the input script ends, LAMMPS exits. Each command causes LAMMPS to take some action. It may set an internal variable, read in a file, or run a simulation. Most commands have default settings, which means you only need to use the command if you wish to change the default. In many cases, the ordering of commands in an input script is not important. However the following rules apply: (1) LAMMPS does not read your entire input script and then perform a simulation with all the settings. Rather, the input script is read one line at a time and each command takes effect when it is read. Thus this sequence of commands: timestep 0.5 run 100 run 100 :pre does something different than this sequence: run 100 timestep 0.5 run 100 :pre In the first case, the specified timestep (0.5 fmsec) is used for two simulations of 100 timesteps each. In the 2nd case, the default timestep (1.0 fmsec) is used for the 1st 100 step simulation and a 0.5 fmsec timestep is used for the 2nd one. (2) Some commands are only valid when they follow other commands. For example you cannot set the temperature of a group of atoms until atoms have been defined and a group command is used to define which atoms belong to the group. (3) Sometimes command B will use values that can be set by command A. This means command A must precede command B in the input script if it is to have the desired effect. For example, the "read_data"_read_data.html command initializes the system by setting up the simulation box and assigning atoms to processors. If default values are not desired, the "processors"_processors.html and "boundary"_boundary.html commands need to be used before read_data to tell LAMMPS how to map processors to the simulation box. Many input script errors are detected by LAMMPS and an ERROR or WARNING message is printed. "This section"_Section_errors.html gives more information on what errors mean. The documentation for each command lists restrictions on how the command can be used. :line 3.2 Parsing rules :link(cmd_2),h4 Each non-blank line in the input script is treated as a command. LAMMPS commands are case sensitive. Command names are lower-case, as are specified command arguments. Upper case letters may be used in file names or user-chosen ID strings. Here is how each line in the input script is parsed by LAMMPS: (1) If the last printable character on the line is a "&" character, the command is assumed to continue on the next line. The next line is concatenated to the previous line by removing the "&" character and line break. This allows long commands to be continued across two or more lines. See the discussion of triple quotes in (6) for how to continue a command across multiple line without using "&" characters. (2) All characters from the first "#" character onward are treated as comment and discarded. See an exception in (6). Note that a comment after a trailing "&" character will prevent the command from continuing on the next line. Also note that for multi-line commands a single leading "#" will comment out the entire command. (3) The line is searched repeatedly for $ characters, which indicate variables that are replaced with a text string. See an exception in (6). If the $ is followed by curly brackets, then the variable name is the text inside the curly brackets. If no curly brackets follow the $, then the variable name is the single character immediately following the $. Thus $\{myTemp\} and $x refer to variable names "myTemp" and "x". How the variable is converted to a text string depends on what style of variable it is; see the "variable"_variable doc page for details. It can be a variable that stores multiple text strings, and return one of them. The returned text string can be multiple "words" (space separated) which will then be interpreted as multiple arguments in the input command. The variable can also store a numeric formula which will be evaluated and its numeric result returned as a string. As a special case, if the $ is followed by parenthesis, then the text inside the parenthesis is treated as an "immediate" variable and evaluated as an "equal-style variable"_variable.html. This is a way to use numeric formulas in an input script without having to assign them to variable names. For example, these 3 input script lines: variable X equal (xlo+xhi)/2+sqrt(v_area) region 1 block $X 2 INF INF EDGE EDGE variable X delete :pre can be replaced by region 1 block $((xlo+xhi)/2+sqrt(v_area)) 2 INF INF EDGE EDGE :pre so that you do not have to define (or discard) a temporary variable X. Note that neither the curly-bracket or immediate form of variables can contain nested $ characters for other variables to substitute for. Thus you cannot do this: variable a equal 2 variable b2 equal 4 print "B2 = $\{b$a\}" :pre Nor can you specify this $($x-1.0) for an immediate variable, but you could use $(v_x-1.0), since the latter is valid syntax for an "equal-style variable"_variable.html. See the "variable"_variable.html command for more details of how strings are assigned to variables and evaluated, and how they can be used in input script commands. (4) The line is broken into "words" separated by whitespace (tabs, spaces). Note that words can thus contain letters, digits, underscores, or punctuation characters. (5) The first word is the command name. All successive words in the line are arguments. (6) If you want text with spaces to be treated as a single argument, it can be enclosed in either single or double or triple quotes. A long single argument enclosed in single or double quotes can span multiple lines if the "&" character is used, as described above. When the lines are concatenated together (and the "&" characters and line breaks removed), the text will become a single line. If you want multiple lines of an argument to retain their line breaks, the text can be enclosed in triple quotes, in which case "&" characters are not needed. For example: print "Volume = $v" print 'Volume = $v' if "$\{steps\} > 1000" then quit variable a string "red green blue & purple orange cyan" print """ System volume = $v System temperature = $t """ :pre In each case, the single, double, or triple quotes are removed when the single argument they enclose is stored internally. See the "dump modify format"_dump_modify.html, "print"_print.html, "if"_if.html, and "python"_python.html commands for examples. A "#" or "$" character that is between quotes will not be treated as a comment indicator in (2) or substituted for as a variable in (3). IMPORTANT NOTE: If the argument is itself a command that requires a quoted argument (e.g. using a "print"_print.html command as part of an "if"_if.html or "run every"_run.html command), then single, double, or triple quotes can be nested in the usual manner. See the doc pages for those commands for examples. Only one of level of nesting is allowed, but that should be sufficient for most use cases. :line 3.3 Input script structure :h4,link(cmd_3) This section describes the structure of a typical LAMMPS input script. The "examples" directory in the LAMMPS distribution contains many sample input scripts; the corresponding problems are discussed in "Section_example"_Section_example.html, and animated on the "LAMMPS WWW Site"_lws. A LAMMPS input script typically has 4 parts: Initialization Atom definition Settings Run a simulation :ol The last 2 parts can be repeated as many times as desired. I.e. run a simulation, change some settings, run some more, etc. Each of the 4 parts is now described in more detail. Remember that almost all the commands need only be used if a non-default value is desired. (1) Initialization Set parameters that need to be defined before atoms are created or read-in from a file. The relevant commands are "units"_units.html, "dimension"_dimension.html, "newton"_newton.html, "processors"_processors.html, "boundary"_boundary.html, "atom_style"_atom_style.html, "atom_modify"_atom_modify.html. If force-field parameters appear in the files that will be read, these commands tell LAMMPS what kinds of force fields are being used: "pair_style"_pair_style.html, "bond_style"_bond_style.html, "angle_style"_angle_style.html, "dihedral_style"_dihedral_style.html, "improper_style"_improper_style.html. (2) Atom definition There are 3 ways to define atoms in LAMMPS. Read them in from a data or restart file via the "read_data"_read_data.html or "read_restart"_read_restart.html commands. These files can contain molecular topology information. Or create atoms on a lattice (with no molecular topology), using these commands: "lattice"_lattice.html, "region"_region.html, "create_box"_create_box.html, "create_atoms"_create_atoms.html. The entire set of atoms can be duplicated to make a larger simulation using the "replicate"_replicate.html command. (3) Settings Once atoms and molecular topology are defined, a variety of settings can be specified: force field coefficients, simulation parameters, output options, etc. Force field coefficients are set by these commands (they can also be set in the read-in files): "pair_coeff"_pair_coeff.html, "bond_coeff"_bond_coeff.html, "angle_coeff"_angle_coeff.html, "dihedral_coeff"_dihedral_coeff.html, "improper_coeff"_improper_coeff.html, "kspace_style"_kspace_style.html, "dielectric"_dielectric.html, "special_bonds"_special_bonds.html. Various simulation parameters are set by these commands: "neighbor"_neighbor.html, "neigh_modify"_neigh_modify.html, "group"_group.html, "timestep"_timestep.html, "reset_timestep"_reset_timestep.html, "run_style"_run_style.html, "min_style"_min_style.html, "min_modify"_min_modify.html. Fixes impose a variety of boundary conditions, time integration, and diagnostic options. The "fix"_fix.html command comes in many flavors. Various computations can be specified for execution during a simulation using the "compute"_compute.html, "compute_modify"_compute_modify.html, and "variable"_variable.html commands. Output options are set by the "thermo"_thermo.html, "dump"_dump.html, and "restart"_restart.html commands. (4) Run a simulation A molecular dynamics simulation is run using the "run"_run.html command. Energy minimization (molecular statics) is performed using the "minimize"_minimize.html command. A parallel tempering (replica-exchange) simulation can be run using the "temper"_temper.html command. :line 3.4 Commands listed by category :link(cmd_4),h4 This section lists all LAMMPS commands, grouped by category. The "next section"_#cmd_5 lists the same commands alphabetically. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. Initialization: "atom_modify"_atom_modify.html, "atom_style"_atom_style.html, "boundary"_boundary.html, "dimension"_dimension.html, "newton"_newton.html, "processors"_processors.html, "units"_units.html Atom definition: "create_atoms"_create_atoms.html, "create_box"_create_box.html, "lattice"_lattice.html, "read_data"_read_data.html, "read_dump"_read_dump.html, "read_restart"_read_restart.html, "region"_region.html, "replicate"_replicate.html Force fields: "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html, "dielectric"_dielectric.html, "dihedral_coeff"_dihedral_coeff.html, "dihedral_style"_dihedral_style.html, "improper_coeff"_improper_coeff.html, "improper_style"_improper_style.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html, "pair_style"_pair_style.html, "pair_write"_pair_write.html, "special_bonds"_special_bonds.html Settings: "comm_style"_comm_style.html, "group"_group.html, "mass"_mass.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "reset_timestep"_reset_timestep.html, "run_style"_run_style.html, "set"_set.html, "timestep"_timestep.html, "velocity"_velocity.html Fixes: "fix"_fix.html, "fix_modify"_fix_modify.html, "unfix"_unfix.html Computes: "compute"_compute.html, "compute_modify"_compute_modify.html, "uncompute"_uncompute.html Output: "dump"_dump.html, "dump image"_dump_image.html, "dump_modify"_dump_modify.html, "dump movie"_dump_image.html, "restart"_restart.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "undump"_undump.html, "write_data"_write_data.html, "write_dump"_write_dump.html, "write_restart"_write_restart.html Actions: "delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html, "displace_atoms"_displace_atoms.html, "change_box"_change_box.html, "minimize"_minimize.html, "neb"_neb.html "prd"_prd.html, "rerun"_rerun.html, "run"_run.html, "temper"_temper.html Miscellaneous: "clear"_clear.html, "echo"_echo.html, "if"_if.html, "include"_include.html, "jump"_jump.html, "label"_label.html, "log"_log.html, "next"_next.html, "print"_print.html, "shell"_shell.html, "variable"_variable.html :line 3.5 Individual commands :h4,link(cmd_5),link(comm) This section lists all LAMMPS commands alphabetically, with a separate listing below of styles within certain commands. The "previous section"_#cmd_4 lists the same commands, grouped by category. Note that some style options for some commands are part of specific LAMMPS packages, which means they cannot be used unless the package was included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "atom_modify"_atom_modify.html, "atom_style"_atom_style.html, "balance"_balance.html, "bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html, "boundary"_boundary.html, "box"_box.html, "change_box"_change_box.html, "clear"_clear.html, "comm_modify"_comm_modify.html, "comm_style"_comm_style.html, "compute"_compute.html, "compute_modify"_compute_modify.html, "create_atoms"_create_atoms.html, "create_bonds"_create_bonds.html, "create_box"_create_box.html, "delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html, "dielectric"_dielectric.html, "dihedral_coeff"_dihedral_coeff.html, "dihedral_style"_dihedral_style.html, "dimension"_dimension.html, "displace_atoms"_displace_atoms.html, "dump"_dump.html, "dump image"_dump_image.html, "dump_modify"_dump_modify.html, "dump movie"_dump_image.html, "echo"_echo.html, "fix"_fix.html, "fix_modify"_fix_modify.html, "group"_group.html, "if"_if.html, "info"_info.html, "improper_coeff"_improper_coeff.html, "improper_style"_improper_style.html, "include"_include.html, "jump"_jump.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "label"_label.html, "lattice"_lattice.html, "log"_log.html, "mass"_mass.html, "minimize"_minimize.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "molecule"_molecule.html, "neb"_neb.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "newton"_newton.html, "next"_next.html, "package"_package.html, "pair_coeff"_pair_coeff.html, "pair_modify"_pair_modify.html, "pair_style"_pair_style.html, "pair_write"_pair_write.html, "partition"_partition.html, "prd"_prd.html, "print"_print.html, "processors"_processors.html, "python"_python.html, "quit"_quit.html, "read_data"_read_data.html, "read_dump"_read_dump.html, "read_restart"_read_restart.html, "region"_region.html, "replicate"_replicate.html, "rerun"_rerun.html, "reset_timestep"_reset_timestep.html, "restart"_restart.html, "run"_run.html, "run_style"_run_style.html, "set"_set.html, "shell"_shell.html, "special_bonds"_special_bonds.html, "suffix"_suffix.html, "tad"_tad.html, "temper"_temper.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "timer"_timer.html, "timestep"_timestep.html, "uncompute"_uncompute.html, "undump"_undump.html, "unfix"_unfix.html, "units"_units.html, "variable"_variable.html, "velocity"_velocity.html, "write_data"_write_data.html, "write_dump"_write_dump.html, "write_restart"_write_restart.html :tb(c=6,ea=c) These are additional commands in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "group2ndx"_group2ndx.html :tb(c=1,ea=c) :line Fix styles :h4 See the "fix"_fix.html command for one-line descriptions of each style or click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "adapt"_fix_adapt.html, "addforce (c)"_fix_addforce.html, "append/atoms"_fix_append_atoms.html, "atom/swap"_fix_atom_swap.html, "aveforce (c)"_fix_aveforce.html, "ave/atom"_fix_ave_atom.html, "ave/chunk"_fix_ave_chunk.html, "ave/correlate"_fix_ave_correlate.html, "ave/histo"_fix_ave_histo.html, "ave/histo/weight"_fix_ave_histo.html, "ave/spatial"_fix_ave_spatial.html, "ave/time"_fix_ave_time.html, "balance"_fix_balance.html, "bond/break"_fix_bond_break.html, "bond/create"_fix_bond_create.html, "bond/swap"_fix_bond_swap.html, "box/relax"_fix_box_relax.html, "deform (k)"_fix_deform.html, "deposit"_fix_deposit.html, "drag"_fix_drag.html, "dt/reset"_fix_dt_reset.html, "efield"_fix_efield.html, "enforce2d (c)"_fix_enforce2d.html, "evaporate"_fix_evaporate.html, "external"_fix_external.html, "freeze (c)"_fix_freeze.html, "gcmc"_fix_gcmc.html, "gld"_fix_gld.html, "gravity (co)"_fix_gravity.html, "heat"_fix_heat.html, "indent"_fix_indent.html, "langevin (k)"_fix_langevin.html, "lineforce"_fix_lineforce.html, "momentum"_fix_momentum.html, "move"_fix_move.html, "msst"_fix_msst.html, "neb"_fix_neb.html, "nph (ko)"_fix_nh.html, "nphug (o)"_fix_nphug.html, "nph/asphere (o)"_fix_nph_asphere.html, "nph/sphere (o)"_fix_nph_sphere.html, "npt (cko)"_fix_nh.html, "npt/asphere (o)"_fix_npt_asphere.html, "npt/sphere (o)"_fix_npt_sphere.html, "nve (cko)"_fix_nve.html, "nve/asphere"_fix_nve_asphere.html, "nve/asphere/noforce"_fix_nve_asphere_noforce.html, "nve/body"_fix_nve_body.html, "nve/limit"_fix_nve_limit.html, "nve/line"_fix_nve_line.html, "nve/noforce"_fix_nve_noforce.html, "nve/sphere (o)"_fix_nve_sphere.html, "nve/tri"_fix_nve_tri.html, "nvt (cko)"_fix_nh.html, "nvt/asphere (o)"_fix_nvt_asphere.html, "nvt/sllod (o)"_fix_nvt_sllod.html, "nvt/sphere (o)"_fix_nvt_sphere.html, "oneway"_fix_oneway.html, "orient/fcc"_fix_orient_fcc.html, "planeforce"_fix_planeforce.html, "poems"_fix_poems.html, "pour"_fix_pour.html, "press/berendsen"_fix_press_berendsen.html, "print"_fix_print.html, "property/atom"_fix_property_atom.html, "qeq/comb (o)"_fix_qeq_comb.html, "qeq/dynamic"_fix_qeq.html, "qeq/point"_fix_qeq.html, "qeq/shielded"_fix_qeq.html, "qeq/slater"_fix_qeq.html, "reax/bonds"_fix_reax_bonds.html, "recenter"_fix_recenter.html, "restrain"_fix_restrain.html, "rigid (o)"_fix_rigid.html, "rigid/nph (o)"_fix_rigid.html, "rigid/npt (o)"_fix_rigid.html, "rigid/nve (o)"_fix_rigid.html, "rigid/nvt (o)"_fix_rigid.html, "rigid/small (o)"_fix_rigid.html, "rigid/small/nph"_fix_rigid.html, "rigid/small/npt"_fix_rigid.html, "rigid/small/nve"_fix_rigid.html, "rigid/small/nvt"_fix_rigid.html, "setforce (c)"_fix_setforce.html, "shake (c)"_fix_shake.html, "spring"_fix_spring.html, "spring/rg"_fix_spring_rg.html, "spring/self"_fix_spring_self.html, "srd"_fix_srd.html, "store/force"_fix_store_force.html, "store/state"_fix_store_state.html, "temp/berendsen (c)"_fix_temp_berendsen.html, "temp/csld"_fix_temp_csvr.html, "temp/csvr"_fix_temp_csvr.html, "temp/rescale (c)"_fix_temp_rescale.html, "tfmc"_fix_tfmc.html, "thermal/conductivity"_fix_thermal_conductivity.html, "tmd"_fix_tmd.html, "ttm"_fix_ttm.html, "tune/kspace"_fix_tune_kspace.html, "vector"_fix_vector.html, "viscosity"_fix_viscosity.html, "viscous (c)"_fix_viscous.html, "wall/colloid"_fix_wall.html, "wall/gran"_fix_wall_gran.html, "wall/harmonic"_fix_wall.html, "wall/lj1043"_fix_wall.html, "wall/lj126"_fix_wall.html, "wall/lj93"_fix_wall.html, "wall/piston"_fix_wall_piston.html, "wall/reflect (k)"_fix_wall_reflect.html, "wall/region"_fix_wall_region.html, "wall/srd"_fix_wall_srd.html :tb(c=8,ea=c) These are additional fix styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "adapt/fep"_fix_adapt_fep.html, "addtorque"_fix_addtorque.html, "atc"_fix_atc.html, "ave/spatial/sphere"_fix_ave_spatial_sphere.html, "drude"_fix_drude.html, "drude/transform/direct"_fix_drude_transform.html, "drude/transform/reverse"_fix_drude_transform.html, "colvars"_fix_colvars.html, "gle"_fix_gle.html, "imd"_fix_imd.html, "ipi"_fix_ipi.html, "langevin/drude"_fix_langevin_drude.html, "langevin/eff"_fix_langevin_eff.html, "lb/fluid"_fix_lb_fluid.html, "lb/momentum"_fix_lb_momentum.html, "lb/pc"_fix_lb_pc.html, "lb/rigid/pc/sphere"_fix_lb_rigid_pc_sphere.html, "lb/viscous"_fix_lb_viscous.html, "meso"_fix_meso.html, "meso/stationary"_fix_meso_stationary.html, "nph/eff"_fix_nh_eff.html, "npt/eff"_fix_nh_eff.html, "nve/eff"_fix_nve_eff.html, "nvt/eff"_fix_nh_eff.html, "nvt/sllod/eff"_fix_nvt_sllod_eff.html, "phonon"_fix_phonon.html, "pimd"_fix_pimd.html, "qbmsst"_fix_qbmsst.html, "qeq/reax"_fix_qeq_reax.html, "qmmm"_fix_qmmm.html, "qtb"_fix_qtb.html, "reax/c/bonds"_fix_reax_bonds.html, "reax/c/species"_fix_reaxc_species.html, "saed/vtk"_fix_saed_vtk.html, "smd"_fix_smd.html, "smd/adjust/dt"_fix_smd_adjust_dt.html, "smd/integrate/tlsph"_fix_smd_integrate_tlsph.html, "smd/integrate/ulsph"_fix_smd_integrate_ulsph.html, "smd/move/triangulated/surface"_fix_smd_move_triangulated_surface.html, "smd/setvel"_fix_smd_setvel.html, "smd/tlsph/reference/configuration"_fix_smd_tlsph_reference_configuration.html, "smd/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.html, "ti/rs"_fix_ti_rs.html, "ti/spring"_fix_ti_spring.html, "ttm/mod"_fix_ttm.html :tb(c=6,ea=c) :line Compute styles :h4 See the "compute"_compute.html command for one-line descriptions of each style or click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "angle/local"_compute_angle_local.html, "angmom/chunk"_compute_angmom_chunk.html, "body/local"_compute_body_local.html, "bond/local"_compute_bond_local.html, "centro/atom"_compute_centro_atom.html, "chunk/atom"_compute_chunk_atom.html, "cluster/atom"_compute_cluster_atom.html, "cna/atom"_compute_cna_atom.html, "com"_compute_com.html, "com/chunk"_compute_com_chunk.html, "contact/atom"_compute_contact_atom.html, "coord/atom"_compute_coord_atom.html, "damage/atom"_compute_damage_atom.html, "dihedral/local"_compute_dihedral_local.html, "dilatation/atom"_compute_dilatation_atom.html, "displace/atom"_compute_displace_atom.html, "erotate/asphere"_compute_erotate_asphere.html, "erotate/rigid"_compute_erotate_rigid.html, "erotate/sphere"_compute_erotate_sphere.html, "erotate/sphere/atom"_compute_erotate_sphere_atom.html, "event/displace"_compute_event_displace.html, "group/group"_compute_group_group.html, "gyration"_compute_gyration.html, "gyration/chunk"_compute_gyration_chunk.html, "heat/flux"_compute_heat_flux.html, "improper/local"_compute_improper_local.html, "inertia/chunk"_compute_inertia_chunk.html, "ke"_compute_ke.html, "ke/atom"_compute_ke_atom.html, "ke/rigid"_compute_ke_rigid.html, "msd"_compute_msd.html, "msd/chunk"_compute_msd_chunk.html, "msd/nongauss"_compute_msd_nongauss.html, "omega/chunk"_compute_omega_chunk.html, "pair"_compute_pair.html, "pair/local"_compute_pair_local.html, "pe (c)"_compute_pe.html, "pe/atom"_compute_pe_atom.html, "plasticity/atom"_compute_plasticity_atom.html, "pressure (c)"_compute_pressure.html, "property/atom"_compute_property_atom.html, "property/local"_compute_property_local.html, "property/chunk"_compute_property_chunk.html, "rdf"_compute_rdf.html, "reduce"_compute_reduce.html, "reduce/region"_compute_reduce.html, "slice"_compute_slice.html, "sna/atom"_compute_sna_atom.html, "snad/atom"_compute_sna_atom.html, "snav/atom"_compute_sna_atom.html, "stress/atom"_compute_stress_atom.html, "temp (ck)"_compute_temp.html, "temp/asphere"_compute_temp_asphere.html, "temp/com"_compute_temp_com.html, "temp/chunk"_compute_temp_chunk.html, "temp/deform"_compute_temp_deform.html, "temp/partial (c)"_compute_temp_partial.html, "temp/profile"_compute_temp_profile.html, "temp/ramp"_compute_temp_ramp.html, "temp/region"_compute_temp_region.html, "temp/sphere"_compute_temp_sphere.html, "ti"_compute_ti.html, "torque/chunk"_compute_torque_chunk.html, "vacf"_compute_vacf.html, "vcm/chunk"_compute_vcm_chunk.html, "voronoi/atom"_compute_voronoi_atom.html :tb(c=6,ea=c) These are additional compute styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "ackland/atom"_compute_ackland_atom.html, "basal/atom"_compute_basal_atom.html, "fep"_compute_fep.html, "force/tally"_compute_tally.html, "heat/flux/tally"_compute_tally.html, "ke/eff"_compute_ke_eff.html, "ke/atom/eff"_compute_ke_atom_eff.html, "meso_e/atom"_compute_meso_e_atom.html, "meso_rho/atom"_compute_meso_rho_atom.html, "meso_t/atom"_compute_meso_t_atom.html, "pe/tally"_compute_tally.html, "saed"_compute_saed.html, "smd/contact/radius"_compute_smd_contact_radius.html, "smd/damage"_compute_smd_damage.html, "smd/hourglass/error"_compute_smd_hourglass_error.html, "smd/internal/energy"_compute_smd_internal_energy.html, "smd/plastic/strain"_compute_smd_plastic_strain.html, "smd/plastic/strain/rate"_compute_smd_plastic_strain_rate.html, "smd/rho"_compute_smd_rho.html, "smd/tlsph/defgrad"_compute_smd_tlsph_defgrad.html, "smd/tlsph/dt"_compute_smd_tlsph_dt.html, "smd/tlsph/num/neighs"_compute_smd_tlsph_num_neighs.html, "smd/tlsph/shape"_compute_smd_tlsph_shape.html, "smd/tlsph/strain"_compute_smd_tlsph_strain.html, "smd/tlsph/strain/rate"_compute_smd_tlsph_strain_rate.html, "smd/tlsph/stress"_compute_smd_tlsph_stress.html, "smd/triangle/mesh/vertices"_compute_smd_triangle_mesh_vertices.html, "smd/ulsph/num/neighs"_compute_smd_ulsph_num_neighs.html, "smd/ulsph/strain"_compute_smd_ulsph_strain.html, "smd/ulsph/strain/rate"_compute_smd_ulsph_strain_rate.html, "smd/ulsph/stress"_compute_smd_ulsph_stress.html, "smd/vol"_compute_smd_vol.html, "stress/tally"_compute_tally.html, "temp/drude"_compute_temp_drude.html, "temp/eff"_compute_temp_eff.html, "temp/deform/eff"_compute_temp_deform_eff.html, "temp/region/eff"_compute_temp_region_eff.html, "temp/rotate"_compute_temp_rotate.html, "xrd"_compute_xrd.html :tb(c=6,ea=c) :line Pair_style potentials :h4 See the "pair_style"_pair_style.html command for an overview of pair potentials. Click on the style itself for a full description. Many of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_pair_none.html, "hybrid"_pair_hybrid.html, "hybrid/overlay"_pair_hybrid.html, "adp (o)"_pair_adp.html, "airebo (o)"_pair_airebo.html, "beck (go)"_pair_beck.html, "body"_pair_body.html, "bop"_pair_bop.html, "born (go)"_pair_born.html, "born/coul/long (cgo)"_pair_born.html, "born/coul/long/cs"_pair_born.html, "born/coul/msm (o)"_pair_born.html, "born/coul/wolf (go)"_pair_born.html, "brownian (o)"_pair_brownian.html, "brownian/poly (o)"_pair_brownian.html, "buck (cgko)"_pair_buck.html, "buck/coul/cut (cgko)"_pair_buck.html, "buck/coul/long (cgko)"_pair_buck.html, "buck/coul/long/cs"_pair_buck.html, "buck/coul/msm (o)"_pair_buck.html, "buck/long/coul/long (o)"_pair_buck_long.html, "colloid (go)"_pair_colloid.html, "comb (o)"_pair_comb.html, "comb3"_pair_comb.html, "coul/cut (gko)"_pair_coul.html, "coul/debye (gko)"_pair_coul.html, "coul/dsf (gko)"_pair_coul.html, "coul/long (gko)"_pair_coul.html, "coul/long/cs"_pair_coul.html, "coul/msm"_pair_coul.html, "coul/streitz"_pair_coul.html, "coul/wolf (ko)"_pair_coul.html, "dpd (o)"_pair_dpd.html, "dpd/tstat (o)"_pair_dpd.html, "dsmc"_pair_dsmc.html, "eam (cgkot)"_pair_eam.html, "eam/alloy (cgkot)"_pair_eam.html, "eam/fs (cgkot)"_pair_eam.html, "eim (o)"_pair_eim.html, "gauss (go)"_pair_gauss.html, "gayberne (gio)"_pair_gayberne.html, "gran/hertz/history (o)"_pair_gran.html, "gran/hooke (co)"_pair_gran.html, "gran/hooke/history (o)"_pair_gran.html, "hbond/dreiding/lj (o)"_pair_hbond_dreiding.html, "hbond/dreiding/morse (o)"_pair_hbond_dreiding.html, "kim"_pair_kim.html, "lcbop"_pair_lcbop.html, "line/lj (o)"_pair_line_lj.html, "lj/charmm/coul/charmm (cko)"_pair_charmm.html, "lj/charmm/coul/charmm/implicit (cko)"_pair_charmm.html, "lj/charmm/coul/long (cgiko)"_pair_charmm.html, "lj/charmm/coul/msm"_pair_charmm.html, "lj/class2 (cgko)"_pair_class2.html, "lj/class2/coul/cut (cko)"_pair_class2.html, "lj/class2/coul/long (cgko)"_pair_class2.html, "lj/cubic (go)"_pair_lj_cubic.html, "lj/cut (cgikot)"_pair_lj.html, "lj/cut/coul/cut (cgko)"_pair_lj.html, "lj/cut/coul/debye (cgko)"_pair_lj.html, "lj/cut/coul/dsf (gko)"_pair_lj.html, "lj/cut/coul/long (cgikot)"_pair_lj.html, "lj/cut/coul/long/cs"_pair_lj.html, "lj/cut/coul/msm (go)"_pair_lj.html, "lj/cut/dipole/cut (go)"_pair_dipole.html, "lj/cut/dipole/long"_pair_dipole.html, "lj/cut/tip4p/cut (o)"_pair_lj.html, "lj/cut/tip4p/long (ot)"_pair_lj.html, "lj/expand (cgko)"_pair_lj_expand.html, "lj/gromacs (cgko)"_pair_gromacs.html, "lj/gromacs/coul/gromacs (cko)"_pair_gromacs.html, "lj/long/coul/long (o)"_pair_lj_long.html, "lj/long/dipole/long"_pair_dipole.html, "lj/long/tip4p/long"_pair_lj_long.html, "lj/smooth (co)"_pair_lj_smooth.html, "lj/smooth/linear (o)"_pair_lj_smooth_linear.html, "lj96/cut (cgo)"_pair_lj96.html, "lubricate (o)"_pair_lubricate.html, "lubricate/poly (o)"_pair_lubricate.html, "lubricateU"_pair_lubricateU.html, "lubricateU/poly"_pair_lubricateU.html, "meam (o)"_pair_meam.html, "mie/cut (o)"_pair_mie.html, "morse (cgot)"_pair_morse.html, "nb3b/harmonic (o)"_pair_nb3b_harmonic.html, "nm/cut (o)"_pair_nm.html, "nm/cut/coul/cut (o)"_pair_nm.html, "nm/cut/coul/long (o)"_pair_nm.html, "peri/eps"_pair_peri.html, "peri/lps (o)"_pair_peri.html, "peri/pmb (o)"_pair_peri.html, "peri/ves"_pair_peri.html, "polymorphic"_pair_polymorphic.html, "reax"_pair_reax.html, "rebo (o)"_pair_airebo.html, "resquared (go)"_pair_resquared.html, "snap"_pair_snap.html, "soft (go)"_pair_soft.html, "sw (cgkio)"_pair_sw.html, "table (gko)"_pair_table.html, "tersoff (cgko)"_pair_tersoff.html, "tersoff/mod (ko)"_pair_tersoff_mod.html, "tersoff/zbl (ko)"_pair_tersoff_zbl.html, "tip4p/cut (o)"_pair_coul.html, "tip4p/long (o)"_pair_coul.html, "tri/lj (o)"_pair_tri_lj.html, +"vashishta"_pair_vashishta.html, "yukawa (go)"_pair_yukawa.html, "yukawa/colloid (go)"_pair_yukawa_colloid.html, "zbl (go)"_pair_zbl.html :tb(c=4,ea=c) These are additional pair styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "awpmd/cut"_pair_awpmd.html, "coul/cut/soft (o)"_pair_lj_soft.html, "coul/diel (o)"_pair_coul_diel.html, "coul/long/soft (o)"_pair_lj_soft.html, "eam/cd (o)"_pair_eam.html, "edip (o)"_pair_edip.html, "eff/cut"_pair_eff.html, "gauss/cut"_pair_gauss.html, "list"_pair_list.html, "lj/charmm/coul/long/soft (o)"_pair_charmm.html, "lj/cut/coul/cut/soft (o)"_pair_lj_soft.html, "lj/cut/coul/long/soft (o)"_pair_lj_soft.html, "lj/cut/dipole/sf (go)"_pair_dipole.html, "lj/cut/soft (o)"_pair_lj_soft.html, "lj/cut/tip4p/long/soft (o)"_pair_lj_soft.html, "lj/sdk (gko)"_pair_sdk.html, "lj/sdk/coul/long (go)"_pair_sdk.html, "lj/sdk/coul/msm (o)"_pair_sdk.html, "lj/sf (o)"_pair_lj_sf.html, "meam/spline"_pair_meam_spline.html, "meam/sw/spline"_pair_meam_sw_spline.html, "quip"_pair_quip.html, "reax/c"_pair_reax_c.html, "smd/hertz"_pair_smd_hertz.html, "smd/tlsph"_pair_smd_tlsph.html, "smd/triangulated/surface"_pair_smd_triangulated_surface.html, "smd/ulsph"_pair_smd_ulsph.html, "sph/heatconduction"_pair_sph_heatconduction.html, "sph/idealgas"_pair_sph_idealgas.html, "sph/lj"_pair_sph_lj.html, "sph/rhosum"_pair_sph_rhosum.html, "sph/taitwater"_pair_sph_taitwater.html, "sph/taitwater/morris"_pair_sph_taitwater_morris.html, "srp"_pair_srp.html, "tersoff/table (o)"_pair_tersoff.html, "thole"_pair_thole.html, "tip4p/long/soft (o)"_pair_lj_soft.html :tb(c=4,ea=c) :line Bond_style potentials :h4 See the "bond_style"_bond_style.html command for an overview of bond potentials. Click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_bond_none.html, "hybrid"_bond_hybrid.html, "class2 (o)"_bond_class2.html, "fene (ko)"_bond_fene.html, "fene/expand (o)"_bond_fene_expand.html, "harmonic (ko)"_bond_harmonic.html, "morse (o)"_bond_morse.html, "nonlinear (o)"_bond_nonlinear.html, "quartic (o)"_bond_quartic.html, "table (o)"_bond_table.html :tb(c=4,ea=c) These are additional bond styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "harmonic/shift (o)"_bond_harmonic_shift.html, "harmonic/shift/cut (o)"_bond_harmonic_shift_cut.html :tb(c=4,ea=c) :line Angle_style potentials :h4 See the "angle_style"_angle_style.html command for an overview of angle potentials. Click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_angle_none.html, "hybrid"_angle_hybrid.html, "charmm (ko)"_angle_charmm.html, "class2 (o)"_angle_class2.html, "cosine (o)"_angle_cosine.html, "cosine/delta (o)"_angle_cosine_delta.html, "cosine/periodic (o)"_angle_cosine_periodic.html, "cosine/squared (o)"_angle_cosine_squared.html, "harmonic (ko)"_angle_harmonic.html, "table (o)"_angle_table.html :tb(c=4,ea=c) These are additional angle styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cosine/shift (o)"_angle_cosine_shift.html, "cosine/shift/exp (o)"_angle_cosine_shift_exp.html, "dipole (o)"_angle_dipole.html, "fourier (o)"_angle_fourier.html, "fourier/simple (o)"_angle_fourier_simple.html, "quartic (o)"_angle_quartic.html, "sdk"_angle_sdk.html :tb(c=4,ea=c) :line Dihedral_style potentials :h4 See the "dihedral_style"_dihedral_style.html command for an overview of dihedral potentials. Click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_dihedral_none.html, "hybrid"_dihedral_hybrid.html, "charmm (ko)"_dihedral_charmm.html, "class2 (o)"_dihedral_class2.html, "harmonic (o)"_dihedral_harmonic.html, "helix (o)"_dihedral_helix.html, "multi/harmonic (o)"_dihedral_multi_harmonic.html, "opls (ko)"_dihedral_opls.html :tb(c=4,ea=c) These are additional dihedral styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cosine/shift/exp (o)"_dihedral_cosine_shift_exp.html, "fourier (o)"_dihedral_fourier.html, "nharmonic (o)"_dihedral_nharmonic.html, "quadratic (o)"_dihedral_quadratic.html, "table (o)"_dihedral_table.html :tb(c=4,ea=c) :line Improper_style potentials :h4 See the "improper_style"_improper_style.html command for an overview of improper potentials. Click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_improper_none.html, "hybrid"_improper_hybrid.html, "class2 (o)"_improper_class2.html, "cvff (o)"_improper_cvff.html, "harmonic (ko)"_improper_harmonic.html, "umbrella (o)"_improper_umbrella.html :tb(c=4,ea=c) These are additional improper styles in USER packages, which can be used if "LAMMPS is built with the appropriate package"_Section_start.html#start_3. "cossq (o)"_improper_cossq.html, "fourier (o)"_improper_fourier.html, "ring (o)"_improper_ring.html :tb(c=4,ea=c) :line Kspace solvers :h4 See the "kspace_style"_kspace_style.html command for an overview of Kspace solvers. Click on the style itself for a full description. Some of the styles have accelerated versions, which can be used if LAMMPS is built with the "appropriate accelerated package"_Section_accelerate.html. This is indicated by additional letters in parenthesis: c = USER-CUDA, g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "ewald (o)"_kspace_style.html, "ewald/disp"_kspace_style.html, "msm (o)"_kspace_style.html, "msm/cg (o)"_kspace_style.html, "pppm (cgo)"_kspace_style.html, "pppm/cg (o)"_kspace_style.html, "pppm/disp"_kspace_style.html, "pppm/disp/tip4p"_kspace_style.html, "pppm/tip4p (o)"_kspace_style.html :tb(c=4,ea=c) diff --git a/doc/Section_example.txt b/doc/Section_example.txt index 3cbd54a96..8cda58fb1 100644 --- a/doc/Section_example.txt +++ b/doc/Section_example.txt @@ -1,123 +1,124 @@ "Previous Section"_Section_howto.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_perf.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 7. Example problems :h3 The LAMMPS distribution includes an examples sub-directory with several sample problems. Each problem is in a sub-directory of its own. Most are 2d models so that they run quickly, requiring at most a couple of minutes to run on a desktop machine. Each problem has an input script (in.*) and produces a log file (log.*) and dump file (dump.*) when it runs. Some use a data file (data.*) of initial coordinates as additional input. A few sample log file outputs on different machines and different numbers of processors are included in the directories to compare your answers to. E.g. a log file like log.crack.foo.P means it ran on P processors of machine "foo". For examples that use input data files, many of them were produced by "Pizza.py"_http://pizza.sandia.gov or setup tools described in the "Additional Tools"_Section_tools.html section of the LAMMPS documentation and provided with the LAMMPS distribution. If you uncomment the "dump"_dump.html command in the input script, a text dump file will be produced, which can be animated by various "visualization programs"_http://lammps.sandia.gov/viz.html. It can also be animated using the xmovie tool described in the "Additional Tools"_Section_tools.html section of the LAMMPS documentation. If you uncomment the "dump image"_dump.html command in the input script, and assuming you have built LAMMPS with a JPG library, JPG snapshot images will be produced when the simulation runs. They can be quickly post-processed into a movie using commands described on the "dump image"_dump_image.html doc page. Animations of many of these examples can be viewed on the Movies section of the "LAMMPS WWW Site"_lws. These are the sample problems in the examples sub-directories: balance: dynamic load balancing, 2d system body: body particles, 2d system colloid: big colloid particles in a small particle solvent, 2d system comb: models using the COMB potential crack: crack propagation in a 2d solid cuda: use of the USER-CUDA package for GPU acceleration dipole: point dipolar particles, 2d system dreiding: methanol via Dreiding FF eim: NaCl using the EIM potential ellipse: ellipsoidal particles in spherical solvent, 2d system flow: Couette and Poiseuille flow in a 2d channel friction: frictional contact of spherical asperities between 2d surfaces gpu: use of the GPU package for GPU acceleration hugoniostat: Hugoniostat shock dynamics indent: spherical indenter into a 2d solid intel: use of the USER-INTEL package for CPU or Intel(R) Xeon Phi(TM) coprocessor kim: use of potentials in Knowledge Base for Interatomic Models (KIM) line: line segment particles in 2d rigid bodies meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system micelle: self-assembly of small lipid-like molecules into 2d bilayers min: energy minimization of 2d LJ melt msst: MSST shock dynamics nb3b: use of nonbonded 3-body harmonic pair style neb: nudged elastic band (NEB) calculation for barrier finding nemd: non-equilibrium MD of 2d sheared system obstacle: flow around two voids in a 2d channel peptide: dynamics of a small solvated peptide chain (5-mer) peri: Peridynamic model of cylinder impacted by indenter pour: pouring of granular particles into a 3d box, then chute flow prd: parallel replica dynamics of vacancy diffusion in bulk Si qeq: use of the QEQ pacakge for charge equilibration reax: RDX and TATB models using the ReaxFF rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: NVE dynamics for BCC tantalum crystal using SNAP potential srd: stochastic rotation dynamics (SRD) particles as solvent tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si tri: triangular particles in rigid bodies :tb(s=:) +vashishta: models using the Vashishta potential Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_linux . # copy LAMMPS executable to this dir lmp_linux -in in.indent # run the problem :pre Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: ../../tools/xmovie/xmovie -scale dump.indent :pre If you uncomment the "dump image"_dump_image.html line(s) in the input script a series of JPG images will be produced by the run. These can be viewed individually or turned into a movie or animated by tools like ImageMagick or QuickTime or various Windows-based tools. See the "dump image"_dump_image.html doc page for more details. E.g. this Imagemagick command would create a GIF file suitable for viewing in a browser. % convert -loop 1 *.jpg foo.gif :pre :line There is also a COUPLE directory with examples of how to use LAMMPS as a library, either by itself or in tandem with another code or library. See the COUPLE/README file to get started. There is also an ELASTIC directory with an example script for computing elastic constants at zero temperature, using an Si example. See the ELASTIC/in.elastic file for more info. There is also an ELASTIC_T directory with an example script for computing elastic constants at finite temperature, using an Si example. See the ELASTIC_T/in.elastic file for more info. There is also a USER directory which contains subdirectories of user-provided examples for user packages. See the README files in those directories for more info. See the "Section_start.html"_Section_start.html file for more info about user packages. diff --git a/doc/pair_style.txt b/doc/pair_style.txt index 760d35b60..1f26b4d52 100644 --- a/doc/pair_style.txt +++ b/doc/pair_style.txt @@ -1,229 +1,230 @@ "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 pair_style command :h3 [Syntax:] pair_style style args :pre style = one of the styles from the list below args = arguments used by a particular style :ul [Examples:] pair_style lj/cut 2.5 pair_style eam/alloy pair_style hybrid lj/charmm/coul/long 10.0 eam pair_style table linear 1000 pair_style none :pre [Description:] Set the formula(s) LAMMPS uses to compute pairwise interactions. In LAMMPS, pair potentials are defined between pairs of atoms that are within a cutoff distance and the set of active interactions typically changes over time. See the "bond_style"_bond_style.html command to define potentials between pairs of bonded atoms, which typically remain in place for the duration of a simulation. In LAMMPS, pairwise force fields encompass a variety of interactions, some of which include many-body effects, e.g. EAM, Stillinger-Weber, Tersoff, REBO potentials. They are still classified as "pairwise" potentials because the set of interacting atoms changes with time (unlike molecular bonds) and thus a neighbor list is used to find nearby interacting atoms. Hybrid models where specified pairs of atom types interact via different pair potentials can be setup using the {hybrid} pair style. The coefficients associated with a pair style are typically set for each pair of atom types, and are specified by the "pair_coeff"_pair_coeff.html command or read from a file by the "read_data"_read_data.html or "read_restart"_read_restart.html commands. The "pair_modify"_pair_modify.html command sets options for mixing of type I-J interaction coefficients and adding energy offsets or tail corrections to Lennard-Jones potentials. Details on these options as they pertain to individual potentials are described on the doc page for the potential. Likewise, info on whether the potential information is stored in a "restart file"_write_restart.html is listed on the potential doc page. In the formulas listed for each pair style, {E} is the energy of a pairwise interaction between two atoms separated by a distance {r}. The force between the atoms is the negative derivative of this expression. If the pair_style command has a cutoff argument, it sets global cutoffs for all pairs of atom types. The distance(s) can be smaller or larger than the dimensions of the simulation box. Typically, the global cutoff value can be overridden for a specific pair of atom types by the "pair_coeff"_pair_coeff.html command. The pair style settings (including global cutoffs) can be changed by a subsequent pair_style command using the same style. This will reset the cutoffs for all atom type pairs, including those previously set explicitly by a "pair_coeff"_pair_coeff.html command. The exceptions to this are that pair_style {table} and {hybrid} settings cannot be reset. A new pair_style command for these styles will wipe out all previously specified pair_coeff values. :line Here is an alphabetic list of pair styles defined in LAMMPS. They are also given in more compact form in the pair section of "this page"_Section_commands.html#cmd_5. Click on the style to display the formula it computes, arguments specified in the pair_style command, and coefficients specified by the associated "pair_coeff"_pair_coeff.html command. There are also additional pair styles (not listed here) submitted by users which are included in the LAMMPS distribution. The list of these with links to the individual styles are given in the pair section of "this page"_Section_commands.html#cmd_5. There are also additional accelerated pair styles (not listed here) included in the LAMMPS distribution for faster performance on CPUs and GPUs. The list of these with links to the individual styles are given in the pair section of "this page"_Section_commands.html#cmd_5. "pair_style none"_pair_none.html - turn off pairwise interactions "pair_style hybrid"_pair_hybrid.html - multiple styles of pairwise interactions "pair_style hybrid/overlay"_pair_hybrid.html - multiple styles of superposed pairwise interactions :ul "pair_style adp"_pair_adp.html - angular dependent potential (ADP) of Mishin "pair_style airebo"_pair_airebo.html - AIREBO potential of Stuart "pair_style beck"_pair_beck.html - Beck potential "pair_style body"_pair_body.html - interactions between body particles "pair_style bop"_pair_bop.html - BOP potential of Pettifor "pair_style born"_pair_born.html - Born-Mayer-Huggins potential "pair_style born/coul/long"_pair_born.html - Born-Mayer-Huggins with long-range Coulombics "pair_style born/coul/long/cs"_pair_born.html - Born-Mayer-Huggins with long-range Coulombics and core/shell "pair_style born/coul/msm"_pair_born.html - Born-Mayer-Huggins with long-range MSM Coulombics "pair_style born/coul/wolf"_pair_born.html - Born-Mayer-Huggins with Coulombics via Wolf potential "pair_style brownian"_pair_brownian.html - Brownian potential for Fast Lubrication Dynamics "pair_style brownian/poly"_pair_brownian.html - Brownian potential for Fast Lubrication Dynamics with polydispersity "pair_style buck"_pair_buck.html - Buckingham potential "pair_style buck/coul/cut"_pair_buck.html - Buckingham with cutoff Coulomb "pair_style buck/coul/long"_pair_buck.html - Buckingham with long-range Coulombics "pair_style buck/coul/long/cs"_pair_buck.html - Buckingham with long-range Coulombics and core/shell "pair_style buck/coul/msm"_pair_buck.html - Buckingham long-range MSM Coulombics "pair_style buck/long/coul/long"_pair_buck_long.html - long-range Buckingham with long-range Coulombics "pair_style colloid"_pair_colloid.html - integrated colloidal potential "pair_style comb"_pair_comb.html - charge-optimized many-body (COMB) potential "pair_style comb3"_pair_comb.html - charge-optimized many-body (COMB3) potential "pair_style coul/cut"_pair_coul.html - cutoff Coulombic potential "pair_style coul/debye"_pair_coul.html - cutoff Coulombic potential with Debye screening "pair_style coul/dsf"_pair_coul.html - Coulombics via damped shifted forces "pair_style coul/long"_pair_coul.html - long-range Coulombic potential "pair_style coul/long/cs"_pair_coul.html - long-range Coulombic potential and core/shell "pair_style coul/msm"_pair_coul.html - long-range MSM Coulombics "pair_style coul/msm"_pair_coul_streitz.html - Coulombics via Streitz/Mintmire Slater orbitals "pair_style coul/wolf"_pair_coul.html - Coulombics via Wolf potential "pair_style dpd"_pair_dpd.html - dissipative particle dynamics (DPD) "pair_style dpd/tstat"_pair_dpd.html - DPD thermostatting "pair_style dsmc"_pair_dsmc.html - Direct Simulation Monte Carlo (DSMC) "pair_style eam"_pair_eam.html - embedded atom method (EAM) "pair_style eam/alloy"_pair_eam.html - alloy EAM "pair_style eam/fs"_pair_eam.html - Finnis-Sinclair EAM "pair_style eim"_pair_eim.html - embedded ion method (EIM) "pair_style gauss"_pair_gauss.html - Gaussian potential "pair_style gayberne"_pair_gayberne.html - Gay-Berne ellipsoidal potential "pair_style gran/hertz/history"_pair_gran.html - granular potential with Hertzian interactions "pair_style gran/hooke"_pair_gran.html - granular potential with history effects "pair_style gran/hooke/history"_pair_gran.html - granular potential without history effects "pair_style hbond/dreiding/lj"_pair_hbond_dreiding.html - DREIDING hydrogen bonding LJ potential "pair_style hbond/dreiding/morse"_pair_hbond_dreiding.html - DREIDING hydrogen bonding Morse potential "pair_style kim"_pair_kim.html - interface to potentials provided by KIM project "pair_style lcbop"_pair_lcbop.html - long-range bond-order potential (LCBOP) "pair_style line/lj"_pair_line_lj.html - LJ potential between line segments "pair_style lj/charmm/coul/charmm"_pair_charmm.html - CHARMM potential with cutoff Coulomb "pair_style lj/charmm/coul/charmm/implicit"_pair_charmm.html - CHARMM for implicit solvent "pair_style lj/charmm/coul/long"_pair_charmm.html - CHARMM with long-range Coulomb "pair_style lj/charmm/coul/msm"_pair_charmm.html - CHARMM with long-range MSM Coulombics "pair_style lj/class2"_pair_class2.html - COMPASS (class 2) force field with no Coulomb "pair_style lj/class2/coul/cut"_pair_class2.html - COMPASS with cutoff Coulomb "pair_style lj/class2/coul/long"_pair_class2.html - COMPASS with long-range Coulomb "pair_style lj/cut"_pair_lj.html - cutoff Lennard-Jones potential with no Coulomb "pair_style lj/cut/coul/cut"_pair_lj.html - LJ with cutoff Coulomb "pair_style lj/cut/coul/debye"_pair_lj.html - LJ with Debye screening added to Coulomb "pair_style lj/cut/coul/dsf"_pair_lj.html - LJ with Coulombics via damped shifted forces "pair_style lj/cut/coul/long"_pair_lj.html - LJ with long-range Coulombics "pair_style lj/cut/coul/msm"_pair_lj.html - LJ with long-range MSM Coulombics "pair_style lj/cut/dipole/cut"_pair_dipole.html - point dipoles with cutoff "pair_style lj/cut/dipole/long"_pair_dipole.html - point dipoles with long-range Ewald "pair_style lj/cut/tip4p/cut"_pair_lj.html - LJ with cutoff Coulomb for TIP4P water "pair_style lj/cut/tip4p/long"_pair_lj.html - LJ with long-range Coulomb for TIP4P water "pair_style lj/expand"_pair_lj_expand.html - Lennard-Jones for variable size particles "pair_style lj/gromacs"_pair_gromacs.html - GROMACS-style Lennard-Jones potential "pair_style lj/gromacs/coul/gromacs"_pair_gromacs.html - GROMACS-style LJ and Coulombic potential "pair_style lj/long/coul/long"_pair_lj_long.html - long-range LJ and long-range Coulombics "pair_style lj/long/dipole/long"_pair_dipole.html - long-range LJ and long-range point dipoles "pair_style lj/long/tip4p/long"_pair_lj_long.html - long-range LJ and long-range Coulomb for TIP4P water "pair_style lj/smooth"_pair_lj_smooth.html - smoothed Lennard-Jones potential "pair_style lj/smooth/linear"_pair_lj_smooth_linear.html - linear smoothed Lennard-Jones potential "pair_style lj96/cut"_pair_lj96.html - Lennard-Jones 9/6 potential "pair_style lubricate"_pair_lubricate.html - hydrodynamic lubrication forces "pair_style lubricate/poly"_pair_lubricate.html - hydrodynamic lubrication forces with polydispersity "pair_style lubricateU"_pair_lubricateU.html - hydrodynamic lubrication forces for Fast Lubrication Dynamics "pair_style lubricateU/poly"_pair_lubricateU.html - hydrodynamic lubrication forces for Fast Lubrication with polydispersity "pair_style meam"_pair_meam.html - modified embedded atom method (MEAM) "pair_style mie/cut"_pair_mie.html - Mie potential "pair_style morse"_pair_morse.html - Morse potential "pair_style nb3b/harmonic"_pair_nb3b_harmonic.html - nonbonded 3-body harmonic potential "pair_style nm/cut"_pair_nm.html - N-M potential "pair_style nm/cut/coul/cut"_pair_nm.html - N-M potential with cutoff Coulomb "pair_style nm/cut/coul/long"_pair_nm.html - N-M potential with long-range Coulombics "pair_style peri/eps"_pair_peri.html - peridynamic EPS potential "pair_style peri/lps"_pair_peri.html - peridynamic LPS potential "pair_style peri/pmb"_pair_peri.html - peridynamic PMB potential "pair_style peri/ves"_pair_peri.html - peridynamic VES potential "pair_style polymorphic"_pair_polymorphic.html - polymorphic 3-body potential "pair_style reax"_pair_reax.html - ReaxFF potential "pair_style rebo"_pair_airebo.html - 2nd generation REBO potential of Brenner "pair_style resquared"_pair_resquared.html - Everaers RE-Squared ellipsoidal potential "pair_style snap"_pair_snap.html - SNAP quantum-accurate potential "pair_style soft"_pair_soft.html - Soft (cosine) potential "pair_style sw"_pair_sw.html - Stillinger-Weber 3-body potential "pair_style table"_pair_table.html - tabulated pair potential "pair_style tersoff"_pair_tersoff.html - Tersoff 3-body potential "pair_style tersoff/mod"_pair_tersoff_mod.html - modified Tersoff 3-body potential "pair_style tersoff/zbl"_pair_tersoff_zbl.html - Tersoff/ZBL 3-body potential "pair_style tip4p/cut"_pair_coul.html - Coulomb for TIP4P water w/out LJ "pair_style tip4p/long"_pair_coul.html - long-range Coulombics for TIP4P water w/out LJ "pair_style tri/lj"_pair_tri_lj.html - LJ potential between triangles +"pair_style vashishta"_pair_vahishta.html - Vashishta 2-body and 3-body potential "pair_style yukawa"_pair_yukawa.html - Yukawa potential "pair_style yukawa/colloid"_pair_yukawa_colloid.html - screened Yukawa potential for finite-size particles "pair_style zbl"_pair_zbl.html - Ziegler-Biersack-Littmark potential :ul :line [Restrictions:] This command must be used before any coefficients are set by the "pair_coeff"_pair_coeff.html, "read_data"_read_data.html, or "read_restart"_read_restart.html commands. Some pair styles are part of specific packages. They are only enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info on packages. The doc pages for individual pair potentials tell if it is part of a package. [Related commands:] "pair_coeff"_pair_coeff.html, "read_data"_read_data.html, "pair_modify"_pair_modify.html, "kspace_style"_kspace_style.html, "dielectric"_dielectric.html, "pair_write"_pair_write.html [Default:] pair_style none :pre diff --git a/doc/pair_vashishta.html b/doc/pair_vashishta.html new file mode 100644 index 000000000..f2b42588e --- /dev/null +++ b/doc/pair_vashishta.html @@ -0,0 +1,211 @@ + +
LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands +
+ + + + + + +
+ +

pair_style vashishta command +

+

Syntax: +

+
pair_style vashishta 
+
+

Examples: +

+
pair_style vashishta
+pair_coeff * * SiC.vashishta Si C 
+
+

Description: +

+

The vashishta style computes the combined 2-body and 3-body +family of potentials developed in the group of Vashishta and +co-workers. By combining repulsive, screened Coulombic, +screened charge-dipole, and dispersion interactions with a +bond-angle energy based on the Stillinger-Weber potential, +this potential has been used to describe a variety of inorganic +compounds, including SiO2 Vashishta1990, +SiC Vashishta2007, +and InP Branicio2009. +

+

The potential for the energy U of a system of atoms is +

+
+
+

where we follow the notation used in Branicio2009. +U2 is a two-body term and U3 is a three-body term. The +summation over two-body terms is over all neighbors J within +a cutoff distance = rc. The twobody terms are shifted and +tilted by a linear function so that the energy and force are +both zero at rc. The summation over three-body terms +is over all neighbors J and K within a cut-off distance = r0, +where the exponential screening function becomes zero. +

+

Only a single pair_coeff command is used with the vashishta style which +specifies a Vashishta potential file with parameters for all +needed elements. These are mapped to LAMMPS atom types by specifying +N additional arguments after the filename in the pair_coeff command, +where N is the number of LAMMPS atom types: +

+ +

See the pair_coeff doc page for alternate ways +to specify the path for the potential file. +

+

As an example, imagine a file SiC.vashishta has parameters for +Si and C. If your LAMMPS simulation has 4 atoms types and you want +the 1st 3 to be Si, and the 4th to be C, you would use the following +pair_coeff command: +

+
pair_coeff * * SiC.vashishta Si Si Si C 
+
+

The 1st 2 arguments must be * * so as to span all LAMMPS atom types. +The first three Si arguments map LAMMPS atom types 1,2,3 to the Si +element in the file. The final C argument maps LAMMPS atom type 4 +to the C element in the file. If a mapping value is specified as +NULL, the mapping is not performed. This can be used when a vashishta +potential is used as part of the hybrid pair style. The NULL values +are placeholders for atom types that will be used with other +potentials. +

+

Vashishta files in the potentials directory of the LAMMPS +distribution have a ".vashishta" suffix. Lines that are not blank or +comments (starting with #) define parameters for a triplet of +elements. The parameters in a single entry correspond to the two-body +and three-body coefficients in the formulae above: +

+ +

The non-annotated parameters are unitless. +The Vashishta potential file must contain entries for all the +elements listed in the pair_coeff command. It can also contain +entries for additional elements not being used in a particular +simulation; LAMMPS ignores those entries. +For a single-element simulation, only a single entry is required +(e.g. SiSiSi). For a two-element simulation, the file must contain 8 +entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that +specify parameters for all permutations of the two elements +interacting in three-body configurations. Thus for 3 elements, 27 +entries would be required, etc. +

+

Depending on the particular version of the Vashishta potential, +the values of these parameters may be keyed to the identities of +zero, one, two, or three elements. +In order to make the input file format unambiguous, general, +and simple to code, +LAMMPS uses a slightly confusing method for specifying parameters. +All parameters are divided into two classes: two-body and three-body. +Two-body and three-body parameters are handled differently, +as described below. +The two-body parameters are H, eta, lambda1, D, lambda4, W, rc, gamma, and r0. +They appear in the above formulae with two subscripts. +The parameters Zi and Zj are also classified as two-body parameters, +even though they only have 1 subscript. +The three-body parameters are B, C, costheta0. +They appear in the above formulae with three subscripts. +Two-body and three-body parameters are handled differently, +as described below. +

+

The first element in each entry is the center atom +in a three-body interaction, while the second and third elements +are two neighbor atoms. Three-body parameters for a central atom I +and two neighbors J and K are taken from the IJK entry. +Note that even though three-body parameters do not depend on the order of +J and K, LAMMPS stores three-body parameters for both IJK and IKJ. +The user must ensure that these values are equal. +Two-body parameters for an atom I interacting with atom J are taken from +the IJJ entry, where the 2nd and 3rd +elements are the same. Thus the two-body parameters +for Si interacting with C come from the SiCC entry. Note that even +though two-body parameters (except possibly gamma and r0 in U3) +do not depend on the order of the two elements, +LAMMPS will get the Si-C value from the SiCC entry +and the C-Si value from the CSiSi entry. The user must ensure +that these values are equal. Two-body parameters appearing +in entries where the 2nd and 3rd elements are different are +stored but never used. It is good practice to enter zero for +these values. Note that the three-body function U3 above +contains the two-body parameters gamma and r0. So U3 for a +central C atom bonded to an Si atom and a second C atom +will take three-body parameters from the CSiC entry, but +two-body parameters from the CCC and CSiSi entries. +

+
+ +

Mixing, shift, table, tail correction, restart, rRESPA info: +

+

For atom type pairs I,J and I != J, where types I and J correspond to +two different element types, mixing is performed by LAMMPS as +described above from values in the potential file. +

+

This pair style does not support the pair_modify +shift, table, and tail options. +

+

This pair style does not write its information to binary restart +files, since it is stored in potential files. Thus, you +need to re-specify the pair_style and pair_coeff commands in an input +script that reads a restart file. +

+

This pair style can only be used via the pair keyword of the +run_style respa command. It does not support the +inner, middle, outer keywords. +

+
+ +

Restrictions: +

+

This pair style is part of the MANYBODY package. It is only enabled +if LAMMPS was built with that package (which it is by default). See +the Making LAMMPS section for more info. +

+

This pair style requires the newton setting to be "on" +for pair interactions. +

+

The Vashishta potential files provided with LAMMPS (see the +potentials directory) are parameterized for metal units. +You can use the Vashishta potential with any LAMMPS units, but you would need +to create your own Vashishta potential file with coefficients listed in the +appropriate units if your simulation doesn't use "metal" units. +

+

Related commands: +

+

pair_coeff +

+

Default: none +

+
+ + + +

(Vashishta1990) P. Vashishta, R. K. Kalia, J. P. Rino, Phys. Rev. B 41, 12197 (1990). +

+ + +

(Vashishta2007) P. Vashishta, R. K. Kalia, A. Nakano, J. P. Rino. J. Appl. Phys. 101, 103515 (2007). +

+ + +

(Branicio2009) Branicio, Rino, Gan and Tsuzuki, J. Phys Condensed Matter 21 (2009) 095002 +

+ diff --git a/doc/pair_vashishta.txt b/doc/pair_vashishta.txt new file mode 100644 index 000000000..053db937a --- /dev/null +++ b/doc/pair_vashishta.txt @@ -0,0 +1,204 @@ +"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 + +pair_style vashishta command :h3 + +[Syntax:] + +pair_style vashishta :pre + +[Examples:] + +pair_style vashishta +pair_coeff * * SiC.vashishta Si C :pre + +[Description:] + +The {vashishta} style computes the combined 2-body and 3-body +family of potentials developed in the group of Vashishta and +co-workers. By combining repulsive, screened Coulombic, +screened charge-dipole, and dispersion interactions with a +bond-angle energy based on the Stillinger-Weber potential, +this potential has been used to describe a variety of inorganic +compounds, including SiO2 "Vashishta1990"_#Vashishta1990, +SiC "Vashishta2007"_#Vashishta2007, +and InP "Branicio2009"_#Branicio2009. + +The potential for the energy U of a system of atoms is + +:c,image(Eqs/pair_vashishta.jpg) + +where we follow the notation used in "Branicio2009"_#Branicio2009. +U2 is a two-body term and U3 is a three-body term. The +summation over two-body terms is over all neighbors J within +a cutoff distance = {rc}. The twobody terms are shifted and +tilted by a linear function so that the energy and force are +both zero at {rc}. The summation over three-body terms +is over all neighbors J and K within a cut-off distance = {r0}, +where the exponential screening function becomes zero. + +Only a single pair_coeff command is used with the {vashishta} style which +specifies a Vashishta potential file with parameters for all +needed elements. These are mapped to LAMMPS atom types by specifying +N additional arguments after the filename in the pair_coeff command, +where N is the number of LAMMPS atom types: + +filename +N element names = mapping of Vashishta elements to atom types :ul + +See the "pair_coeff"_pair_coeff.html doc page for alternate ways +to specify the path for the potential file. + +As an example, imagine a file SiC.vashishta has parameters for +Si and C. If your LAMMPS simulation has 4 atoms types and you want +the 1st 3 to be Si, and the 4th to be C, you would use the following +pair_coeff command: + +pair_coeff * * SiC.vashishta Si Si Si C :pre + +The 1st 2 arguments must be * * so as to span all LAMMPS atom types. +The first three Si arguments map LAMMPS atom types 1,2,3 to the Si +element in the file. The final C argument maps LAMMPS atom type 4 +to the C element in the file. If a mapping value is specified as +NULL, the mapping is not performed. This can be used when a {vashishta} +potential is used as part of the {hybrid} pair style. The NULL values +are placeholders for atom types that will be used with other +potentials. + +Vashishta files in the {potentials} directory of the LAMMPS +distribution have a ".vashishta" suffix. Lines that are not blank or +comments (starting with #) define parameters for a triplet of +elements. The parameters in a single entry correspond to the two-body +and three-body coefficients in the formulae above: + +element 1 (the center atom in a 3-body interaction) +element 2 +element 3 +H (energy units) +eta +Zi (electron charge units) +Zj (electron charge units) +lambda1 (distance units) +D (energy units) +lambda4 (distance units) +W (energy units) +rc (distance units) +B (energy units) +gamma +r0 (distance units) +C +costheta0 :ul + +The non-annotated parameters are unitless. +The Vashishta potential file must contain entries for all the +elements listed in the pair_coeff command. It can also contain +entries for additional elements not being used in a particular +simulation; LAMMPS ignores those entries. +For a single-element simulation, only a single entry is required +(e.g. SiSiSi). For a two-element simulation, the file must contain 8 +entries (for SiSiSi, SiSiC, SiCSi, SiCC, CSiSi, CSiC, CCSi, CCC), that +specify parameters for all permutations of the two elements +interacting in three-body configurations. Thus for 3 elements, 27 +entries would be required, etc. + +Depending on the particular version of the Vashishta potential, +the values of these parameters may be keyed to the identities of +zero, one, two, or three elements. +In order to make the input file format unambiguous, general, +and simple to code, +LAMMPS uses a slightly confusing method for specifying parameters. +All parameters are divided into two classes: two-body and three-body. +Two-body and three-body parameters are handled differently, +as described below. +The two-body parameters are H, eta, lambda1, D, lambda4, W, rc, gamma, and r0. +They appear in the above formulae with two subscripts. +The parameters Zi and Zj are also classified as two-body parameters, +even though they only have 1 subscript. +The three-body parameters are B, C, costheta0. +They appear in the above formulae with three subscripts. +Two-body and three-body parameters are handled differently, +as described below. + +The first element in each entry is the center atom +in a three-body interaction, while the second and third elements +are two neighbor atoms. Three-body parameters for a central atom I +and two neighbors J and K are taken from the IJK entry. +Note that even though three-body parameters do not depend on the order of +J and K, LAMMPS stores three-body parameters for both IJK and IKJ. +The user must ensure that these values are equal. +Two-body parameters for an atom I interacting with atom J are taken from +the IJJ entry, where the 2nd and 3rd +elements are the same. Thus the two-body parameters +for Si interacting with C come from the SiCC entry. Note that even +though two-body parameters (except possibly gamma and r0 in U3) +do not depend on the order of the two elements, +LAMMPS will get the Si-C value from the SiCC entry +and the C-Si value from the CSiSi entry. The user must ensure +that these values are equal. Two-body parameters appearing +in entries where the 2nd and 3rd elements are different are +stored but never used. It is good practice to enter zero for +these values. Note that the three-body function U3 above +contains the two-body parameters gamma and r0. So U3 for a +central C atom bonded to an Si atom and a second C atom +will take three-body parameters from the CSiC entry, but +two-body parameters from the CCC and CSiSi entries. + +:line + +[Mixing, shift, table, tail correction, restart, rRESPA info]: + +For atom type pairs I,J and I != J, where types I and J correspond to +two different element types, mixing is performed by LAMMPS as +described above from values in the potential file. + +This pair style does not support the "pair_modify"_pair_modify.html +shift, table, and tail options. + +This pair style does not write its information to "binary restart +files"_restart.html, since it is stored in potential files. Thus, you +need to re-specify the pair_style and pair_coeff commands in an input +script that reads a restart file. + +This pair style can only be used via the {pair} keyword of the +"run_style respa"_run_style.html command. It does not support the +{inner}, {middle}, {outer} keywords. + +:line + +[Restrictions:] + +This pair style is part of the MANYBODY package. It is only enabled +if LAMMPS was built with that package (which it is by default). See +the "Making LAMMPS"_Section_start.html#start_3 section for more info. + +This pair style requires the "newton"_newton.html setting to be "on" +for pair interactions. + +The Vashishta potential files provided with LAMMPS (see the +potentials directory) are parameterized for metal "units"_units.html. +You can use the Vashishta potential with any LAMMPS units, but you would need +to create your own Vashishta potential file with coefficients listed in the +appropriate units if your simulation doesn't use "metal" units. + +[Related commands:] + +"pair_coeff"_pair_coeff.html + +[Default:] none + +:line + +:link(Vashishta1990) +[(Vashishta1990)] P. Vashishta, R. K. Kalia, J. P. Rino, Phys. Rev. B 41, 12197 (1990). + +:link(Vashishta2007) +[(Vashishta2007)] P. Vashishta, R. K. Kalia, A. Nakano, J. P. Rino. J. Appl. Phys. 101, 103515 (2007). + +:link(Branicio2009) +[(Branicio2009)] Branicio, Rino, Gan and Tsuzuki, J. Phys Condensed Matter 21 (2009) 095002 + diff --git a/examples/README b/examples/README index c2a902310..765f88a73 100644 --- a/examples/README +++ b/examples/README @@ -1,169 +1,170 @@ LAMMPS example problems There are 3 flavors of sub-directories in this file, each with sample problems you can run with LAMMPS. lower-case directories = simple test problems for LAMMPS and its packages upper-case directories = more complex problems USER directory with its own sub-directories = tests for USER packages Each is discussed below. ------------------------------------------ Lower-case directories Each of these sub-directories contains a sample problem you can run with LAMMPS. Most are 2d models so that they run quickly, requiring a few seconds to a few minutes to run on a desktop machine. Each problem has an input script (in.*) and produces a log file (log.*) and (optionally) a dump file (dump.*) or image files (image.*) or movie (movie.mpg) when it runs. Some use a data file (data.*) of initial coordinates as additional input. Some require that you install one or more optional LAMMPS packages. A few sample log file outputs on different machines and different numbers of processors are included in the directories to compare your answers to. E.g. a log file like log.crack.date.foo.P means it ran on P processors of machine "foo" with the dated version of LAMMPS. Note that these problems should get statistically similar answers when run on different machines or different numbers of processors, but not identical answers to those in the log of dump files included here. See the Errors section of the LAMMPS documentation for more discussion. Most of the example input scripts have commented-out lines that produce dump snapshots of the running simulation in any of 3 formats. If you uncomment the dump command in the input script, a text dump file will be produced, which can be animated by various visualization programs (see http://lammps.sandia.gov/viz.html) such as VMD or AtomEye. It can also be animated using the xmovie tool described in the Additional Tools section of the LAMMPS documentation. If you uncomment the dump image command in the input script, and assuming you have built LAMMPS with a JPG library, JPG snapshot images will be produced when the simulation runs. They can be quickly post-processed into a movie using commands described on the dump image doc page. If you uncomment the dump movie command in the input script, and assuming you have built LAMMPS with the FFMPEG library, an MPG movie will be produced when the simulation runs. The movie file can be played using various viewers, such as mplayer or QuickTime. Animations of many of these examples can be viewed on the Movies section of the LAMMPS WWW Site. These are the sample problems and their output in the various sub-directories: accelerate: use of all the various accelerator packages balance: dynamic load balancing, 2d system body: body particles, 2d system colloid: big colloid particles in a small particle solvent, 2d system coreshell: adiabatic core/shell model comb: models using the COMB potential crack: crack propagation in a 2d solid deposit: deposition of atoms and molecules onto a 3d substrate dipole: point dipolar particles, 2d system dreiding: methanol via Dreiding FF eim: NaCl using the EIM potential ellipse: ellipsoidal particles in spherical solvent, 2d system flow: Couette and Poiseuille flow in a 2d channel friction: frictional contact of spherical asperities between 2d surfaces hugoniostat: Hugoniostat shock dynamics indent: spherical indenter into a 2d solid kim: use of potentials in Knowledge Base for Interatomic Models (KIM) meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system micelle: self-assembly of small lipid-like molecules into 2d bilayers min: energy minimization of 2d LJ melt msst: MSST shock dynamics nb3b: use of nonbonded 3-body harmonic pair style neb: nudged elastic band (NEB) calculation for barrier finding nemd: non-equilibrium MD of 2d sheared system obstacle: flow around two voids in a 2d channel peptide: dynamics of a small solvated peptide chain (5-mer) peri: Peridynamic model of cylinder impacted by indenter pour: pouring of granular particles into a 3d box, then chute flow prd: parallel replica dynamics of vacancy diffusion in bulk Si python: use of PYTHON package to invoke Python code from input script qeq: use of QEQ pacakge for charge equilibration reax: RDX and TATB models using the ReaxFF rigid: rigid bodies modeled as independent or coupled shear: sideways shear applied to 2d solid, with and without a void snap: use of SNAP potential for Ta srd: stochastic rotation dynamics (SRD) particles as solvent snap: NVE dynamics for BCC tantalum crystal using SNAP potential streitz: Streitz-Mintmire potential for Al2O3 tad: temperature-accelerated dynamics of vacancy diffusion in bulk Si +vashishta: models using the Vashishta potential voronoi: test of Voronoi tesselation in compute voronoi/atom Here is a src/Make.py command which will perform a parallel build of a LAMMPS executable "lmp_mpi" with all the packages needed by all the examples, with the exception of the accelerate sub-directory. See the accelerate/README for Make.py commands suitable for its example scripts. cd src Make.py -j 16 -p none std no-lib reax meam poems reaxc orig -a lib-all mpi Here is how you might run and visualize one of the sample problems: cd indent cp ../../src/lmp_mpi . # copy LAMMPS executable to this dir lmp_mpi < in.indent # run the problem Running the simulation produces the files {dump.indent} and {log.lammps}. You can visualize the dump file as follows: ../../tools/xmovie/xmovie -scale dump.indent If you uncomment the dump image line(s) in the input script a series of JPG images will be produced by the run. These can be viewed individually or turned into a movie or animated by tools like ImageMagick or QuickTime or various Windows-based tools. See the dump image doc page for more details. E.g. this Imagemagick command would create a GIF file suitable for viewing in a browser. % convert -loop 1 *.jpg foo.gif ------------------------------------------ Upper-case directories The ASPHERE directory has examples of how to model aspherical particles with or without solvent, in 3 styles LAMMPS provides. Namely point ellipsoids, rigid bodies, and generalized aspherical bodies built from line/triangle surface facets in 2d/3d. See the ASPHERE/README file to get started. The COUPLE directory has examples of how to use LAMMPS as a library, either by itself or in tandem with another code or library. See the COUPLE/README file to get started. The ELASTIC directory has an example script for computing elastic constants at zero temperature, using an Si example. See the ELASTIC/in.elastic file for more info. The ELASTIC_T directory has an example script for computing elastic constants at finite temperature, using an Si example. See the ELASTIC_T/in.elastic file for more info. The KAPPA directory has example scripts for computing the thermal conductivity (kappa) of a LJ liquid using 4 different methods. See the KAPPA/README file for more info. The MC directory has an example script for using LAMMPS as an energy-evaluation engine in a iterative Monte Carlo energy-relaxation loop. The USER directory contains subdirectories of user-provided example scripts for ser packages. See the README files in those directories for more info. See the doc/Section_start.html file for more info about installing and building user packages. The VISCOSITY directory has example scripts for computing the viscosity of a LJ liquid using 4 different methods. See the VISCOSITY/README file for more info. diff --git a/examples/vashishta/InP.vashishta b/examples/vashishta/InP.vashishta new file mode 100755 index 000000000..9fefd4ef1 --- /dev/null +++ b/examples/vashishta/InP.vashishta @@ -0,0 +1,38 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Branicio, Rino, Gan and Tsuzuki, J. Phys Condensed Matter 21 (2009) 095002 +# +# Vashishta potential file for InP, Branicio, Rino, Gan and Tsuzuki, +# J. Phys Condensed Matter 21 (2009) 095002 +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless + +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +In In In 273.584 7 -1.21 -1.21 4.5 0.0 2.75 + 0.0 6.0 0.0 0.0 0.0 0.0 0.0 + +P P P 1813.06 7 1.21 1.21 4.5 52.7067 2.75 + 0.0 6.0 0.0 0.0 0.0 0.0 -0.333333333333 + +In P P 4847.09 9 1.21 -1.21 4.5 26.3533 2.75 + 270.105 6.0 4.34967 1.0 3.55 7.0 -0.333333333333 + +P In In 4847.09 9 1.21 -1.21 4.5 26.3533 2.75 + 270.105 6.0 4.34967 1.0 3.55 7.0 -0.333333333333 + +In In P 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +In P In 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +P In P 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +P P In 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/examples/vashishta/SiO.1990.vashishta b/examples/vashishta/SiO.1990.vashishta new file mode 100755 index 000000000..f0f9ab354 --- /dev/null +++ b/examples/vashishta/SiO.1990.vashishta @@ -0,0 +1,41 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: P. Vashishta, R. K. Kalia, J. P. Rino, and I. Ebbsjo, Phys. Rev. B 41, 12197 (1990). +# +# Vashishta potential file for SiO2, P. Vashishta, R. K. Kalia, J. P. Rino, and I. Ebbsjo, +# Phys. Rev. B 41, 12197 (1990). +# +# These parameters, some inferred indirectly, give a good +# match to the energy-volume curve for alpha-quartz in Fig. 2 of the paper. +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless +# +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +Si Si Si 0.82023 11 1.6 1.6 999 0.0 4.43 + 0.0 10.0 0.0 0.0 0.0 0.0 0.0 + +O O O 743.848 7 -0.8 -0.8 999 22.1179 4.43 + 0.0 10.0 0.0 0.0 0.0 0.0 0.0 + +O Si Si 163.859 9 -0.8 1.6 999 44.2357 4.43 + 0.0 10.0 20.146 1.0 2.60 0.0 -0.77714596 + +Si O O 163.859 9 1.6 -0.8 999 44.2357 4.43 + 0.0 10.0 5.0365 1.0 2.60 0.0 -0.333333333333 + +Si O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/examples/vashishta/data.quartz b/examples/vashishta/data.quartz new file mode 100644 index 000000000..6c06201ff --- /dev/null +++ b/examples/vashishta/data.quartz @@ -0,0 +1,26 @@ +# SiO2 alpha quartz + + 9 atoms + 2 atom types + +0 4.913400 xlo xhi +0 4.255129 ylo yhi +0 5.405200 zlo zhi +-2.456700 0.0 0.0 xy xz yz + +Masses + + 1 28.0855 + 2 15.9994 + +Atoms + + 1 1 2.308807 0.000000 3.603467 + 2 1 -1.154403 1.999485 1.801733 + 3 1 -1.154403 -1.999485 0.000000 + 4 2 1.375998 1.140800 4.245244 + 5 2 -1.675961 0.621249 7.848711 + 6 2 0.299963 -1.762049 6.046977 + 7 2 0.299963 1.762049 -4.245244 + 8 2 -1.675961 -0.621249 -0.64177 + 9 2 1.375998 -1.140800 -2.443511 diff --git a/examples/vashishta/in.indiumphosphide b/examples/vashishta/in.indiumphosphide new file mode 100644 index 000000000..41a87345d --- /dev/null +++ b/examples/vashishta/in.indiumphosphide @@ -0,0 +1,75 @@ +# calculate the energy volume curve for InP zincblende + +# define volume range and filename + +variable ndelta equal 100 +variable volatom_min equal 20.0 +variable volatom_max equal 29.0 +variable evsvolfile string evsvol.dat + +# set up cell + +units metal + +boundary p p p + +# setup loop variables for box volume + +variable amin equal ${volatom_min}^(1/3)*2 +variable delta equal (${volatom_max}-${volatom_min})/${ndelta} +variable scale equal (${delta}/v_volatom+1)^(1/3) + +# set up 8 atom InP zincblende unit cell + +lattice diamond ${amin} + +region box prism & + 0 1 & + 0 1 & + 0 1 & + 0 0 0 + +create_box 2 box + +create_atoms 1 box & + basis 5 2 & + basis 6 2 & + basis 7 2 & + basis 8 2 + +mass 1 114.76 +mass 2 30.98 + +# choose potential + +pair_style vashishta +pair_coeff * * InP.vashishta In P + +# setup neighbor style + +neighbor 1.0 nsq +neigh_modify once no every 1 delay 0 check yes + +# setup output + +thermo_style custom step temp pe press vol +thermo_modify norm no +variable volatom equal vol/atoms +variable eatom equal pe/atoms +print "# Volume [A^3/atom] Energy [eV/atom]" file ${evsvolfile} + +# loop over range of volumes + +label loop +variable i loop ${ndelta} + +change_box all x scale ${scale} y scale ${scale} z scale ${scale} remap + +# calculate energy +# no energy minimization needed for zincblende + +run 0 +print "${volatom} ${eatom}" append ${evsvolfile} + +next i +jump SELF loop diff --git a/examples/vashishta/in.sio2 b/examples/vashishta/in.sio2 new file mode 100644 index 000000000..885eb61a7 --- /dev/null +++ b/examples/vashishta/in.sio2 @@ -0,0 +1,28 @@ +# test Vashishta potential for quartz + +units metal +boundary p p p + +atom_style atomic + +read_data data.quartz + +replicate 4 4 4 +velocity all create 2000.0 277387 mom yes +displace_atoms all move 0.05 0.9 0.4 units box + +pair_style vashishta +pair_coeff * * SiO.1990.vashishta Si O + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all cfg 10 *.cfg mass type xs ys zs vx vy vz fx fy fz +#dump_modify 1 element Si O + +run 100 + diff --git a/potentials/InP.vashishta b/potentials/InP.vashishta new file mode 100755 index 000000000..9fefd4ef1 --- /dev/null +++ b/potentials/InP.vashishta @@ -0,0 +1,38 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Branicio, Rino, Gan and Tsuzuki, J. Phys Condensed Matter 21 (2009) 095002 +# +# Vashishta potential file for InP, Branicio, Rino, Gan and Tsuzuki, +# J. Phys Condensed Matter 21 (2009) 095002 +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless + +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +In In In 273.584 7 -1.21 -1.21 4.5 0.0 2.75 + 0.0 6.0 0.0 0.0 0.0 0.0 0.0 + +P P P 1813.06 7 1.21 1.21 4.5 52.7067 2.75 + 0.0 6.0 0.0 0.0 0.0 0.0 -0.333333333333 + +In P P 4847.09 9 1.21 -1.21 4.5 26.3533 2.75 + 270.105 6.0 4.34967 1.0 3.55 7.0 -0.333333333333 + +P In In 4847.09 9 1.21 -1.21 4.5 26.3533 2.75 + 270.105 6.0 4.34967 1.0 3.55 7.0 -0.333333333333 + +In In P 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +In P In 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +P In P 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +P P In 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/potentials/README b/potentials/README index 967ec41b1..d4dba824c 100644 --- a/potentials/README +++ b/potentials/README @@ -1,102 +1,103 @@ This directory contains potential files for different elements and alloys, as used by LAMMPS for various pair styles. See the description of the "pair_style" and "pair_coeff" commands for details of the file formats and the various styles in LAMMPS that read these files. IMPORTANT NOTE: These files are provided primarily to demonstrate the different types of interatomic potentials that LAMMPS supports. Each file has a header line with a date for when it was added to the LAMMPS distribution. Also a citation and contact info for the person who contributed it to LAMMPS (if we remember who that is). This info is not meant to "guarantee" that the potential is correct. I.e. that the contributor transcribed the info from the paper correctly or that the paper itself had no errors. In many cases (but not all), we or other LAMMPS users have confirmed that when the potential file is used with the current version of LAMMPS, it reproduces results in the cited publication. In some cases, this accuracy check may require other parameters not contained in the potential file to be specified as part of a LAMMPS simulation, e.g. a distance cutoff. Also, for particular materials and applications modeled with a pair style coded in LAMMPS, a different potential file may be more suitable than the one provided here. For best results when choosing a potential, you should do a thorough search of published literature and on-line databases such as the Interatomic Potentials Repository Project (NIST) or the Knowledgebase of Interatomic Models (KIM). Whatever potential you choose for your application, you should verify that you have defined it and are using it correctly in LAMMPS, by comparing with published results for that potential. 2nd IMPORTANT NOTE: The DATE field in the first line of each of these files is printed to the screen and log file when it is read by a LAMMPS input script. If an updated or corrected version of the same potential file is later added to the LAMMPS distribution, then a new DATE will be added to the file. This means you can "diff" an old and new log file and see that the potential file changed, which could affect your simulation results. A small amount of metadata is included in the first line of each file in order to track the provenance of each file. The metadata is indicated by a keyword followed by white space, followed by the metadata, followed by whitespace. The metadata is intended to be straightforward and human-readable, while still conforming to a standard format. DATE: Format is "yyyy-mm-dd". This indicates the date of a significant change to the file. Multiple entries can appear in reverse chronological order. As described above, the first of these will be printed to the screen and log file when it is read by a LAMMPS input script. CONTRIBUTOR: Format is "name[, email address]". This indicates the person who contributed the file and/or who is best able to provide more details about its provenance. CITATION: Format is "surname[[, surname] and surname], Publication abbreviation with spaces and no periods, volume, page[-page], (year)" COMMENT: This one is optional and is used to hold any other text that can not go elsewhere. If the first line of the file is always skipped by the file reader, then the first line should begin with the DATE keyword. If the file format supports comment lines, then the first line should be a comment line with the metadata e.g. "# DATE: 2010-01-01..." If the first line of the file is required to begin with data, then the metadata will be appended to the first line e.g. "7 DATE: 2010-01-01..." The prefix of each file indicates the element(s) it is parameterized for. An additional lower-case identification tag may be appended. Si = Silicon SiC = Silicon and Carbon Au_u3 = Gold universal 3 The suffix of each file indicates the pair style it is used with: adp ADP angular dependent potential airebo AI-REBO and REBO potentials bop.table BOP potential, tabulated form cdeam concentration-dependent EAM comb COMB potential comb3 COMB3 potential eam embedded atom method (EAM) single element, DYNAMO funcfl format eam.alloy EAM multi-element alloy, DYNAMO setfl format eam.fs Finnis-Sinclair EAM format (single element or alloy) edip EDIP potential for silicon-based materials eim embedded-ion method (EIM) potential lcbop LCBOP long-range bond-order potential meam modified EAM (MEAM) library and individual elements/alloys meam.spline modified EAM (MEAM) spline potential meam.sw.spline modified EAM (MEAM) Stillinger-Weber spline potential nb3b.harmonic nonbonded 3-body harmonic potential poly polymorphic 3-body potential reax ReaxFF potential (see README.reax for more info) snap SNAP potential snapcoeff SNAP potential snapparam SNAP potential streitz Coulombic portion of Streitz-Mintmire potential sw Stillinger-Weber potential tersoff Tersoff potential tersoff.mod modified Tersoff potential tersoff.zbl Tersoff with ZBL core +vashishta Vashishta 2-body and 3-body potential diff --git a/potentials/SiC.vashishta b/potentials/SiC.vashishta new file mode 100755 index 000000000..4444fa24e --- /dev/null +++ b/potentials/SiC.vashishta @@ -0,0 +1,41 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: P. Vashishta, R. K. Kalia, A. Nakano, and J. P. Rino. J. Appl. Phys. 101, 103515 (2007). +# +# Vashishta potential file for SiC, P. Vashishta, R. K. Kalia, A. Nakano, +# and J. P. Rino. J. Appl. Phys. 101, 103515 (2007). +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless +# +# Note: Value of D here equals D/2 in paper +# +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +C C C 471.74538 7 -1.201 -1.201 5.0 0.0 3.0 + 0.0 7.35 0.0 0.0 0.0 0.0 0.0 + +Si Si Si 23.67291 7 1.201 1.201 5.0 15.575 3.0 + 0.0 7.35 0.0 0.0 0.0 0.0 0.0 + +C Si Si 447.09026 9 -1.201 1.201 5.0 7.7874 3.0 + 61.4694 7.35 9.003 1.0 2.90 5.0 -0.333333333333 + +Si C C 447.09026 9 1.201 -1.201 5.0 7.7874 3.0 + 61.4694 7.35 9.003 1.0 2.90 5.0 -0.333333333333 + +C C Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +C Si C 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si C Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si Si C 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + diff --git a/potentials/SiO.1990.vashishta b/potentials/SiO.1990.vashishta new file mode 100755 index 000000000..f0f9ab354 --- /dev/null +++ b/potentials/SiO.1990.vashishta @@ -0,0 +1,41 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: P. Vashishta, R. K. Kalia, J. P. Rino, and I. Ebbsjo, Phys. Rev. B 41, 12197 (1990). +# +# Vashishta potential file for SiO2, P. Vashishta, R. K. Kalia, J. P. Rino, and I. Ebbsjo, +# Phys. Rev. B 41, 12197 (1990). +# +# These parameters, some inferred indirectly, give a good +# match to the energy-volume curve for alpha-quartz in Fig. 2 of the paper. +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless +# +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +Si Si Si 0.82023 11 1.6 1.6 999 0.0 4.43 + 0.0 10.0 0.0 0.0 0.0 0.0 0.0 + +O O O 743.848 7 -0.8 -0.8 999 22.1179 4.43 + 0.0 10.0 0.0 0.0 0.0 0.0 0.0 + +O Si Si 163.859 9 -0.8 1.6 999 44.2357 4.43 + 0.0 10.0 20.146 1.0 2.60 0.0 -0.77714596 + +Si O O 163.859 9 1.6 -0.8 999 44.2357 4.43 + 0.0 10.0 5.0365 1.0 2.60 0.0 -0.333333333333 + +Si O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/potentials/SiO.1994.vashishta b/potentials/SiO.1994.vashishta new file mode 100755 index 000000000..d5e23fd1a --- /dev/null +++ b/potentials/SiO.1994.vashishta @@ -0,0 +1,38 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Nakano, Kalia, and Vashishta, J. Non-Crystal. Solids, v. 171, p. 157 (1994) +# +# Vashishta potential file for SiO2, Nakano, Kalia, and Vashishta, +# J. Non-Crystal. Solids, v. 171, p. 157 (1994) +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless +# +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +Si Si Si 0.80603 11 1.76 1.76 4.43 0.0 2.5 + 0.0 5.5 0.0 0.0 0.0 0.0 0.0 + +O O O 730.17 7 -0.88 -0.88 4.43 26.7447 2.5 + 0.0 5.5 0.0 0.0 0.0 0.0 0.0 + +O Si Si 160.849 9 -0.88 1.76 4.43 53.4894 2.5 + 0.0 5.5 19.972 1.0 2.60 0.0 -0.77714596 + +Si O O 160.849 9 1.76 -0.88 4.43 53.4894 2.5 + 0.0 5.5 4.993 1.0 2.60 0.0 -0.333333333333 + +Si O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/potentials/SiO.1997.vashishta b/potentials/SiO.1997.vashishta new file mode 100755 index 000000000..eeadf4d6c --- /dev/null +++ b/potentials/SiO.1997.vashishta @@ -0,0 +1,37 @@ +# DATE: 2015-10-14 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Broughton, Meli,Vashishta,and Kalia, Phys Rev B, v. 56, p. 611 (1997) +# +# Vashishta potential file for SiO2, Broughton, Meli,Vashishta,and Kalia, Phys Rev B, v. 56, p. 611 (1997) +# +# These entries are in LAMMPS "metal" units: +# H = eV*Angstroms^eta; Zi, Zj = |e| (e = electronic charge); +# lambda1, lambda4, rc, r0, gamma = Angstroms; +# D = eV*Angstroms^4; W = eV*Angstroms^6; B = eV; +# other quantities are unitless +# +# element1 element2 element3 +# H eta Zi Zj lambda1 D lambda4 +# W rc B gamma r0 C cos(theta) + +Si Si Si 0.15500 11 0.7872 0.7872 4.43 0.0 2.5 + 0.0 5.5 0.0 0.0 0.0 0.0 0.0 + +O O O 140.38 7 -0.3936 -0.3936 4.43 5.3504 2.5 + 0.0 5.5 0.0 0.0 0.0 0.0 0.0 + +O Si Si 30.923 9 -0.3936 0.7872 4.43 10.701 2.5 + 0.0 5.5 19.972 1.0 2.60 0.0 -0.80593 + +Si O O 30.923 9 0.7872 -0.3936 4.43 10.701 2.5 + 0.0 5.5 4.993 1.0 2.60 0.0 -0.333333333333 + +Si O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +Si Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O Si O 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + +O O Si 0.0 0.0 0.0 0.0 0.0 0.0 0.0 + 0.0 0.0 0.0 0.0 0.0 0.0 0.0 diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp new file mode 100755 index 000000000..3a5be8449 --- /dev/null +++ b/src/MANYBODY/pair_vashishta.cpp @@ -0,0 +1,619 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing author: Aidan Thompson (SNL) +------------------------------------------------------------------------- */ + +#include "math.h" +#include "stdio.h" +#include "stdlib.h" +#include "string.h" +#include "pair_vashishta.h" +#include "atom.h" +#include "neighbor.h" +#include "neigh_request.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; +//using namespace MathConst; + +#define MAXLINE 1024 +#define DELTA 4 + +/* ---------------------------------------------------------------------- */ + +PairVashishta::PairVashishta(LAMMPS *lmp) : Pair(lmp) +{ + single_enable = 0; + restartinfo = 0; + one_coeff = 1; + manybody_flag = 1; + + nelements = 0; + elements = NULL; + nparams = maxparam = 0; + params = NULL; + elem2param = NULL; +} + +/* ---------------------------------------------------------------------- + check if allocated, since class can be destructed when incomplete +------------------------------------------------------------------------- */ + +PairVashishta::~PairVashishta() +{ + if (elements) + for (int i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + memory->destroy(params); + memory->destroy(elem2param); + + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + delete [] map; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::compute(int eflag, int vflag) +{ + int i,j,k,ii,jj,kk,inum,jnum,jnumm1; + int itype,jtype,ktype,ijparam,ikparam,ijkparam; + tagint itag,jtag; + double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; + double rsq,rsq1,rsq2; + double delr1[3],delr2[3],fj[3],fk[3]; + int *ilist,*jlist,*numneigh,**firstneigh; + + evdwl = 0.0; + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = 0; + + double **x = atom->x; + double **f = atom->f; + tagint *tag = atom->tag; + int *type = atom->type; + int nlocal = atom->nlocal; + int newton_pair = force->newton_pair; + + inum = list->inum; + ilist = list->ilist; + numneigh = list->numneigh; + firstneigh = list->firstneigh; + + // loop over full neighbor list of my atoms + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + itag = tag[i]; + itype = map[type[i]]; + xtmp = x[i][0]; + ytmp = x[i][1]; + ztmp = x[i][2]; + + // two-body interactions, skip half of them + + jlist = firstneigh[i]; + jnum = numneigh[i]; + + for (jj = 0; jj < jnum; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + jtag = tag[j]; + + if (itag > jtag) { + if ((itag+jtag) % 2 == 0) continue; + } else if (itag < jtag) { + if ((itag+jtag) % 2 == 1) continue; + } else { + if (x[j][2] < ztmp) continue; + if (x[j][2] == ztmp && x[j][1] < ytmp) continue; + if (x[j][2] == ztmp && x[j][1] == ytmp && x[j][0] < xtmp) continue; + } + + jtype = map[type[j]]; + + delx = xtmp - x[j][0]; + dely = ytmp - x[j][1]; + delz = ztmp - x[j][2]; + rsq = delx*delx + dely*dely + delz*delz; + + ijparam = elem2param[itype][jtype][jtype]; + if (rsq > params[ijparam].cutsq) continue; + + twobody(¶ms[ijparam],rsq,fpair,eflag,evdwl); + + f[i][0] += delx*fpair; + f[i][1] += dely*fpair; + f[i][2] += delz*fpair; + f[j][0] -= delx*fpair; + f[j][1] -= dely*fpair; + f[j][2] -= delz*fpair; + + if (evflag) ev_tally(i,j,nlocal,newton_pair, + evdwl,0.0,fpair,delx,dely,delz); + } + + jnumm1 = jnum - 1; + + for (jj = 0; jj < jnumm1; jj++) { + j = jlist[jj]; + j &= NEIGHMASK; + jtype = map[type[j]]; + ijparam = elem2param[itype][jtype][jtype]; + delr1[0] = x[j][0] - xtmp; + delr1[1] = x[j][1] - ytmp; + delr1[2] = x[j][2] - ztmp; + rsq1 = delr1[0]*delr1[0] + delr1[1]*delr1[1] + delr1[2]*delr1[2]; + if (rsq1 >= params[ijparam].cutsq2) continue; + + for (kk = jj+1; kk < jnum; kk++) { + k = jlist[kk]; + k &= NEIGHMASK; + ktype = map[type[k]]; + ikparam = elem2param[itype][ktype][ktype]; + ijkparam = elem2param[itype][jtype][ktype]; + + delr2[0] = x[k][0] - xtmp; + delr2[1] = x[k][1] - ytmp; + delr2[2] = x[k][2] - ztmp; + rsq2 = delr2[0]*delr2[0] + delr2[1]*delr2[1] + delr2[2]*delr2[2]; + if (rsq2 >= params[ikparam].cutsq2) continue; + + threebody(¶ms[ijparam],¶ms[ikparam],¶ms[ijkparam], + rsq1,rsq2,delr1,delr2,fj,fk,eflag,evdwl); + + f[i][0] -= fj[0] + fk[0]; + f[i][1] -= fj[1] + fk[1]; + f[i][2] -= fj[2] + fk[2]; + f[j][0] += fj[0]; + f[j][1] += fj[1]; + f[j][2] += fj[2]; + f[k][0] += fk[0]; + f[k][1] += fk[1]; + f[k][2] += fk[2]; + + if (evflag) ev_tally3(i,j,k,evdwl,0.0,fj,fk,delr1,delr2); + } + } + } + + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::allocate() +{ + allocated = 1; + int n = atom->ntypes; + + memory->create(setflag,n+1,n+1,"pair:setflag"); + memory->create(cutsq,n+1,n+1,"pair:cutsq"); + + map = new int[n+1]; +} + +/* ---------------------------------------------------------------------- + global settings +------------------------------------------------------------------------- */ + +void PairVashishta::settings(int narg, char **arg) +{ + if (narg != 0) error->all(FLERR,"Illegal pair_style command"); +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs +------------------------------------------------------------------------- */ + +void PairVashishta::coeff(int narg, char **arg) +{ + int i,j,n; + + if (!allocated) allocate(); + + if (narg != 3 + atom->ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // insure I,J args are * * + + if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // read args that map atom types to elements in potential file + // map[i] = which element the Ith atom type is, -1 if NULL + // nelements = # of unique elements + // elements = list of element names + + if (elements) { + for (i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + } + elements = new char*[atom->ntypes]; + for (i = 0; i < atom->ntypes; i++) elements[i] = NULL; + + nelements = 0; + for (i = 3; i < narg; i++) { + if (strcmp(arg[i],"NULL") == 0) { + map[i-2] = -1; + continue; + } + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) break; + map[i-2] = j; + if (j == nelements) { + n = strlen(arg[i]) + 1; + elements[j] = new char[n]; + strcpy(elements[j],arg[i]); + nelements++; + } + } + + // read potential file and initialize potential parameters + + read_file(arg[2]); + setup(); + + // clear setflag since coeff() called once with I,J = * * + + n = atom->ntypes; + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; + + // set setflag i,j for type pairs where both are mapped to elements + + int count = 0; + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + if (map[i] >= 0 && map[j] >= 0) { + setflag[i][j] = 1; + count++; + } + + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairVashishta::init_style() +{ + if (atom->tag_enable == 0) + error->all(FLERR,"Pair style Vashishta requires atom IDs"); + if (force->newton_pair == 0) + error->all(FLERR,"Pair style Vashishta requires newton pair on"); + + // need a full neighbor list + + int irequest = neighbor->request(this); + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +double PairVashishta::init_one(int i, int j) +{ + if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + + return cutmax; +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::read_file(char *file) +{ + int params_per_line = 17; + char **words = new char*[params_per_line+1]; + + memory->sfree(params); + params = NULL; + nparams = maxparam = 0; + + // open file on proc 0 + + FILE *fp; + if (comm->me == 0) { + fp = force->open_potential(file); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open Vashishta potential file %s",file); + error->one(FLERR,str); + } + } + + // read each set of params from potential file + // one set of params can span multiple lines + // store params if all 3 element tags are in element list + + int n,nwords,ielement,jelement,kelement; + char line[MAXLINE],*ptr; + int eof = 0; + + while (1) { + if (comm->me == 0) { + ptr = fgets(line,MAXLINE,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + + // strip comment, skip line if blank + + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + if (nwords == 0) continue; + + // concatenate additional lines until have params_per_line words + + while (nwords < params_per_line) { + n = strlen(line); + if (comm->me == 0) { + ptr = fgets(&line[n],MAXLINE-n,fp); + if (ptr == NULL) { + eof = 1; + fclose(fp); + } else n = strlen(line) + 1; + } + MPI_Bcast(&eof,1,MPI_INT,0,world); + if (eof) break; + MPI_Bcast(&n,1,MPI_INT,0,world); + MPI_Bcast(line,n,MPI_CHAR,0,world); + if ((ptr = strchr(line,'#'))) *ptr = '\0'; + nwords = atom->count_words(line); + } + + if (nwords != params_per_line) + error->all(FLERR,"Incorrect format in Vashishta potential file"); + + // words = ptrs to all words in line + + nwords = 0; + words[nwords++] = strtok(line," \t\n\r\f"); + while ((words[nwords++] = strtok(NULL," \t\n\r\f"))) continue; + + // ielement,jelement,kelement = 1st args + // if all 3 args are in element list, then parse this line + // else skip to next entry in file + + for (ielement = 0; ielement < nelements; ielement++) + if (strcmp(words[0],elements[ielement]) == 0) break; + if (ielement == nelements) continue; + for (jelement = 0; jelement < nelements; jelement++) + if (strcmp(words[1],elements[jelement]) == 0) break; + if (jelement == nelements) continue; + for (kelement = 0; kelement < nelements; kelement++) + if (strcmp(words[2],elements[kelement]) == 0) break; + if (kelement == nelements) continue; + + // load up parameter settings and error check their values + + if (nparams == maxparam) { + maxparam += DELTA; + params = (Param *) memory->srealloc(params,maxparam*sizeof(Param), + "pair:params"); + } + + params[nparams].ielement = ielement; + params[nparams].jelement = jelement; + params[nparams].kelement = kelement; + params[nparams].bigh = atof(words[3]); + params[nparams].eta = atof(words[4]); + params[nparams].zi = atof(words[5]); + params[nparams].zj = atof(words[6]); + params[nparams].lambda1 = atof(words[7]); + params[nparams].bigd = atof(words[8]); + params[nparams].lambda4 = atof(words[9]); + params[nparams].bigw = atof(words[10]); + params[nparams].cut = atof(words[11]); + params[nparams].bigb = atof(words[12]); + params[nparams].gamma = atof(words[13]); + params[nparams].r0 = atof(words[14]); + params[nparams].bigc = atof(words[15]); + params[nparams].costheta = atof(words[16]); + + if (params[nparams].bigb < 0.0 || params[nparams].gamma < 0.0 || + params[nparams].r0 < 0.0 || params[nparams].bigc < 0.0 || + params[nparams].bigh < 0.0 || params[nparams].eta < 0.0 || + params[nparams].lambda1 < 0.0 || params[nparams].bigd < 0.0 || + params[nparams].lambda4 < 0.0 || params[nparams].bigw < 0.0 || + params[nparams].cut < 0.0) + error->all(FLERR,"Illegal Vashishta parameter"); + + nparams++; + } + + delete [] words; +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::setup() +{ + int i,j,k,m,n; + + // set elem2param for all triplet combinations + // must be a single exact match to lines read from file + // do not allow for ACB in place of ABC + + memory->destroy(elem2param); + memory->create(elem2param,nelements,nelements,nelements,"pair:elem2param"); + + for (i = 0; i < nelements; i++) + for (j = 0; j < nelements; j++) + for (k = 0; k < nelements; k++) { + n = -1; + for (m = 0; m < nparams; m++) { + if (i == params[m].ielement && j == params[m].jelement && + k == params[m].kelement) { + if (n >= 0) error->all(FLERR,"Potential file has duplicate entry"); + n = m; + } + } + if (n < 0) error->all(FLERR,"Potential file is missing an entry"); + elem2param[i][j][k] = n; + } + + // compute parameter values derived from inputs + + // set cutsq using shortcut to reduce neighbor list for accelerated + // calculations. cut must remain unchanged as it is a potential parameter + + for (m = 0; m < nparams; m++) { + params[m].cutsq = params[m].cut * params[m].cut; + params[m].cutsq2 = params[m].r0 * params[m].r0; + + params[m].lam1inv = 1.0/params[m].lambda1; + params[m].lam4inv = 1.0/params[m].lambda4; + params[m].zizj = params[m].zi*params[m].zj * force->qqr2e; + // Note that bigd does not have 1/2 factor + params[m].mbigd = params[m].bigd; + params[m].heta = params[m].bigh*params[m].eta; + params[m].big2b = 2.0*params[m].bigb; + params[m].big6w = 6.0*params[m].bigw; + + params[m].rcinv = 1.0/params[m].cut; + params[m].rc2inv = 1.0/params[m].cutsq; + params[m].rc4inv = params[m].rc2inv*params[m].rc2inv; + params[m].rc6inv = params[m].rc2inv*params[m].rc4inv; + params[m].rceta = pow(params[m].rcinv,params[m].eta); + params[m].lam1rc = params[m].cut*params[m].lam1inv; + params[m].lam4rc = params[m].cut*params[m].lam4inv; + params[m].vrcc2 = params[m].zizj*params[m].rcinv * + exp(-params[m].lam1rc); + params[m].vrcc3 = params[m].mbigd*params[m].rc4inv * + exp(-params[m].lam4rc); + params[m].vrc = params[m].bigh*params[m].rceta + + params[m].vrcc2 - params[m].vrcc3 - + params[m].bigw*params[m].rc6inv; + + params[m].dvrc1 = params[m].heta*params[m].rceta*params[m].rcinv; + params[m].dvrc2 = params[m].vrcc2 * + (params[m].rcinv+params[m].lam1inv); + params[m].dvrc3 = params[m].vrcc3 * + (4.0*params[m].rcinv+params[m].lam4inv); + params[m].dvrc4 = params[m].big6w*params[m].rc6inv * + params[m].rcinv; + params[m].dvrc = params[m].dvrc3 + params[m].dvrc4 - + params[m].dvrc1 - params[m].dvrc2; + params[m].c5 = params[m].cut*params[m].dvrc - params[m].vrc; + } + + // set cutmax to max of all params + + cutmax = 0.0; + for (m = 0; m < nparams; m++) { + if (params[m].cut > cutmax) cutmax = params[m].cut; + if (params[m].r0 > cutmax) cutmax = params[m].r0; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::twobody(Param *param, double rsq, double &fforce, + int eflag, double &eng) +{ + double r,rinvsq,r4inv,r6inv,reta,lam1r,lam4r; + double vc2,vc3,vo2; + + r = sqrt(rsq); + rinvsq = 1.0/rsq; + r4inv = rinvsq*rinvsq; + r6inv = rinvsq*r4inv; + reta = pow(r,-param->eta); + lam1r = r*param->lam1inv; + lam4r = r*param->lam4inv; + vc2 = param->zizj*exp(-lam1r)/r; + vc3 = param->mbigd*r4inv*exp(-lam4r); + vo2 = param->bigh*reta + vc2 - vc3 - param->bigw*r6inv; + + fforce = (param->dvrc*r - (4.0*vc3 + lam4r*vc3+param->big6w*r6inv- + param->heta*reta - vc2-lam1r*vc2)) * rinvsq; + if (eflag) eng = vo2 - r*param->dvrc + param->c5; +} + +/* ---------------------------------------------------------------------- */ + +void PairVashishta::threebody(Param *paramij, Param *paramik, Param *paramijk, + double rsq1, double rsq2, + double *delr1, double *delr2, + double *fj, double *fk, int eflag, double &eng) +{ + double r1,rinvsq1,rainv1,gsrainv1,gsrainvsq1,expgsrainv1; + double r2,rinvsq2,rainv2,gsrainv2,gsrainvsq2,expgsrainv2; + double rinv12,cs,delcs,delcssq,facexp,facrad,frad1,frad2,pcsinv,pcsinvsq,pcs; + double facang,facang12,csfacang,csfac1,csfac2; + + r1 = sqrt(rsq1); + rinvsq1 = 1.0/rsq1; + rainv1 = 1.0/(r1 - paramij->r0); + gsrainv1 = paramij->gamma * rainv1; + gsrainvsq1 = gsrainv1*rainv1/r1; + expgsrainv1 = exp(gsrainv1); + + r2 = sqrt(rsq2); + rinvsq2 = 1.0/rsq2; + rainv2 = 1.0/(r2 - paramik->r0); + gsrainv2 = paramik->gamma * rainv2; + gsrainvsq2 = gsrainv2*rainv2/r2; + expgsrainv2 = exp(gsrainv2); + + rinv12 = 1.0/(r1*r2); + cs = (delr1[0]*delr2[0] + delr1[1]*delr2[1] + delr1[2]*delr2[2]) * rinv12; + delcs = cs - paramijk->costheta; + delcssq = delcs*delcs; + pcsinv = paramijk->bigc*delcssq + 1.0; + pcsinvsq = pcsinv*pcsinv; + pcs = delcssq/pcsinv; + + facexp = expgsrainv1*expgsrainv2; + + facrad = paramijk->bigb * facexp * pcs; + frad1 = facrad*gsrainvsq1; + frad2 = facrad*gsrainvsq2; + facang = paramijk->big2b * facexp * delcs/pcsinvsq; + facang12 = rinv12*facang; + csfacang = cs*facang; + csfac1 = rinvsq1*csfacang; + + fj[0] = delr1[0]*(frad1+csfac1)-delr2[0]*facang12; + fj[1] = delr1[1]*(frad1+csfac1)-delr2[1]*facang12; + fj[2] = delr1[2]*(frad1+csfac1)-delr2[2]*facang12; + + csfac2 = rinvsq2*csfacang; + + fk[0] = delr2[0]*(frad2+csfac2)-delr1[0]*facang12; + fk[1] = delr2[1]*(frad2+csfac2)-delr1[1]*facang12; + fk[2] = delr2[2]*(frad2+csfac2)-delr1[2]*facang12; + + if (eflag) eng = facrad; +} diff --git a/src/MANYBODY/pair_vashishta.h b/src/MANYBODY/pair_vashishta.h new file mode 100755 index 000000000..540c42d05 --- /dev/null +++ b/src/MANYBODY/pair_vashishta.h @@ -0,0 +1,122 @@ +/* ---------------------------------------------------------------------- + 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 PAIR_CLASS + +PairStyle(vashishta,PairVashishta) + +#else + +#ifndef LMP_PAIR_Vashishta_H +#define LMP_PAIR_Vashishta_H + +#include "pair.h" + +namespace LAMMPS_NS { + +class PairVashishta : public Pair { + public: + PairVashishta(class LAMMPS *); + virtual ~PairVashishta(); + virtual void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + virtual double init_one(int, int); + virtual void init_style(); + + protected: + struct Param { + double bigb,gamma,r0,bigc,costheta; + double bigh,eta,zi,zj; + double lambda1,bigd,mbigd,lambda4,bigw,cut; + double lam1inv,lam4inv,zizj,heta,big2b,big6w; + double rcinv,rc2inv,rc4inv,rc6inv,rceta; + double cutsq2,cutsq; + double lam1rc,lam4rc,vrcc2,vrcc3,vrc; + double dvrc1,dvrc2,dvrc3,dvrc4,dvrc,c5; + int ielement,jelement,kelement; + }; + + double cutmax; // max cutoff for all elements + int nelements; // # of unique elements + char **elements; // names of unique elements + int ***elem2param; // mapping from element triplets to parameters + int *map; // mapping from atom types to elements + int nparams; // # of stored parameter sets + int maxparam; // max # of parameter sets + Param *params; // parameter set for an I-J-K interaction + + virtual void allocate(); + void read_file(char *); + void setup(); + void twobody(Param *, double, double &, int, double &); + void threebody(Param *, Param *, Param *, double, double, double *, double *, + double *, double *, int, double &); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +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: Incorrect args for pair coefficients + +Self-explanatory. Check the input script or data file. + +E: Pair style Vashishta requires atom IDs + +This is a requirement to use the Vashishta potential. + +E: Pair style Vashishta requires newton pair on + +See the newton command. This is a restriction to use the Vashishta +potential. + +E: All pair coeffs are not set + +All pair coefficients must be set in the data file or by the +pair_coeff command before running a simulation. + +E: Cannot open Vashishta potential file %s + +The specified Vashishta potential file cannot be opened. Check that the path +and name are correct. + +E: Incorrect format in Vashishta potential file + +Incorrect number of words per line in the potential file. + +E: Illegal Vashishta parameter + +One or more of the coefficients defined in the potential file is +invalid. + +E: Potential file has duplicate entry + +The potential file for a Vashishta or Tersoff potential has more than +one entry for the same 3 ordered elements. + +E: Potential file is missing an entry + +The potential file for a Vashishta or Tersoff potential does not have a +needed entry. + +*/