diff --git a/doc/src/Section_commands.txt b/doc/src/Section_commands.txt index 0fbab732c..e17645e6d 100644 --- a/doc/src/Section_commands.txt +++ b/doc/src/Section_commands.txt @@ -1,1231 +1,1232 @@ "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.html 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). 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 7"_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 core LAMMPS commands, grouped by category. The "next section"_#cmd_5 lists all commands alphabetically. The next section also includes (long) lists of style options for entries that appear in the following categories as a single command (fix, compute, pair, etc). Commands that are added by user packages are not included in the categories here, but they are in the next section. Initialization: "newton"_newton.html, "package"_package.html, "processors"_processors.html, "suffix"_suffix.html, "units"_units.html Setup simulation box: "boundary"_boundary.html, "box"_box.html, "change_box"_change_box.html, "create_box"_create_box.html, "dimension"_dimension.html, "lattice"_lattice.html, "region"_region.html Setup atoms: "atom_modify"_atom_modify.html, "atom_style"_atom_style.html, "balance"_balance.html, "create_atoms"_create_atoms.html, "create_bonds"_create_bonds.html, "delete_atoms"_delete_atoms.html, "delete_bonds"_delete_bonds.html, "displace_atoms"_displace_atoms.html, "group"_group.html, "mass"_mass.html, "molecule"_molecule.html, "read_data"_read_data.html, "read_dump"_read_dump.html, "read_restart"_read_restart.html, "replicate"_replicate.html, "set"_set.html, "velocity"_velocity.html Force fields: "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "bond_coeff"_bond_coeff.html, "bond_style"_bond_style.html, "bond_write"_bond_write.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_modify"_comm_modify.html, "comm_style"_comm_style.html, "info"_info.html, "min_modify"_min_modify.html, "min_style"_min_style.html, "neigh_modify"_neigh_modify.html, "neighbor"_neighbor.html, "partition"_partition.html, "reset_timestep"_reset_timestep.html, "run_style"_run_style.html, "timer"_timer.html, "timestep"_timestep.html Operations within timestepping (fixes) and diagnostics (computes): "compute"_compute.html, "compute_modify"_compute_modify.html, "fix"_fix.html, "fix_modify"_fix_modify.html, "uncompute"_uncompute.html, "unfix"_unfix.html Output: "dump image"_dump_image.html, "dump movie"_dump_image.html, "dump"_dump.html, "dump_modify"_dump_modify.html, "restart"_restart.html, "thermo"_thermo.html, "thermo_modify"_thermo_modify.html, "thermo_style"_thermo_style.html, "undump"_undump.html, "write_coeff"_write_coeff.html, "write_data"_write_data.html, "write_dump"_write_dump.html, "write_restart"_write_restart.html Actions: "minimize"_minimize.html, "neb"_neb.html, "prd"_prd.html, "rerun"_rerun.html, "run"_run.html, "tad"_tad.html, "temper"_temper.html Input script control: "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, "python"_python.html, "quit"_quit.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, "bond_write"_bond_write.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_coeff"_write_coeff.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. "dump netcdf"_dump_netcdf.html, "dump netcdf/mpiio"_dump_netcdf.html, "dump vtk"_dump_vtk.html, "group2ndx"_group2ndx.html, "ndx2group"_group2ndx.html, "temper/grem"_temper_grem.html :tb(c=3,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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "adapt"_fix_adapt.html, "addforce"_fix_addforce.html, "append/atoms"_fix_append_atoms.html, "atom/swap"_fix_atom_swap.html, "aveforce"_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/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, "cmap"_fix_cmap.html, "controller"_fix_controller.html, "deform (k)"_fix_deform.html, "deposit"_fix_deposit.html, "drag"_fix_drag.html, "dt/reset"_fix_dt_reset.html, "efield"_fix_efield.html, "ehex"_fix_ehex.html, "enforce2d"_fix_enforce2d.html, "evaporate"_fix_evaporate.html, "external"_fix_external.html, "freeze"_fix_freeze.html, "gcmc"_fix_gcmc.html, "gld"_fix_gld.html, "gravity (o)"_fix_gravity.html, "halt"_fix_halt.html, "heat"_fix_heat.html, "indent"_fix_indent.html, "langevin (k)"_fix_langevin.html, "lineforce"_fix_lineforce.html, "momentum (k)"_fix_momentum.html, "move"_fix_move.html, "mscg"_fix_mscg.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/body"_fix_nph_body.html, "nph/sphere (o)"_fix_nph_sphere.html, "npt (kio)"_fix_nh.html, "npt/asphere (o)"_fix_npt_asphere.html, "npt/body"_fix_npt_body.html, "npt/sphere (o)"_fix_npt_sphere.html, "nve (kio)"_fix_nve.html, "nve/asphere (i)"_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 (iko)"_fix_nh.html, "nvt/asphere (o)"_fix_nvt_asphere.html, "nvt/body"_fix_nvt_body.html, "nvt/sllod (io)"_fix_nvt_sllod.html, "nvt/sphere (o)"_fix_nvt_sphere.html, "oneway"_fix_oneway.html, "orient/bcc"_fix_orient.html, "orient/fcc"_fix_orient.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, "python"_fix_python.html, "qeq/comb (o)"_fix_qeq_comb.html, "qeq/dynamic"_fix_qeq.html, "qeq/fire"_fix_qeq.html, "qeq/point"_fix_qeq.html, "qeq/shielded"_fix_qeq.html, "qeq/slater"_fix_qeq.html, "rattle"_fix_shake.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 (o)"_fix_rigid.html, "rigid/small/npt (o)"_fix_rigid.html, "rigid/small/nve (o)"_fix_rigid.html, "rigid/small/nvt (o)"_fix_rigid.html, "setforce (k)"_fix_setforce.html, "shake"_fix_shake.html, "spring"_fix_spring.html, "spring/chunk"_fix_spring_chunk.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"_fix_temp_berendsen.html, "temp/csld"_fix_temp_csvr.html, "temp/csvr"_fix_temp_csvr.html, "temp/rescale"_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"_fix_viscous.html, "wall/colloid"_fix_wall.html, "wall/gran"_fix_wall_gran.html, "wall/gran/region"_fix_wall_gran_region.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/correlate/long"_fix_ave_correlate_long.html, "colvars"_fix_colvars.html, "dpd/energy"_fix_dpd_energy.html, "drude"_fix_drude.html, "drude/transform/direct"_fix_drude_transform.html, "drude/transform/reverse"_fix_drude_transform.html, "eos/cv"_fix_eos_cv.html, "eos/table"_fix_eos_table.html, "eos/table/rx"_fix_eos_table_rx.html, "filter/corotate"_fix_filter_corotate.html, "flow/gauss"_fix_flow_gauss.html, "gle"_fix_gle.html, "grem"_fix_grem.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, "manifoldforce"_fix_manifoldforce.html, "meso/stationary"_fix_meso_stationary.html, "nve/dot"_fix_nve_dot.html, "nve/dotc/langevin"_fix_nve_dotc_langevin.html, "nve/manifold/rattle"_fix_nve_manifold_rattle.html, "nvk"_fix_nvk.html, "nvt/manifold/rattle"_fix_nvt_manifold_rattle.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 (ko)"_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, "rx"_fix_rx.html, "saed/vtk"_fix_saed_vtk.html, "shardlow"_fix_shardlow.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/wall/surface"_fix_smd_wall_surface.html, "temp/rescale/eff"_fix_temp_rescale_eff.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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "angle"_compute_angle.html, "angle/local"_compute_angle_local.html, "angmom/chunk"_compute_angmom_chunk.html, "body/local"_compute_body_local.html, "bond"_compute_bond.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"_compute_dihedral.html, "dihedral/local"_compute_dihedral_local.html, "dilatation/atom"_compute_dilatation_atom.html, "dipole/chunk"_compute_dipole_chunk.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, "global/atom"_compute_global_atom.html, "group/group"_compute_group_group.html, "gyration"_compute_gyration.html, "gyration/chunk"_compute_gyration_chunk.html, "heat/flux"_compute_heat_flux.html, "hexorder/atom"_compute_hexorder_atom.html, "improper"_compute_improper.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, "orientorder/atom"_compute_orientorder_atom.html, "pair"_compute_pair.html, "pair/local"_compute_pair_local.html, "pe"_compute_pe.html, "pe/atom"_compute_pe_atom.html, "plasticity/atom"_compute_plasticity_atom.html, "pressure"_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, "rigid/local"_compute_rigid_local.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 (k)"_compute_temp.html, "temp/asphere"_compute_temp_asphere.html, "temp/body"_compute_temp_body.html, "temp/chunk"_compute_temp_chunk.html, "temp/com"_compute_temp_com.html, "temp/deform"_compute_temp_deform.html, "temp/partial"_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, "cnp/atom"_compute_cnp_atom.html, "dpd"_compute_dpd.html, "dpd/atom"_compute_dpd_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, "pe/mol/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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_pair_none.html, "zero"_pair_zero.html, "hybrid"_pair_hybrid.html, "hybrid/overlay"_pair_hybrid.html, "adp (o)"_pair_adp.html, "airebo (o)"_pair_airebo.html, "airebo/morse (o)"_pair_airebo.html, "beck (go)"_pair_beck.html, "body"_pair_body.html, "bop"_pair_bop.html, "born (go)"_pair_born.html, "born/coul/dsf"_pair_born.html, "born/coul/dsf/cs"_pair_born.html, "born/coul/long (go)"_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 (gkio)"_pair_buck.html, "buck/coul/cut (gkio)"_pair_buck.html, "buck/coul/long (gkio)"_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 (go)"_pair_dpd.html, "dpd/tstat (go)"_pair_dpd.html, "dsmc"_pair_dsmc.html, "eam (gkiot)"_pair_eam.html, "eam/alloy (gkot)"_pair_eam.html, "eam/fs (gkot)"_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 (o)"_pair_gran.html, "gran/hooke/history (o)"_pair_gran.html, "gw"_pair_gw.html, "gw/zbl"_pair_gw.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"_pair_line_lj.html, "lj/charmm/coul/charmm (ko)"_pair_charmm.html, "lj/charmm/coul/charmm/implicit (ko)"_pair_charmm.html, "lj/charmm/coul/long (giko)"_pair_charmm.html, "lj/charmm/coul/msm"_pair_charmm.html, "lj/charmmfsw/coul/charmmfsh"_pair_charmm.html, "lj/charmmfsw/coul/long"_pair_charmm.html, "lj/class2 (gko)"_pair_class2.html, "lj/class2/coul/cut (ko)"_pair_class2.html, "lj/class2/coul/long (gko)"_pair_class2.html, "lj/cubic (go)"_pair_lj_cubic.html, "lj/cut (gikot)"_pair_lj.html, "lj/cut/coul/cut (gko)"_pair_lj.html, "lj/cut/coul/debye (gko)"_pair_lj.html, "lj/cut/coul/dsf (gko)"_pair_lj.html, "lj/cut/coul/long (gikot)"_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 (gko)"_pair_lj_expand.html, "lj/gromacs (gko)"_pair_gromacs.html, "lj/gromacs/coul/gromacs (ko)"_pair_gromacs.html, "lj/long/coul/long (io)"_pair_lj_long.html, "lj/long/dipole/long"_pair_dipole.html, "lj/long/tip4p/long"_pair_lj_long.html, "lj/smooth (o)"_pair_lj_smooth.html, "lj/smooth/linear (o)"_pair_lj_smooth_linear.html, "lj96/cut (go)"_pair_lj96.html, "lubricate (o)"_pair_lubricate.html, "lubricate/poly (o)"_pair_lubricate.html, "lubricateU"_pair_lubricateU.html, "lubricateU/poly"_pair_lubricateU.html, "meam"_pair_meam.html, "mie/cut (o)"_pair_mie.html, "morse (gkot)"_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, "python"_pair_python.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 (gkio)"_pair_sw.html, "table (gko)"_pair_table.html, "tersoff (gkio)"_pair_tersoff.html, "tersoff/mod (gko)"_pair_tersoff_mod.html, "tersoff/mod/c (o)"_pair_tersoff_mod.html, "tersoff/zbl (gko)"_pair_tersoff_zbl.html, "tip4p/cut (o)"_pair_coul.html, "tip4p/long (o)"_pair_coul.html, "tri/lj"_pair_tri_lj.html, "vashishta (ko)"_pair_vashishta.html, "vashishta/table (o)"_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. "agni (o)"_pair_agni.html, "awpmd/cut"_pair_awpmd.html, "buck/mdf"_pair_mdf.html, "coul/cut/soft (o)"_pair_lj_soft.html, "coul/diel (o)"_pair_coul_diel.html, "coul/long/soft (o)"_pair_lj_soft.html, "dpd/fdt"_pair_dpd_fdt.html, "dpd/fdt/energy"_pair_dpd_fdt.html, "eam/cd (o)"_pair_eam.html, "edip (o)"_pair_edip.html, "edip/multi"_pair_edip.html, "eff/cut"_pair_eff.html, "exp6/rx"_pair_exp6_rx.html, "gauss/cut"_pair_gauss.html, "kolmogorov/crespi/z"_pair_kolmogorov_crespi_z.html, "lennard/mdf"_pair_mdf.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/thole/long (o)"_pair_thole.html, "lj/cut/tip4p/long/soft (o)"_pair_lj_soft.html, "lj/mdf"_pair_mdf.html, "lj/sdk (gko)"_pair_sdk.html, "lj/sdk/coul/long (go)"_pair_sdk.html, "lj/sdk/coul/msm (o)"_pair_sdk.html, +"meam/c"_pair_meam.html, "meam/spline (o)"_pair_meam_spline.html, "meam/sw/spline"_pair_meam_sw_spline.html, "mgpt"_pair_mgpt.html, "momb"_pair_momb.html, "morse/smooth/linear"_pair_morse.html, "morse/soft"_pair_morse.html, "multi/lucy"_pair_multi_lucy.html, "multi/lucy/rx"_pair_multi_lucy_rx.html, "oxdna/coaxstk"_pair_oxdna.html, "oxdna/excv"_pair_oxdna.html, "oxdna/hbond"_pair_oxdna.html, "oxdna/stk"_pair_oxdna.html, "oxdna/xstk"_pair_oxdna.html, "oxdna2/coaxstk"_pair_oxdna2.html, "oxdna2/dh"_pair_oxdna2.html, "oxdna2/excv"_pair_oxdna2.html, "oxdna2/stk"_pair_oxdna2.html, "quip"_pair_quip.html, "reax/c (ko)"_pair_reaxc.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, "smtbq"_pair_smtbq.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, "table/rx"_pair_table_rx.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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_bond_none.html, "zero"_bond_zero.html, "hybrid"_bond_hybrid.html, "class2 (ko)"_bond_class2.html, "fene (iko)"_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, "oxdna/fene"_bond_oxdna.html, "oxdna2/fene"_bond_oxdna.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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_angle_none.html, "zero"_angle_zero.html, "hybrid"_angle_hybrid.html, "charmm (ko)"_angle_charmm.html, "class2 (ko)"_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 (iko)"_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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_dihedral_none.html, "zero"_dihedral_zero.html, "hybrid"_dihedral_hybrid.html, "charmm (ko)"_dihedral_charmm.html, "charmmfsw"_dihedral_charmm.html, "class2 (ko)"_dihedral_class2.html, "harmonic (io)"_dihedral_harmonic.html, "helix (o)"_dihedral_helix.html, "multi/harmonic (o)"_dihedral_multi_harmonic.html, "opls (iko)"_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, "spherical (o)"_dihedral_spherical.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: g = GPU, i = USER-INTEL, k = KOKKOS, o = USER-OMP, t = OPT. "none"_improper_none.html, "zero"_improper_zero.html, "hybrid"_improper_hybrid.html, "class2 (ko)"_improper_class2.html, "cvff (io)"_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, "distance"_improper_distance.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: 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 (go)"_kspace_style.html, "pppm/cg (o)"_kspace_style.html, "pppm/disp (i)"_kspace_style.html, "pppm/disp/tip4p"_kspace_style.html, "pppm/stagger"_kspace_style.html, "pppm/tip4p (o)"_kspace_style.html :tb(c=4,ea=c) diff --git a/doc/src/Section_packages.txt b/doc/src/Section_packages.txt index 24506379c..18030162c 100644 --- a/doc/src/Section_packages.txt +++ b/doc/src/Section_packages.txt @@ -1,2602 +1,2633 @@ "Previous Section"_Section_commands.html - "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc - "Next Section"_Section_accelerate.html :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line 4. Packages :h3 This section gives an overview of the optional packages that extend LAMMPS functionality with instructions on how to build LAMMPS with each of them. Packages are groups of files that enable a specific set of features. For example, force fields for molecular systems or granular systems are in packages. You can see the list of all packages and "make" commands to manage them by typing "make package" from within the src directory of the LAMMPS distribution. "Section 2.3"_Section_start.html#start_3 gives general info on how to install and un-install packages as part of the LAMMPS build process. There are two kinds of packages in LAMMPS, standard and user packages: "Table of standard packages"_#table_standard "Table of user packages"_#table_user :ul Standard packages are supported by the LAMMPS developers and are written in a syntax and style consistent with the rest of LAMMPS. This means the developers will answer questions about them, debug and fix them if necessary, and keep them compatible with future changes to LAMMPS. User packages have been contributed by users, and begin with the "user" prefix. If they are a single command (single file), they are typically in the user-misc package. User packages don't necessarily meet the requirements of the standard packages. If you have problems using a feature provided in a user package, you may need to contact the contributor directly to get help. Information on how to submit additions you make to LAMMPS as single files or as a standard or user package are given in "this section"_Section_modify.html#mod_15 of the manual. Following the next two tables is a sub-section for each package. It lists authors (if applicable) and summarizes the package contents. It has specific instructions on how to install the package, including (if necessary) downloading or building any extra library it requires. It also gives links to documentation, example scripts, and pictures/movies (if available) that illustrate use of the package. NOTE: To see the complete list of commands a package adds to LAMMPS, just look at the files in its src directory, e.g. "ls src/GRANULAR". Files with names that start with fix, compute, atom, pair, bond, angle, etc correspond to commands with the same style names. In these two tables, the "Example" column is a sub-directory in the examples directory of the distribution which has an input script that uses the package. E.g. "peptide" refers to the examples/peptide directory; USER/atc refers to the examples/USER/atc directory. The "Library" column indicates whether an extra library is needed to build and use the package: dash = no library sys = system library: you likely have it on your machine int = internal library: provided with LAMMPS, but you may need to build it ext = external library: you will need to download and install it on your machine :ul :line :line [Standard packages] :link(table_standard),p Package, Description, Doc page, Example, Library "ASPHERE"_#ASPHERE, aspherical particle models, "Section 6.6.14"_Section_howto.html#howto_14, ellipse, - "BODY"_#BODY, body-style particles, "body"_body.html, body, - "CLASS2"_#CLASS2, class 2 force fields, "pair_style lj/class2"_pair_class2.html, -, - "COLLOID"_#COLLOID, colloidal particles, "atom_style colloid"_atom_style.html, colloid, - "COMPRESS"_#COMPRESS, I/O compression, "dump */gz"_dump.html, -, sys "CORESHELL"_#CORESHELL, adiabatic core/shell model, "Section 6.6.25"_Section_howto.html#howto_25, coreshell, - "DIPOLE"_#DIPOLE, point dipole particles, "pair_style dipole/cut"_pair_dipole.html, dipole, - "GPU"_#GPU, GPU-enabled styles, "Section 5.3.1"_accelerate_gpu.html, WWW bench, int "GRANULAR"_#GRANULAR, granular systems, "Section 6.6.6"_Section_howto.html#howto_6, pour, - "KIM"_#KIM, openKIM wrapper, "pair_style kim"_pair_kim.html, kim, ext "KOKKOS"_#KOKKOS, Kokkos-enabled styles, "Section 5.3.3"_accelerate_kokkos.html, WWW bench, - "KSPACE"_#KSPACE, long-range Coulombic solvers, "kspace_style"_kspace_style.html, peptide, - "MANYBODY"_#MANYBODY, many-body potentials, "pair_style tersoff"_pair_tersoff.html, shear, - "MC"_#MC, Monte Carlo options, "fix gcmc"_fix_gcmc.html, -, - "MEAM"_#MEAM, modified EAM potential, "pair_style meam"_pair_meam.html, meam, int "MISC"_#MISC, miscellanous single-file commands, -, -, - "MOLECULE"_#MOLECULE, molecular system force fields, "Section 6.6.3"_Section_howto.html#howto_3, peptide, - "MPIIO"_#MPIIO, MPI parallel I/O dump and restart, "dump"_dump.html, -, - "MSCG"_#MSCG, multi-scale coarse-graining wrapper, "fix mscg"_fix_mscg.html, mscg, ext "OPT"_#OPT, optimized pair styles, "Section 5.3.5"_accelerate_opt.html, WWW bench, - "PERI"_#PERI, Peridynamics models, "pair_style peri"_pair_peri.html, peri, - "POEMS"_#POEMS, coupled rigid body motion, "fix poems"_fix_poems.html, rigid, int "PYTHON"_#PYTHON, embed Python code in an input script, "python"_python.html, python, sys "QEQ"_#QEQ, QEq charge equilibration, "fix qeq"_fix_qeq.html, qeq, - "REAX"_#REAX, ReaxFF potential (Fortran), "pair_style reax"_pair_reax.html, reax, int "REPLICA"_#REPLICA, multi-replica methods, "Section 6.6.5"_Section_howto.html#howto_5, tad, - "RIGID"_#RIGID, rigid bodies and constraints, "fix rigid"_fix_rigid.html, rigid, - "SHOCK"_#SHOCK, shock loading methods, "fix msst"_fix_msst.html, -, - "SNAP"_#SNAP, quantum-fitted potential, "pair snap"_pair_snap.html, snap, - "SRD"_#SRD, stochastic rotation dynamics, "fix srd"_fix_srd.html, srd, - "VORONOI"_#VORONOI, Voronoi tesselation, "compute voronoi/atom"_compute_voronoi_atom.html, -, ext :tb(ea=c,ca1=l) [USER packages] :link(table_user),p Package, Description, Doc page, Example, Library "USER-ATC"_#USER-ATC, atom-to-continuum coupling, "fix atc"_fix_atc.html, USER/atc, int "USER-AWPMD"_#USER-AWPMD, wave-packet MD, "pair_style awpmd/cut"_pair_awpmd.html, USER/awpmd, int "USER-CGDNA"_#USER-CGDNA, coarse-grained DNA force fields, src/USER-CGDNA/README, USER/cgdna, - "USER-CGSDK"_#USER-CGSDK, SDK coarse-graining model, "pair_style lj/sdk"_pair_sdk.html, USER/cgsdk, - "USER-COLVARS"_#USER-COLVARS, collective variables library, "fix colvars"_fix_colvars.html, USER/colvars, int "USER-DIFFRACTION"_#USER-DIFFRACTION, virtual x-ray and electron diffraction,"compute xrd"_compute_xrd.html, USER/diffraction, - "USER-DPD"_#USER-DPD, reactive dissipative particle dynamics, src/USER-DPD/README, USER/dpd, - "USER-DRUDE"_#USER-DRUDE, Drude oscillators, "tutorial"_tutorial_drude.html, USER/drude, - "USER-EFF"_#USER-EFF, electron force field,"pair_style eff/cut"_pair_eff.html, USER/eff, - "USER-FEP"_#USER-FEP, free energy perturbation,"compute fep"_compute_fep.html, USER/fep, - "USER-H5MD"_#USER-H5MD, dump output via HDF5,"dump h5md"_dump_h5md.html, -, ext "USER-INTEL"_#USER-INTEL, optimized Intel CPU and KNL styles,"Section 5.3.2"_accelerate_intel.html, WWW bench, - "USER-LB"_#USER-LB, Lattice Boltzmann fluid,"fix lb/fluid"_fix_lb_fluid.html, USER/lb, - "USER-MANIFOLD"_#USER-MANIFOLD, motion on 2d surfaces,"fix manifoldforce"_fix_manifoldforce.html, USER/manifold, - +"USER-MEAMC"_#USER-MEAMC, modified EAM potential (C++), "pair_style meam/c"_pair_meam.html, meam, - "USER-MGPT"_#USER-MGPT, fast MGPT multi-ion potentials, "pair_style mgpt"_pair_mgpt.html, USER/mgpt, - "USER-MISC"_#USER-MISC, single-file contributions, USER-MISC/README, USER/misc, - "USER-MOLFILE"_#USER-MOLFILE, "VMD"_vmd_home molfile plug-ins,"dump molfile"_dump_molfile.html, -, ext "USER-NETCDF"_#USER-NETCDF, dump output via NetCDF,"dump netcdf"_dump_netcdf.html, -, ext "USER-OMP"_#USER-OMP, OpenMP-enabled styles,"Section 5.3.4"_accelerate_omp.html, WWW bench, - "USER-PHONON"_#USER-PHONON, phonon dynamical matrix,"fix phonon"_fix_phonon.html, USER/phonon, - "USER-QMMM"_#USER-QMMM, QM/MM coupling,"fix qmmm"_fix_qmmm.html, USER/qmmm, ext "USER-QTB"_#USER-QTB, quantum nuclear effects,"fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html, qtb, - "USER-QUIP"_#USER-QUIP, QUIP/libatoms interface,"pair_style quip"_pair_quip.html, USER/quip, ext "USER-REAXC"_#USER-REAXC, ReaxFF potential (C/C++) ,"pair_style reaxc"_pair_reaxc.html, reax, - "USER-SMD"_#USER-SMD, smoothed Mach dynamics,"SMD User Guide"_PDF/SMD_LAMMPS_userguide.pdf, USER/smd, ext "USER-SMTBQ"_#USER-SMTBQ, second moment tight binding QEq potential,"pair_style smtbq"_pair_smtbq.html, USER/smtbq, - "USER-SPH"_#USER-SPH, smoothed particle hydrodynamics,"SPH User Guide"_PDF/SPH_LAMMPS_userguide.pdf, USER/sph, - "USER-TALLY"_#USER-TALLY, pairwise tally computes,"compute XXX/tally"_compute_tally.html, USER/tally, - "USER-VTK"_#USER-VTK, dump output via VTK, "compute vtk"_dump_vtk.html, -, ext :tb(ea=c,ca1=l) :line :line ASPHERE package :link(ASPHERE),h4 [Contents:] Computes, time-integration fixes, and pair styles for aspherical particle models including ellipsoids, 2d lines, and 3d triangles. [Install or un-install:] make yes-asphere make machine :pre make no-asphere make machine :pre [Supporting info:] src/ASPHERE: filenames -> commands "Section 6.14"_Section_howto.html#howto_14 "pair_style gayberne"_pair_gayberne.html "pair_style resquared"_pair_resquared.html "doc/PDF/pair_gayberne_extra.pdf"_PDF/pair_gayberne_extra.pdf "doc/PDF/pair_resquared_extra.pdf"_PDF/pair_resquared_extra.pdf examples/ASPHERE examples/ellipse http://lammps.sandia.gov/movies.html#line http://lammps.sandia.gov/movies.html#tri :ul :line BODY package :link(BODY),h4 [Contents:] Body-style particles with internal structure. Computes, time-integration fixes, pair styles, as well as the body styles themselves. See the "body"_body.html doc page for an overview. [Install or un-install:] make yes-body make machine :pre make no-body make machine :pre [Supporting info:] src/BODY filenames -> commands "body"_body.html "atom_style body"_atom_style.html "fix nve/body"_fix_nve_body.html "pair_style body"_pair_body.html examples/body :ul :line CLASS2 package :link(CLASS2),h4 [Contents:] Bond, angle, dihedral, improper, and pair styles for the COMPASS CLASS2 molecular force field. [Install or un-install:] make yes-class2 make machine :pre make no-class2 make machine :pre [Supporting info:] src/CLASS2: filenames -> commands "bond_style class2"_bond_class2.html "angle_style class2"_angle_class2.html "dihedral_style class2"_dihedral_class2.html "improper_style class2"_improper_class2.html "pair_style lj/class2"_pair_class2.html :ul :line COLLOID package :link(COLLOID),h4 [Contents:] Coarse-grained finite-size colloidal particles. Pair stayle and fix wall styles for colloidal interactions. Includes the Fast Lubrication Dynamics (FLD) method for hydrodynamic interactions, which is a simplified approximation to Stokesian dynamics. [Authors:] This package includes Fast Lubrication Dynamics pair styles which were created by Amit Kumar and Michael Bybee from Jonathan Higdon's group at UIUC. [Install or un-install:] make yes-colloid make machine :pre make no-colloid make machine :pre [Supporting info:] src/COLLOID: filenames -> commands "fix wall/colloid"_fix_wall.html "pair_style colloid"_pair_colloid.html "pair_style yukawa/colloid"_pair_yukawa_colloid.html "pair_style brownian"_pair_brownian.html "pair_style lubricate"_pair_lubricate.html "pair_style lubricateU"_pair_lubricateU.html examples/colloid examples/srd :ul :line COMPRESS package :link(COMPRESS),h4 [Contents:] Compressed output of dump files via the zlib compression library, using dump styles with a "gz" in their style name. To use this package you must have the zlib compression library available on your system. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Note that building with this package assumes you have the zlib compression library available on your system. The LAMMPS build uses the settings in the lib/compress/Makefile.lammps file in the compile/link process. You should only need to edit this file if the LAMMPS build fails on your system. make yes-compress make machine :pre make no-compress make machine :pre [Supporting info:] src/COMPRESS: filenames -> commands src/COMPRESS/README lib/compress/README "dump atom/gz"_dump.html "dump cfg/gz"_dump.html "dump custom/gz"_dump.html "dump xyz/gz"_dump.html :ul :line CORESHELL package :link(CORESHELL),h4 [Contents:] Compute and pair styles that implement the adiabatic core/shell model for polarizability. The pair styles augment Born, Buckingham, and Lennard-Jones styles with core/shell capabilities. The "compute temp/cs"_compute_temp_cs.html command calculates the temperature of a system with core/shell particles. See "Section 6.26"_Section_howto.html#howto_26 for an overview of how to use this package. [Author:] Hendrik Heenen (Technical U of Munich). [Install or un-install:] make yes-coreshell make machine :pre make no-coreshell make machine :pre [Supporting info:] src/CORESHELL: filenames -> commands "Section 6.26"_Section_howto.html#howto_26 "Section 6.25"_Section_howto.html#howto_25 "compute temp/cs"_compute_temp_cs.html "pair_style born/coul/long/cs"_pair_cs.html "pair_style buck/coul/long/cs"_pair_cs.html "pair_style lj/cut/coul/long/cs"_pair_lj.html examples/coreshell :ul :line DIPOLE package :link(DIPOLE),h4 [Contents:] An atom style and several pair styles for point dipole models with short-range or long-range interactions. [Install or un-install:] make yes-dipole make machine :pre make no-dipole make machine :pre [Supporting info:] src/DIPOLE: filenames -> commands "atom_style dipole"_atom_style.html "pair_style lj/cut/dipole/cut"_pair_dipole.html "pair_style lj/cut/dipole/long"_pair_dipole.html "pair_style lj/long/dipole/long"_pair_dipole.html examples/dipole :ul :line GPU package :link(GPU),h4 [Contents:] Dozens of pair styles and a version of the PPPM long-range Coulombic solver optimized for NVIDIA GPUs. All such styles have a "gpu" as a suffix in their style name. "Section 5.3.1"_accelerate_gpu.html gives details of what hardware and Cuda software is required on your system, and details on how to build and use this package. Its styles can be invoked at run time via the "-sf gpu" or "-suffix gpu" "command-line switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS package, which has GPU-enabled styles. [Authors:] Mike Brown (Intel) while at Sandia and ORNL and Trung Nguyen (Northwestern U) while at ORNL. [Install or un-install:] Before building LAMMPS with this package, you must first build the GPU library in lib/gpu from a set of provided C and Cuda files. You can do this manually if you prefer; follow the instructions in lib/gpu/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/gpu/Install.py script with the specified args: make lib-gpu # print help message make lib-gpu args="-m" # build GPU library with default Makefile.linux make lib-gpu args="-i xk7 -p single -o xk7.single" # create new Makefile.xk7.single, altered for single-precision make lib-gpu args="-i xk7 -p single -o xk7.single -m" # ditto, also build GPU library Note that this procedure starts with one of the existing Makefile.machine files in lib/gpu. It allows you to alter 4 important settings in that Makefile, via the -h, -a, -p, -e switches, and save the new Makefile, if desired: CUDA_HOME = where NVIDIA Cuda software is installed on your system CUDA_ARCH = what GPU hardware you have (see help message for details) CUDA_PRECISION = precision (double, mixed, single) EXTRAMAKE = which Makefile.lammps.* file to copy to Makefile.lammps :ul If the library build is successful, 2 files should be created: lib/gpu/libgpu.a and lib/gpu/Makefile.lammps. The latter has settings that enable LAMMPS to link with Cuda libraries. If the settings in Makefile.lammps for your machine are not correct, the LAMMPS build will fail. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-gpu make machine :pre make no-gpu make machine :pre NOTE: If you re-build the GPU library in lib/gpu, you should always un-install the GPU package, then re-install it and re-build LAMMPS. This is because the compilation of files in the GPU package use the library settings from the lib/gpu/Makefile.machine used to build the GPU library. [Supporting info:] src/GPU: filenames -> commands src/GPU/README lib/gpu/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.1"_accelerate_gpu.html "Section 2.7 -sf gpu"_Section_start.html#start_7 "Section 2.7 -pk gpu"_Section_start.html#start_7 "package gpu"_package.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (g) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line GRANULAR package :link(GRANULAR),h4 [Contents:] Pair styles and fixes for finite-size granular particles, which interact with each other and boundaries via frictional and dissipative potentials. [Install or un-install:] make yes-granular make machine :pre make no-granular make machine :pre [Supporting info:] src/GRANULAR: filenames -> commands "Section 6.6"_Section_howto.html#howto_6, "fix pour"_fix_pour.html "fix wall/gran"_fix_wall_gran.html "pair_style gran/hooke"_pair_gran.html "pair_style gran/hertz/history"_pair_gran.html examples/granregion examples/pour bench/in.chute http://lammps.sandia.gov/pictures.html#jamming http://lammps.sandia.gov/movies.html#hopper http://lammps.sandia.gov/movies.html#dem http://lammps.sandia.gov/movies.html#brazil http://lammps.sandia.gov/movies.html#granregion :ul :line KIM package :link(KIM),h4 [Contents:] A "pair_style kim"_pair_kim.html command which is a wrapper on the Knowledge Base for Interatomic Models (KIM) repository of interatomic potentials, enabling any of them to be used in LAMMPS simulations. To use this package you must have the KIM library available on your system. Information about the KIM project can be found at its website: https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota) and James Sethna (Cornell U). [Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM API which the "pair_style kim"_pair_kim.html command uses. He developed the pair style in collaboration with Valeriu Smirichinski (U Minnesota). [Install or un-install:] Using this package requires the KIM library and its models (interatomic potentials) to be downloaded and installed on your system. The library can be downloaded and built in lib/kim or elsewhere on your system. Details of the download, build, and install process for KIM are given in the lib/kim/README file. Once that process is complete, you can then install/un-install the package and build LAMMPS in the usual manner: make yes-kim make machine :pre make no-kim make machine :pre [Supporting info:] src/KIM: filenames -> commands src/KIM/README lib/kim/README "pair_style kim"_pair_kim.html examples/kim :ul :line KOKKOS package :link(KOKKOS),h4 [Contents:] Dozens of atom, pair, bond, angle, dihedral, improper, fix, compute styles adapted to compile using the Kokkos library which can convert them to OpenMP or Cuda code so that they run efficiently on multicore CPUs, KNLs, or GPUs. All the styles have a "kk" as a suffix in their style name. "Section 5.3.3"_accelerate_kokkos.html gives details of what hardware and software is required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf kk" or "-suffix kk" "command-line switches"_Section_start.html#start_7. Also see the "GPU"_#GPU, "OPT"_#OPT, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs, KNLs, and GPUs. You must have a C++11 compatible compiler to use this package. [Authors:] The KOKKOS package was created primarily by Christian Trott and Stan Moore (Sandia), with contributions from other folks as well. It uses the open-source "Kokkos library"_https://github.com/kokkos which was developed by Carter Edwards, Christian Trott, and others at Sandia, and which is included in the LAMMPS distribution in lib/kokkos. [Install or un-install:] For the KOKKOS package, you have 3 choices when building. You can build with either CPU or KNL or GPU support. Each choice requires additional settings in your Makefile.machine for the KOKKOS_DEVICES and KOKKOS_ARCH settings. See the src/MAKE/OPTIONS/Makefile.kokkos* files for examples. For multicore CPUs using OpenMP: KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = HSW # HSW = Haswell, SNB = SandyBridge, BDW = Broadwell, etc For Intel KNLs using OpenMP: KOKKOS_DEVICES = OpenMP KOKKOS_ARCH = KNL For NVIDIA GPUs using Cuda: KOKKOS_DEVICES = Cuda KOKKOS_ARCH = Pascal60,Power8 # P100 hosted by an IBM Power8, etc KOKKOS_ARCH = Kepler37,Power8 # K80 hosted by an IBM Power8, etc For GPUs, you also need these 2 lines in your Makefile.machine before the CC line is defined, in this case for use with OpenMPI mpicxx. The 2 lines define a nvcc wrapper compiler, which will use nvcc for compiling Cuda files or use a C++ compiler for non-Kokkos, non-Cuda files. KOKKOS_ABSOLUTE_PATH = $(shell cd $(KOKKOS_PATH); pwd) export OMPI_CXX = $(KOKKOS_ABSOLUTE_PATH)/config/nvcc_wrapper CC = mpicxx Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner. Note that you cannot build one executable to run on multiple hardware targets (CPU or KNL or GPU). You need to build LAMMPS once for each hardware target, to produce a separate executable. Also note that we do not recommend building with other acceleration packages installed (GPU, OPT, USER-INTEL, USER-OMP) when also building with KOKKOS. make yes-kokkos make machine :pre make no-kokkos make machine :pre [Supporting info:] src/KOKKOS: filenames -> commands src/KOKKOS/README lib/kokkos/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.3"_accelerate_kokkos.html "Section 2.7 -k on ..."_Section_start.html#start_7 "Section 2.7 -sf kk"_Section_start.html#start_7 "Section 2.7 -pk kokkos"_Section_start.html#start_7 "package kokkos"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (k) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line KSPACE package :link(KSPACE),h4 [Contents:] A variety of long-range Coulombic solvers, as well as pair styles which compute the corresponding short-range pairwise Coulombic interactions. These include Ewald, particle-particle particle-mesh (PPPM), and multilevel summation method (MSM) solvers. [Install or un-install:] Building with this package requires a 1d FFT library be present on your system for use by the PPPM solvers. This can be the KISS FFT library provided with LAMMPS, 3rd party libraries like FFTW, or a vendor-supplied FFT library. See step 6 of "Section 2.2.2"_Section_start.html#start_2_2 of the manual for details on how to select different FFT options in your machine Makefile. make yes-kspace make machine :pre make no-kspace make machine :pre [Supporting info:] src/KSPACE: filenames -> commands "kspace_style"_kspace_style.html "doc/PDF/kspace.pdf"_PDF/kspace.pdf "Section 6.7"_Section_howto.html#howto_7 "Section 6.8"_Section_howto.html#howto_8 "Section 6.9"_Section_howto.html#howto_9 "pair_style coul"_pair_coul.html Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 with "long" or "msm" in pair style name examples/peptide bench/in.rhodo :ul :line MANYBODY package :link(MANYBODY),h4 [Contents:] A variety of manybody and bond-order potentials. These include (AI)REBO, BOP, EAM, EIM, Stillinger-Weber, and Tersoff potentials. [Install or un-install:] make yes-manybody make machine :pre make no-manybody make machine :pre [Supporting info:] src/MANYBODY: filenames -> commands Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 examples/comb examples/eim examples/nb3d examples/shear examples/streitz examples/vashishta bench/in.eam :ul :line MC package :link(MC),h4 [Contents:] Several fixes and a pair style that have Monte Carlo (MC) or MC-like attributes. These include fixes for creating, breaking, and swapping bonds, for performing atomic swaps, and performing grand-canonical MC (GCMC) in conjuction with dynamics. [Install or un-install:] make yes-mc make machine :pre make no-mc make machine :pre [Supporting info:] src/MC: filenames -> commands "fix atom/swap"_fix_atom_swap.html "fix bond/break"_fix_bond_break.html "fix bond/create"_fix_bond_create.html "fix bond/swap"_fix_bond_swap.html "fix gcmc"_fix_gcmc.html "pair_style dsmc"_pair_dsmc.html http://lammps.sandia.gov/movies.html#gcmc :ul :line MEAM package :link(MEAM),h4 [Contents:] A pair style for the modified embedded atom (MEAM) potential. [Author:] Greg Wagner (Northwestern U) while at Sandia. [Install or un-install:] Before building LAMMPS with this package, you must first build the MEAM library in lib/meam. You can do this manually if you prefer; follow the instructions in lib/meam/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/meam/Install.py script with the specified args: make lib-meam # print help message make lib-meam args="-m gfortran" # build with GNU Fortran compiler make lib-meam args="-m ifort" # build with Intel ifort compiler :pre The build should produce two files: lib/meam/libmeam.a and lib/meam/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with Fortran (MEAM library). Typically the two compilers used for LAMMPS and the MEAM library need to be consistent (e.g. both Intel or both GNU compilers). If necessary, you can edit/create a new lib/meam/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-meam make machine :pre make no-meam make machine :pre NOTE: You should test building the MEAM library with both the Intel and GNU compilers to see if a simulation runs faster with one versus the other on your system. [Supporting info:] src/MEAM: filenames -> commands src/meam/README lib/meam/README "pair_style meam"_pair_meam.html examples/meam :ul :line MISC package :link(MISC),h4 [Contents:] A variety of compute, fix, pair, dump styles with specialized capabilities that don't align with other packages. Do a directory listing, "ls src/MISC", to see the list of commands. [Install or un-install:] make yes-misc make machine :pre make no-misc make machine :pre [Supporting info:] src/MISC: filenames -> commands "compute ti"_compute_ti.html "fix evaporate"_fix_evaporate.html "fix orient/fcc"_fix_orient.html "fix ttm"_fix_ttm.html "fix thermal/conductivity"_fix_thermal_conductivity.html "fix viscosity"_fix_viscosity.html examples/KAPPA examples/VISCOSITY http://lammps.sandia.gov/pictures.html#ttm http://lammps.sandia.gov/movies.html#evaporation :ul :line MOLECULE package :link(MOLECULE),h4 [Contents:] A large number of atom, pair, bond, angle, dihedral, improper styles that are used to model molecular systems with fixed covalent bonds. The pair styles include the Dreiding (hydrogen-bonding) and CHARMM force fields, and a TIP4P water model. [Install or un-install:] make yes-molecule make machine :pre make no-molecule make machine :pre [Supporting info:] src/MOLECULE: filenames -> commands "atom_style"_atom_style.html "bond_style"_bond_style.html "angle_style"_angle_style.html "dihedral_style"_dihedral_style.html "improper_style"_improper_style.html "pair_style hbond/dreiding/lj"_pair_hbond_dreiding.html "pair_style lj/charmm/coul/charmm"_pair_charmm.html "Section 6.3"_Section_howto.html#howto_3 examples/cmap examples/dreiding examples/micelle, examples/peptide bench/in.chain bench/in.rhodo :ul :line MPIIO package :link(MPIIO),h4 [Contents:] Support for parallel output/input of dump and restart files via the MPIIO library. It adds "dump styles"_dump.html with a "mpiio" in their style name. Restart files with an ".mpiio" suffix are also written and read in parallel. [Install or un-install:] Note that MPIIO is part of the standard message-passing interface (MPI) library, so you should not need any additional compiler or link settings, beyond what LAMMPS normally uses for MPI on your system. make yes-mpiio make machine :pre make no-mpiio make machine :pre [Supporting info:] src/MPIIO: filenames -> commands "dump"_dump.html "restart"_restart.html "write_restart"_write_restart.html "read_restart"_read_restart.html :ul :line MSCG package :link(mscg),h4 [Contents:] A "fix mscg"_fix_mscg.html command which can parameterize a Mulit-Scale Coarse-Graining (MSCG) model using the open-source "MS-CG library"_mscg_home. :link(mscg_home,https://github.com/uchicago-voth/MSCG-release) To use this package you must have the MS-CG library available on your system. [Authors:] The fix was written by Lauren Abbott (Sandia). The MS-CG library was developed by Jacob Wagner in Greg Voth's group at the University of Chicago. [Install or un-install:] Before building LAMMPS with this package, you must first download and build the MS-CG library. Building the MS-CG library and using it from LAMMPS requires a C++11 compatible compiler, and that LAPACK and GSL (GNU Scientific Library) libraries be installed on your machine. See the lib/mscg/README and MSCG/Install files for more details. Assuming these libraries are in place, you can do the download and build of MS-CG manually if you prefer; follow the instructions in lib/mscg/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/mscg/Install.py script with the specified args: make lib-mscg # print help message make lib-mscg args="-g -b -l" # download and build in default lib/mscg/MSCG-release-master make lib-mscg args="-h . MSCG -g -b -l" # download and build in lib/mscg/MSCG make lib-mscg args="-h ~ MSCG -g -b -l" # download and build in ~/mscg :pre Note that the final -l switch is to create 2 symbolic (soft) links, "includelink" and "liblink", in lib/mscg to point to the MS-CG src dir. When LAMMPS builds it will use these links. You should not need to edit the lib/mscg/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-mscg make machine :pre make no-mscg make machine :pre [Supporting info:] src/MSCG: filenames -> commands src/MSCG/README lib/mscg/README examples/mscg :ul :line OPT package :link(OPT),h4 [Contents:] A handful of pair styles which are optimized for improved CPU performance on single or multiple cores. These include EAM, LJ, CHARMM, and Morse potentials. The styles have an "opt" suffix in their style name. "Section 5.3.5"_accelerate_opt.html gives details of how to build and use this package. Its styles can be invoked at run time via the "-sf opt" or "-suffix opt" "command-line switches"_Section_start.html#start_7. See also the "KOKKOS"_#KOKKOS, "USER-INTEL"_#USER-INTEL, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPU performance. [Authors:] James Fischer (High Performance Technologies), David Richie, and Vincent Natoli (Stone Ridge Technolgy). [Install or un-install:] make yes-opt make machine :pre make no-opt make machine :pre NOTE: The compile flag "-restrict" must be used to build LAMMPS with the OPT package. It should be added to the CCFLAGS line of your Makefile.machine. See Makefile.opt in src/MAKE/OPTIONS for an example. CCFLAGS: add -restrict :ul [Supporting info:] src/OPT: filenames -> commands "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.5"_accelerate_opt.html "Section 2.7 -sf opt"_Section_start.html#start_7 Pair Styles section of "Section 3.5"_Section_commands.html#cmd_5 for pair styles followed by (t) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line PERI package :link(PERI),h4 [Contents:] An atom style, several pair styles which implement different Peridynamics materials models, and several computes which calculate diagnostics. Peridynamics is a a particle-based meshless continuum model. [Authors:] The original package was created by Mike Parks (Sandia). Additional Peridynamics models were added by Rezwanur Rahman and John Foster (UTSA). [Install or un-install:] make yes-peri make machine :pre make no-peri make machine :pre [Supporting info:] src/PERI: filenames -> commands "doc/PDF/PDLammps_overview.pdf"_PDF/PDLammps_overview.pdf "doc/PDF/PDLammps_EPS.pdf"_PDF/PDLammps_EPS.pdf "doc/PDF/PDLammps_VES.pdf"_PDF/PDLammps_VES.pdf "atom_style peri"_atom_style.html "pair_style peri/*"_pair_peri.html "compute damage/atom"_compute_damage_atom.html "compute plasticity/atom"_compute_plasticity_atom.html examples/peri http://lammps.sandia.gov/movies.html#peri :ul :line POEMS package :link(POEMS),h4 [Contents:] A fix that wraps the Parallelizable Open source Efficient Multibody Software (POEMS) library, which is able to simulate the dynamics of articulated body systems. These are systems with multiple rigid bodies (collections of particles) whose motion is coupled by connections at hinge points. [Author:] Rudra Mukherjee (JPL) while at RPI. [Install or un-install:] Before building LAMMPS with this package, you must first build the POEMS library in lib/poems. You can do this manually if you prefer; follow the instructions in lib/poems/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/poems/Install.py script with the specified args: make lib-poems # print help message make lib-poems args="-m g++" # build with GNU g++ compiler make lib-poems args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/poems/libpoems.a and lib/poems/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the POEMS library (though typically the settings are just blank). If necessary, you can edit/create a new lib/poems/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-poems make machine :pre make no-meam make machine :pre [Supporting info:] src/POEMS: filenames -> commands src/POEMS/README lib/poems/README "fix poems"_fix_poems.html examples/rigid :ul :line PYTHON package :link(PYTHON),h4 [Contents:] A "python"_python.html command which allow you to execute Python code from a LAMMPS input script. The code can be in a separate file or embedded in the input script itself. See "Section 11.2"_Section_python.html#py_2 for an overview of using Python from LAMMPS in this manner and the entire section for other ways to use LAMMPS and Python together. [Install or un-install:] make yes-python make machine :pre make no-python make machine :pre NOTE: Building with the PYTHON package assumes you have a Python shared library available on your system, which needs to be a Python 2 version, 2.6 or later. Python 3 is not yet supported. See the lib/python/README for more details. Note that the build uses the lib/python/Makefile.lammps file in the compile/link process. You should only need to create a new Makefile.lammps.* file (and copy it to Makefile.lammps) if the LAMMPS build fails. [Supporting info:] src/PYTHON: filenames -> commands "Section 11"_Section_python.html lib/python/README examples/python :ul :line QEQ package :link(QEQ),h4 [Contents:] Several fixes for performing charge equilibration (QEq) via different algorithms. These can be used with pair styles that perform QEq as part of their formulation. [Install or un-install:] make yes-qeq make machine :pre make no-qeq make machine :pre [Supporting info:] src/QEQ: filenames -> commands "fix qeq/*"_fix_qeq.html examples/qeq examples/streitz :ul :line REAX package :link(REAX),h4 [Contents:] A pair style which wraps a Fortran library which implements the ReaxFF potential, which is a universal reactive force field. See the "USER-REAXC package"_#USER-REAXC for an alternate implementation in C/C++. Also a "fix reax/bonds"_fix_reax_bonds.html command for monitoring molecules as bonds are created and destroyed. [Author:] Aidan Thompson (Sandia). [Install or un-install:] Before building LAMMPS with this package, you must first build the REAX library in lib/reax. You can do this manually if you prefer; follow the instructions in lib/reax/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/reax/Install.py script with the specified args: make lib-reax # print help message make lib-reax args="-m gfortran" # build with GNU Fortran compiler make lib-reax args="-m ifort" # build with Intel ifort compiler :pre The build should produce two files: lib/reax/libreax.a and lib/reax/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to link C++ (LAMMPS) with Fortran (REAX library). Typically the two compilers used for LAMMPS and the REAX library need to be consistent (e.g. both Intel or both GNU compilers). If necessary, you can edit/create a new lib/reax/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-reax make machine :pre make no-reax make machine :pre [Supporting info:] src/REAX: filenames -> commands lib/reax/README "pair_style reax"_pair_reax.html "fix reax/bonds"_fix_reax_bonds.html examples/reax :ul :line REPLICA package :link(REPLICA),h4 [Contents:] A collection of multi-replica methods which can be used when running multiple LAMMPS simulations (replicas). See "Section 6.5"_Section_howto.html#howto_5 for an overview of how to run multi-replica simulations in LAMMPS. Methods in the package include nudged elastic band (NEB), parallel replica dynamics (PRD), temperature accelerated dynamics (TAD), parallel tempering, and a verlet/split algorithm for performing long-range Coulombics on one set of processors, and the remainder of the force field calcalation on another set. [Install or un-install:] make yes-replica make machine :pre make no-replica make machine :pre [Supporting info:] src/REPLICA: filenames -> commands "Section 6.5"_Section_howto.html#howto_5 "neb"_neb.html "prd"_prd.html "tad"_tad.html "temper"_temper.html, "run_style verlet/split"_run_style.html examples/neb examples/prd examples/tad :ul :line RIGID package :link(RIGID),h4 [Contents:] Fixes which enforce rigid constraints on collections of atoms or particles. This includes SHAKE and RATTLE, as well as varous rigid-body integrators for a few large bodies or many small bodies. Also several computes which calculate properties of rigid bodies. To install/build: make yes-rigid make machine :pre To un-install/re-build: make no-rigid make machine :pre [Supporting info:] src/RIGID: filenames -> commands "compute erotate/rigid"_compute_erotate_rigid.html fix shake"_fix_shake.html "fix rattle"_fix_shake.html "fix rigid/*"_fix_rigid.html examples/ASPHERE examples/rigid bench/in.rhodo http://lammps.sandia.gov/movies.html#box http://lammps.sandia.gov/movies.html#star :ul :line SHOCK package :link(SHOCK),h4 [Contents:] Fixes for running impact simulations where a shock-wave passes through a material. [Install or un-install:] make yes-shock make machine :pre make no-shock make machine :pre [Supporting info:] src/SHOCK: filenames -> commands "fix append/atoms"_fix_append_atoms.html "fix msst"_fix_msst.html "fix nphug"_fix_nphug.html "fix wall/piston"_fix_wall_piston.html examples/hugoniostat examples/msst :ul :line SNAP package :link(SNAP),h4 [Contents:] A pair style for the spectral neighbor analysis potential (SNAP). SNAP is methodology for deriving a highly accurate classical potential fit to a large archive of quantum mechanical (DFT) data. Also several computes which analyze attributes of the potential. [Author:] Aidan Thompson (Sandia). [Install or un-install:] make yes-snap make machine :pre make no-snap make machine :pre [Supporting info:] src/SNAP: filenames -> commands "pair snap"_pair_snap.html "compute sna/atom"_compute_sna_atom.html "compute snad/atom"_compute_sna_atom.html "compute snav/atom"_compute_sna_atom.html examples/snap :ul :line SRD package :link(SRD),h4 [Contents:] A pair of fixes which implement the Stochastic Rotation Dynamics (SRD) method for coarse-graining of a solvent, typically around large colloidal particles. To install/build: make yes-srd make machine :pre To un-install/re-build: make no-srd make machine :pre [Supporting info:] src/SRD: filenames -> commands "fix srd"_fix_srd.html "fix wall/srd"_fix_wall_srd.html examples/srd examples/ASPHERE http://lammps.sandia.gov/movies.html#tri http://lammps.sandia.gov/movies.html#line http://lammps.sandia.gov/movies.html#poly :ul :line VORONOI package :link(VORONOI),h4 [Contents:] A compute command which calculates the Voronoi tesselation of a collection of atoms by wrapping the "Voro++ library"_voro_home. This can be used to calculate the local volume or each atoms or its near neighbors. :link(voro_home,http://math.lbl.gov/voro++) To use this package you must have the Voro++ library available on your system. [Author:] Daniel Schwen (INL) while at LANL. The open-source Voro++ library was written by Chris Rycroft (Harvard U) while at UC Berkeley and LBNL. [Install or un-install:] Before building LAMMPS with this package, you must first download and build the Voro++ library. You can do this manually if you prefer; follow the instructions in lib/voronoi/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/voronoi/Install.py script with the specified args: make lib-voronoi # print help message make lib-voronoi args="-g -b -l" # download and build in default lib/voronoi/voro++-0.4.6 make lib-voronoi args="-h . voro++ -g -b -l" # download and build in lib/voronoi/voro++ make lib-voronoi args="-h ~ voro++ -g -b -l" # download and build in ~/voro++ :pre Note that the final -l switch is to create 2 symbolic (soft) links, "includelink" and "liblink", in lib/voronoi to point to the Voro++ src dir. When LAMMPS builds it will use these links. You should not need to edit the lib/voronoi/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-voronoi make machine :pre make no-voronoi make machine :pre [Supporting info:] src/VORONOI: filenames -> commands src/VORONOI/README lib/voronoi/README "compute voronoi/atom"_compute_voronoi_atom.html examples/voronoi :ul :line :line USER-ATC package :link(USER-ATC),h4 [Contents:] ATC stands for atoms-to-continuum. This package implements a "fix atc"_fix_atc.html command to either couple molecular dynamics with continuum finite element equations or perform on-the-fly conversion of atomic information to continuum fields. [Authors:] Reese Jones, Jeremy Templeton, Jon Zimmerman (Sandia). [Install or un-install:] Before building LAMMPS with this package, you must first build the ATC library in lib/atc. You can do this manually if you prefer; follow the instructions in lib/atc/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/atc/Install.py script with the specified args: make lib-atc # print help message make lib-atc args="-m g++" # build with GNU g++ compiler make lib-atc args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/atc/libatc.a and lib/atc/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the ATC library. If necessary, you can edit/create a new lib/atc/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. Note that the Makefile.lammps file has settings for the BLAS and LAPACK linear algebra libraries. As explained in lib/atc/README these can either exist on your system, or you can use the files provided in lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message make lib-atc args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-atc make machine :pre make no-user-atc make machine :pre [Supporting info:] src/USER-ATC: filenames -> commands src/USER-ATC/README "fix atc"_fix_atc.html examples/USER/atc http://lammps.sandia.gov/pictures.html#atc :ul :line USER-AWPMD package :link(USER-AWPMD),h4 [Contents:] AWPMD stands for Antisymmetrized Wave Packet Molecular Dynamics. This package implements an atom, pair, and fix style which allows electrons to be treated as explicit particles in a classical molecular dynamics model. [Author:] Ilya Valuev (JIHT, Russia). [Install or un-install:] Before building LAMMPS with this package, you must first build the AWPMD library in lib/awpmd. You can do this manually if you prefer; follow the instructions in lib/awpmd/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/awpmd/Install.py script with the specified args: make lib-awpmd # print help message make lib-awpmd args="-m g++" # build with GNU g++ compiler make lib-awpmd args="-m icc" # build with Intel icc compiler :pre The build should produce two files: lib/awpmd/libawpmd.a and lib/awpmd/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the AWPMD library. If necessary, you can edit/create a new lib/awpmd/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. Note that the Makefile.lammps file has settings for the BLAS and LAPACK linear algebra libraries. As explained in lib/awpmd/README these can either exist on your system, or you can use the files provided in lib/linalg. In the latter case you also need to build the library in lib/linalg with a command like these: make lib-linalg # print help message make lib-atc args="-m gfortran" # build with GNU Fortran compiler You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-awpmd make machine :pre make no-user-awpmd make machine :pre [Supporting info:] src/USER-AWPMD: filenames -> commands src/USER-AWPMD/README "pair awpmd/cut"_pair_awpmd.html examples/USER/awpmd :ul :line USER-CGDNA package :link(USER-CGDNA),h4 [Contents:] Several pair styles, a bond style, and integration fixes for coarse-grained models of single- and double-stranded DNA based on the oxDNA model of Doye, Louis and Ouldridge at the University of Oxford. This includes Langevin-type rigid-body integrators with improved stability. [Author:] Oliver Henrich (University of Strathclyde, Glasgow). [Install or un-install:] make yes-user-cgdna make machine :pre make no-user-cgdna make machine :pre [Supporting info:] src/USER-CGDNA: filenames -> commands /src/USER-CGDNA/README "pair_style oxdna/*"_pair_oxdna.html "pair_style oxdna2/*"_pair_oxdna2.html "bond_style oxdna/*"_bond_oxdna.html "bond_style oxdna2/*"_bond_oxdna.html "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html :ul :line USER-CGSDK package :link(USER-CGSDK),h4 [Contents:] Several pair styles and an angle style which implement the coarse-grained SDK model of Shinoda, DeVane, and Klein which enables simulation of ionic liquids, electrolytes, lipids and charged amino acids. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] make yes-user-cgsdk make machine :pre make no-user-cgsdk make machine :pre [Supporting info:] src/USER-CGSDK: filenames -> commands src/USER-CGSDK/README "pair_style lj/sdk/*"_pair_sdk.html "angle_style sdk"_angle_sdk.html examples/USER/cgsdk http://lammps.sandia.gov/pictures.html#cg :ul :line USER-COLVARS package :link(USER-COLVARS),h4 [Contents:] COLVARS stands for collective variables, which can be used to implement various enhanced sampling methods, including Adaptive Biasing Force, Metadynamics, Steered MD, Umbrella Sampling and Restraints. A "fix colvars"_fix_colvars.html command is implemented which wraps a COLVARS library, which implements these methods. simulations. [Authors:] Axel Kohlmeyer (Temple U). The COLVARS library was written by Giacomo Fiorin (ICMS, Temple University, Philadelphia, PA, USA) and Jerome Henin (LISM, CNRS, Marseille, France). [Install or un-install:] Before building LAMMPS with this package, you must first build the COLVARS library in lib/colvars. You can do this manually if you prefer; follow the instructions in lib/colvars/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/colvars/Install.py script with the specified args: make lib-colvars # print help message make lib-colvars args="-m g++" # build with GNU g++ compiler :pre The build should produce two files: lib/colvars/libcolvars.a and lib/colvars/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the COLVARS library (though typically the settings are just blank). If necessary, you can edit/create a new lib/colvars/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-colvars make machine :pre make no-user-colvars make machine :pre [Supporting info:] src/USER-COLVARS: filenames -> commands "doc/PDF/colvars-refman-lammps.pdf"_PDF/colvars-refman-lammps.pdf src/USER-COLVARS/README lib/colvars/README "fix colvars"_fix_colvars.html examples/USER/colvars :ul :line USER-DIFFRACTION package :link(USER-DIFFRACTION),h4 [Contents:] Two computes and a fix for calculating x-ray and electron diffraction intensities based on kinematic diffraction theory. [Author:] Shawn Coleman while at the U Arkansas. [Install or un-install:] make yes-user-diffraction make machine :pre make no-user-diffraction make machine :pre [Supporting info:] src/USER-DIFFRACTION: filenames -> commands "compute saed"_compute_saed.html "compute xrd"_compute_xrd.html "fix saed/vtk"_fix_saed_vtk.html examples/USER/diffraction :ul :line USER-DPD package :link(USER-DPD),h4 [Contents:] DPD stands for dissipative particle dynamics. This package implements coarse-grained DPD-based models for energetic, reactive molecular crystalline materials. It includes many pair styles specific to these systems, including for reactive DPD, where each particle has internal state for multiple species and a coupled set of chemical reaction ODEs are integrated each timestep. Highly accurate time intergrators for isothermal, isoenergetic, isobaric and isenthalpic conditions are included. These enable long timesteps via the Shardlow splitting algorithm. [Authors:] Jim Larentzos (ARL), Tim Mattox (Engility Corp), and and John Brennan (ARL). [Install or un-install:] make yes-user-dpd make machine :pre make no-user-dpd make machine :pre [Supporting info:] src/USER-DPD: filenames -> commands /src/USER-DPD/README "compute dpd"_compute_dpd.html "compute dpd/atom"_compute_dpd_atom.html "fix eos/cv"_fix_eos_table.html "fix eos/table"_fix_eos_table.html "fix eos/table/rx"_fix_eos_table_rx.html "fix shardlow"_fix_shardlow.html "fix rx"_fix_rx.html "pair table/rx"_pair_table_rx.html "pair dpd/fdt"_pair_dpd_fdt.html "pair dpd/fdt/energy"_pair_dpd_fdt.html "pair exp6/rx"_pair_exp6_rx.html "pair multi/lucy"_pair_multi_lucy.html "pair multi/lucy/rx"_pair_multi_lucy_rx.html examples/USER/dpd :ul :line USER-DRUDE package :link(USER-DRUDE),h4 [Contents:] Fixes, pair styles, and a compute to simulate thermalized Drude oscillators as a model of polarization. See "Section 6.27"_Section_howto.html#howto_27 for an overview of how to use the package. There are auxiliary tools for using this package in tools/drude. [Authors:] Alain Dequidt (U Blaise Pascal Clermont-Ferrand), Julien Devemy (CNRS), and Agilio Padua (U Blaise Pascal). [Install or un-install:] make yes-user-drude make machine :pre make no-user-drude make machine :pre [Supporting info:] src/USER-DRUDE: filenames -> commands "Section 6.27"_Section_howto.html#howto_27 "Section 6.25"_Section_howto.html#howto_25 src/USER-DRUDE/README "fix drude"_fix_drude.html "fix drude/transform/*"_fix_drude_transform.html "compute temp/drude"_compute_temp_drude.html "pair thole"_pair_thole.html "pair lj/cut/thole/long"_pair_thole.html examples/USER/drude tools/drude :ul :line USER-EFF package :link(USER-EFF),h4 [Contents:] EFF stands for electron force field which allows a classical MD code to model electrons as particles of variable radius. This package contains atom, pair, fix and compute styles which implement the eFF as described in A. Jaramillo-Botero, J. Su, Q. An, and W.A. Goddard III, JCC, 2010. The eFF potential was first introduced by Su and Goddard, in 2007. There are auxiliary tools for using this package in tools/eff; see its README file. [Author:] Andres Jaramillo-Botero (CalTech). [Install or un-install:] make yes-user-eff make machine :pre make no-user-eff make machine :pre [Supporting info:] src/USER-EFF: filenames -> commands src/USER-EFF/README "atom_style electron"_atom_style.html "fix nve/eff"_fix_nve_eff.html "fix nvt/eff"_fix_nh_eff.html "fix npt/eff"_fix_nh_eff.html "fix langevin/eff"_fix_langevin_eff.html "compute temp/eff"_compute_temp_eff.html "pair eff/cut"_pair_eff.html "pair eff/inline"_pair_eff.html examples/USER/eff tools/eff/README tools/eff http://lammps.sandia.gov/movies.html#eff :ul :line USER-FEP package :link(USER-FEP),h4 [Contents:] FEP stands for free energy perturbation. This package provides methods for performing FEP simulations by using a "fix adapt/fep"_fix_adapt_fep.html command with soft-core pair potentials, which have a "soft" in their style name. There are auxiliary tools for using this package in tools/fep; see its README file. [Author:] Agilio Padua (Universite Blaise Pascal Clermont-Ferrand) [Install or un-install:] make yes-user-fep make machine :pre make no-user-fep make machine :pre [Supporting info:] src/USER-FEP: filenames -> commands src/USER-FEP/README "fix adapt/fep"_fix_adapt_fep.html "compute fep"_compute_fep.html "pair_style */soft"_pair_lj_soft.html examples/USER/fep tools/fep/README tools/fep :ul :line USER-H5MD package :link(USER-H5MD),h4 [Contents:] H5MD stands for HDF5 for MD. "HDF5"_HDF5 is a portable, binary, self-describing file format, used by many scientific simulations. H5MD is a format for molecular simulations, built on top of HDF5. This package implements a "dump h5md"_dump_h5md.html command to output LAMMPS snapshots in this format. :link(HDF5,http://www.hdfgroup.org/HDF5) To use this package you must have the HDF5 library available on your system. [Author:] Pierre de Buyl (KU Leuven) created both the package and the H5MD format. [Install or un-install:] Note that to follow these steps to compile and link to the CH5MD library, you need the standard HDF5 software package installed on your system, which should include the h5cc compiler and the HDF5 library. Before building LAMMPS with this package, you must first build the CH5MD library in lib/h5md. You can do this manually if you prefer; follow the instructions in lib/h5md/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/h5md/Install.py script with the specified args: make lib-h5md # print help message make lib-hm5d args="-m h5cc" # build with h5cc compiler :pre The build should produce two files: lib/h5md/libch5md.a and lib/h5md/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the system HDF5 library. If necessary, you can edit/create a new lib/h5md/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-h5md make machine :pre make no-user-h5md make machine :pre [Supporting info:] src/USER-H5MD: filenames -> commands src/USER-H5MD/README lib/h5md/README "dump h5md"_dump_h5md.html :ul :line USER-INTEL package :link(USER-INTEL),h4 [Contents:] Dozens of pair, fix, bond, angle, dihedral, improper, and kspace styles which are optimized for Intel CPUs and KNLs (Knights Landing). All of them have an "intel" in their style name. "Section 5.3.2"_accelerate_intel.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf intel" or "-suffix intel" "command-line switches"_Section_start.html#start_7. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-OMP"_#USER-OMP packages, which have styles optimized for CPUs and KNLs. You need to have an Intel compiler, version 14 or higher to take full advantage of this package. [Author:] Mike Brown (Intel). [Install or un-install:] For the USER-INTEL package, you have 2 choices when building. You can build with either CPU or KNL support. Each choice requires additional settings in your Makefile.machine for CCFLAGS and LINKFLAGS and optimized malloc libraries. See the src/MAKE/OPTIONS/Makefile.intel_cpu and src/MAKE/OPTIONS/Makefile.knl files for examples. For CPUs: OPTFLAGS = -xHost -O2 -fp-model fast=2 -no-prec-div -qoverride-limits CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ -fno-alias -ansi-alias -restrict $(OPTFLAGS) LINKFLAGS = -g -qopenmp $(OPTFLAGS) LIB = -ltbbmalloc -ltbbmalloc_proxy For KNLs: OPTFLAGS = -xMIC-AVX512 -O2 -fp-model fast=2 -no-prec-div -qoverride-limits CCFLAGS = -g -qopenmp -DLAMMPS_MEMALIGN=64 -no-offload \ -fno-alias -ansi-alias -restrict $(OPTFLAGS) LINKFLAGS = -g -qopenmp $(OPTFLAGS) LIB = -ltbbmalloc Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner. Note that you cannot build one executable to run on multiple hardware targets (Intel CPUs or KNL). You need to build LAMMPS once for each hardware target, to produce a separate executable. You should also typically install the USER-OMP package, as it can be used in tandem with the USER-INTEL package to good effect, as explained in "Section 5.3.2"_accelerate_intel.html. make yes-user-intel yes-user-omp make machine :pre make no-user-intel no-user-omp make machine :pre [Supporting info:] src/USER-INTEL: filenames -> commands src/USER-INTEL/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.2"_accelerate_gpu.html "Section 2.7 -sf intel"_Section_start.html#start_7 "Section 2.7 -pk intel"_Section_start.html#start_7 "package intel"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (i) src/USER-INTEL/TEST "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line USER-LB package :link(USER-LB),h4 [Contents:] Fixes which implement a background Lattice-Boltzmann (LB) fluid, which can be used to model MD particles influenced by hydrodynamic forces. [Authors:] Frances Mackay and Colin Denniston (University of Western Ontario). [Install or un-install:] make yes-user-lb make machine :pre make no-user-lb make machine :pre [Supporting info:] src/USER-LB: filenames -> commands src/USER-LB/README "fix lb/fluid"_fix_lb_fluid.html "fix lb/momentum"_fix_lb_momentum.html "fix lb/viscous"_fix_lb_viscous.html examples/USER/lb :ul :line USER-MGPT package :link(USER-MGPT),h4 [Contents:] A pair style which provides a fast implementation of the quantum-based MGPT multi-ion potentials. The MGPT or model GPT method derives from first-principles DFT-based generalized pseudopotential theory (GPT) through a series of systematic approximations valid for mid-period transition metals with nearly half-filled d bands. The MGPT method was originally developed by John Moriarty at LLNL. The pair style in this package calculates forces and energies using an optimized matrix-MGPT algorithm due to Tomas Oppelstrup at LLNL. [Authors:] Tomas Oppelstrup and John Moriarty (LLNL). [Install or un-install:] make yes-user-mgpt make machine :pre make no-user-mgpt make machine :pre [Supporting info:] src/USER-MGPT: filenames -> commands src/USER-MGPT/README "pair_style mgpt"_pair_mgpt.html examples/USER/mgpt :ul :line USER-MISC package :link(USER-MISC),h4 [Contents:] A potpourri of (mostly) unrelated features contributed to LAMMPS by users. Each feature is a single fix, compute, pair, bond, angle, dihedral, improper, or command style. [Authors:] The author for each style in the package is listed in the src/USER-MISC/README file. [Install or un-install:] make yes-user-misc make machine :pre make no-user-misc make machine :pre [Supporting info:] src/USER-MISC: filenames -> commands src/USER-MISC/README one doc page per individual command listed in src/USER-MISC/README examples/USER/misc :ul :line USER-MANIFOLD package :link(USER-MANIFOLD),h4 [Contents:] Several fixes and a "manifold" class which enable simulations of particles constrained to a manifold (a 2D surface within the 3D simulation box). This is done by applying the RATTLE constraint algorithm to formulate single-particle constraint functions g(xi,yi,zi) = 0 and their derivative (i.e. the normal of the manifold) n = grad(g). [Author:] Stefan Paquay (until 2017: Eindhoven University of Technology (TU/e), The Netherlands; since 2017: Brandeis University, Waltham, MA, USA) [Install or un-install:] make yes-user-manifold make machine :pre make no-user-manifold make machine :pre [Supporting info:] src/USER-MANIFOLD: filenames -> commands src/USER-MANIFOLD/README "doc/manifolds"_manifolds.html "fix manifoldforce"_fix_manifoldforce.html "fix nve/manifold/rattle"_fix_nve_manifold_rattle.html "fix nvt/manifold/rattle"_fix_nvt_manifold_rattle.html examples/USER/manifold http://lammps.sandia.gov/movies.html#manifold :ul :line +USER-MEAMC package :link(USER-MEAMC),h4 + +[Contents:] + +A pair style for the modified embedded atom (MEAM) potential +translated from the Fortran version in the "MEAM"_MEAM package +to plain C++. In contrast to the MEAM package, no library +needs to be compiled and the pair style can be instantiated +multiple times. + +[Author:] Sebastian Huetter, (Otto-von-Guericke University Magdeburg) +based on the work of Greg Wagner (Northwestern U) while at Sandia. + +[Install or un-install:] + +make yes-user-meamc +make machine :pre + +make no-user-meamc +make machine :pre + +[Supporting info:] + +src/USER-MEAMC: filenames -> commands +src/USER-MEAMC/README +"pair meam/c"_pair_meam.html +examples/meam :ul + +:line + USER-MOLFILE package :link(USER-MOLFILE),h4 [Contents:] A "dump molfile"_dump_molfile.html command which uses molfile plugins that are bundled with the "VMD"_vmd_home molecular visualization and analysis program, to enable LAMMPS to dump snapshots in formats compatible with various molecular simulation tools. :link(vmd_home,http://www.ks.uiuc.edu/Research/vmd) To use this package you must have the desired VMD plugins available on your system. Note that this package only provides the interface code, not the plugins themselves, which will be accessed when requesting a specific plugin via the "dump molfile"_dump_molfile.html command. Plugins can be obtained from a VMD installation which has to match the platform that you are using to compile LAMMPS for. By adding plugins to VMD, support for new file formats can be added to LAMMPS (or VMD or other programs that use them) without having to recompile the application itself. More information about the VMD molfile plugins can be found at "http://www.ks.uiuc.edu/Research/vmd/plugins/molfile"_http://www.ks.uiuc.edu/Research/vmd/plugins/molfile. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Note that the lib/molfile/Makefile.lammps file has a setting for a dynamic loading library libdl.a that should is typically present on all systems, which is required for LAMMPS to link with this package. If the setting is not valid for your system, you will need to edit the Makefile.lammps file. See lib/molfile/README and lib/molfile/Makefile.lammps for details. make yes-user-molfile make machine :pre make no-user-molfile make machine :pre [Supporting info:] src/USER-MOLFILE: filenames -> commands src/USER-MOLFILE/README lib/molfile/README "dump molfile"_dump_molfile.html :ul :line USER-NETCDF package :link(USER-NETCDF),h4 [Contents:] Dump styles for writing NetCDF formatted dump files. NetCDF is a portable, binary, self-describing file format developed on top of HDF5. The file contents follow the AMBER NetCDF trajectory conventions (http://ambermd.org/netcdf/nctraj.xhtml), but include extensions. To use this package you must have the NetCDF library available on your system. Note that NetCDF files can be directly visualized with the following tools: "Ovito"_ovito (Ovito supports the AMBER convention and the extensions mentioned above) "VMD"_vmd_home "AtomEye"_atomeye (the libAtoms version of AtomEye contains a NetCDF reader not present in the standard distribution) :ul :link(ovito,http://www.ovito.org) :link(atomeye,http://www.libatoms.org) [Author:] Lars Pastewka (Karlsruhe Institute of Technology). [Install or un-install:] Note that to follow these steps, you need the standard NetCDF software package installed on your system. The lib/netcdf/Makefile.lammps file has settings for NetCDF include and library files that LAMMPS needs to compile and linkk with this package. If the settings are not valid for your system, you will need to edit the Makefile.lammps file. See lib/netcdf/README for details. make yes-user-netcdf make machine :pre make no-user-netcdf make machine :pre [Supporting info:] src/USER-NETCDF: filenames -> commands src/USER-NETCDF/README lib/netcdf/README "dump netcdf"_dump_netcdf.html :ul :line USER-OMP package :link(USER-OMP),h4 [Contents:] Hundreds of pair, fix, compute, bond, angle, dihedral, improper, and kspace styles which are altered to enable threading on many-core CPUs via OpenMP directives. All of them have an "omp" in their style name. "Section 5.3.4"_accelerate_omp.html gives details of what hardware and compilers are required on your system, and how to build and use this package. Its styles can be invoked at run time via the "-sf omp" or "-suffix omp" "command-line switches"_Section_start.html#start_7. Also see the "KOKKOS"_#KOKKOS, "OPT"_#OPT, and "USER-INTEL"_#USER-INTEL packages, which have styles optimized for CPUs. [Author:] Axel Kohlmeyer (Temple U). NOTE: The compile flags "-restrict" and "-fopenmp" must be used to build LAMMPS with the USER-OMP package, as well as the link flag "-fopenmp". They should be added to the CCFLAGS and LINKFLAGS lines of your Makefile.machine. See src/MAKE/OPTIONS/Makefile.omp for an example. Once you have an appropriate Makefile.machine, you can install/un-install the package and build LAMMPS in the usual manner: [Install or un-install:] make yes-user-omp make machine :pre make no-user-omp make machine :pre CCFLAGS: add -fopenmp and -restrict LINKFLAGS: add -fopenmp :ul [Supporting info:] src/USER-OMP: filenames -> commands src/USER-OMP/README "Section 5.3"_Section_accelerate.html#acc_3 "Section 5.3.4"_accelerate_omp.html "Section 2.7 -sf omp"_Section_start.html#start_7 "Section 2.7 -pk omp"_Section_start.html#start_7 "package omp"_package.html Styles sections of "Section 3.5"_Section_commands.html#cmd_5 for styles followed by (o) "Benchmarks page"_http://lammps.sandia.gov/bench.html of web site :ul :line USER-PHONON package :link(USER-PHONON),h4 [Contents:] A "fix phonon"_fix_phonon.html command that calculates dynamical matrices, which can then be used to compute phonon dispersion relations, directly from molecular dynamics simulations. [Author:] Ling-Ti Kong (Shanghai Jiao Tong University). [Install or un-install:] make yes-user-phonon make machine :pre make no-user-phonon make machine :pre [Supporting info:] src/USER-PHONON: filenames -> commands src/USER-PHONON/README "fix phonon"_fix_phonon.html examples/USER/phonon :ul :line USER-QMMM package :link(USER-QMMM),h4 [Contents:] A "fix qmmm"_fix_qmmm.html command which allows LAMMPS to be used in a QM/MM simulation, currently only in combination with the "Quantum ESPRESSO"_espresso package. :link(espresso,http://www.quantum-espresso.org) To use this package you must have Quantum ESPRESSO available on your system. The current implementation only supports an ONIOM style mechanical coupling to the Quantum ESPRESSO plane wave DFT package. Electrostatic coupling is in preparation and the interface has been written in a manner that coupling to other QM codes should be possible without changes to LAMMPS itself. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] Before building LAMMPS with this package, you must first build the QMMM library in lib/qmmm. You can do this manually if you prefer; follow the first two steps explained in lib/colvars/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/colvars/Install.py script with the specified args: make lib-qmmm # print help message make lib-qmmm args="-m gfortran" # build with GNU Fortran compiler :pre The build should produce two files: lib/qmmm/libqmmm.a and lib/qmmm/Makefile.lammps. The latter is copied from an existing Makefile.lammps.* and has settings needed to build LAMMPS with the QMMM library (though typically the settings are just blank). If necessary, you can edit/create a new lib/qmmm/Makefile.machine file for your system, which should define an EXTRAMAKE variable to specify a corresponding Makefile.lammps.machine file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-qmmm make machine :pre make no-user-qmmm make machine :pre NOTE: The LAMMPS executable these steps produce is not yet functional for a QM/MM simulation. You must also build Quantum ESPRESSO and create a new executable which links LAMMPS and Quanutm ESPRESSO together. These are steps 3 and 4 described in the lib/qmmm/README file. [Supporting info:] src/USER-QMMM: filenames -> commands src/USER-QMMM/README lib/qmmm/README "fix phonon"_fix_phonon.html lib/qmmm/example-ec/README lib/qmmm/example-mc/README :ul :line USER-QTB package :link(USER-QTB),h4 [Contents:] Two fixes which provide a self-consistent quantum treatment of vibrational modes in a classical molecular dynamics simulation. By coupling the MD simulation to a colored thermostat, it introduces zero point energy into the system, altering the energy power spectrum and the heat capacity to account for their quantum nature. This is useful when modeling systems at temperatures lower than their classical limits or when temperatures ramp across the classical limits in a simulation. [Author:] Yuan Shen (Stanford U). [Install or un-install:] make yes-user-qtb make machine :pre make no-user-qtb make machine :pre [Supporting info:] src/USER-QTB: filenames -> commands src/USER-QTB/README "fix qtb"_fix_qtb.html "fix qbmsst"_fix_qbmsst.html examples/USER/qtb :ul :line USER-QUIP package :link(USER-QUIP),h4 [Contents:] A "pair_style quip"_pair_quip.html command which wraps the "QUIP libAtoms library"_quip, which includes a variety of interatomic potentials, including Gaussian Approximation Potential (GAP) models developed by the Cambridge University group. :link(quip,https://github.com/libAtoms/QUIP) To use this package you must have the QUIP libAatoms library available on your system. [Author:] Albert Bartok (Cambridge University) [Install or un-install:] Note that to follow these steps to compile and link to the QUIP library, you must first download and build QUIP on your systems. It can be obtained from GitHub. See step 1 and step 1.1 in the lib/quip/README file for details on how to do this. Note that it requires setting two environment variables, QUIP_ROOT and QUIP_ARCH, which will be accessed by the lib/quip/Makefile.lammps file which is used when you compile and link LAMMPS with this package. You should only need to edit this file if the LAMMPS build can not use its settings to successfully build on your system. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-quip make machine :pre make no-user-quip make machine :pre [Supporting info:] src/USER-QUIP: filenames -> commands src/USER-QUIP/README "pair_style quip"_pair_quip.html examples/USER/quip :ul :line USER-REAXC package :link(USER-REAXC),h4 [Contents:] A pair style which implements the ReaxFF potential in C/C++ (in contrast to the "REAX package"_#REAX and its Fortran library). ReaxFF is universal reactive force field. See the src/USER-REAXC/README file for more info on differences between the two packages. Also two fixes for monitoring molecules as bonds are created and destroyed. [Author:] Hasan Metin Aktulga (MSU) while at Purdue University. [Install or un-install:] make yes-user-reaxc make machine :pre make no-user-reaxc make machine :pre [Supporting info:] src/USER-REAXC: filenames -> commands src/USER-REAXC/README "pair_style reax/c"_pair_reaxc.html "fix reax/c/bonds"_fix_reax_bonds.html "fix reax/c/species"_fix_reaxc_species.html examples/reax :ul :line USER-SMD package :link(USER-SMD),h4 [Contents:] An atom style, fixes, computes, and several pair styles which implements smoothed Mach dynamics (SMD) for solids, which is a model related to smoothed particle hydrodynamics (SPH) for liquids (see the "USER-SPH package"_#USER-SPH). This package solves solids mechanics problems via a state of the art stabilized meshless method with hourglass control. It can specify hydrostatic interactions independently from material strength models, i.e. pressure and deviatoric stresses are separated. It provides many material models (Johnson-Cook, plasticity with hardening, Mie-Grueneisen, Polynomial EOS) and allows new material models to be added. It implements rigid boundary conditions (walls) which can be specified as surface geometries from *.STL files. [Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute, Germany). [Install or un-install:] Before building LAMMPS with this package, you must first download the Eigen library. Eigen is a template library, so you do not need to build it, just download it. You can do this manually if you prefer; follow the instructions in lib/smd/README. You can also do it in one step from the lammps/src dir, using a command like these, which simply invoke the lib/smd/Install.py script with the specified args: make lib-smd # print help message make lib-smd args="-g -l" # download in default lib/smd/eigen-eigen-* make lib-smd args="-h . eigen -g -l" # download in lib/smd/eigen make lib-smd args="-h ~ eigen -g -l" # download and build in ~/eigen :pre Note that the final -l switch is to create a symbolic (soft) link named "includelink" in lib/smd to point to the Eigen dir. When LAMMPS builds it will use this link. You should not need to edit the lib/smd/Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-smd make machine :pre make no-user-smd make machine :pre [Supporting info:] src/USER-SMD: filenames -> commands src/USER-SMD/README doc/PDF/SMD_LAMMPS_userguide.pdf examples/USER/smd http://lammps.sandia.gov/movies.html#smd :ul :line USER-SMTBQ package :link(USER-SMTBQ),h4 [Contents:] A pair style which implements a Second Moment Tight Binding model with QEq charge equilibration (SMTBQ) potential for the description of ionocovalent bonds in oxides. [Authors:] Nicolas Salles, Emile Maras, Olivier Politano, and Robert Tetot (LAAS-CNRS, France). [Install or un-install:] make yes-user-smtbq make machine :pre make no-user-smtbq make machine :pre [Supporting info:] src/USER-SMTBQ: filenames -> commands src/USER-SMTBQ/README "pair_style smtbq"_pair_smtbq.html examples/USER/smtbq :ul :line USER-SPH package :link(USER-SPH),h4 [Contents:] An atom style, fixes, computes, and several pair styles which implements smoothed particle hydrodynamics (SPH) for liquids. See the related "USER-SMD package"_#USER-SMD package for smooth Mach dynamics (SMD) for solids. This package contains ideal gas, Lennard-Jones equation of states, Tait, and full support for complete (i.e. internal-energy dependent) equations of state. It allows for plain or Monaghans XSPH integration of the equations of motion. It has options for density continuity or density summation to propagate the density field. It has "set"_set.html command options to set the internal energy and density of particles from the input script and allows the same quantities to be output with thermodynamic output or to dump files via the "compute property/atom"_compute_property_atom.html command. [Author:] Georg Ganzenmuller (Fraunhofer-Institute for High-Speed Dynamics, Ernst Mach Institute, Germany). [Install or un-install:] make yes-user-sph make machine :pre make no-user-sph make machine :pre [Supporting info:] src/USER-SPH: filenames -> commands src/USER-SPH/README doc/PDF/SPH_LAMMPS_userguide.pdf examples/USER/sph http://lammps.sandia.gov/movies.html#sph :ul :line USER-TALLY package :link(USER-TALLY),h4 [Contents:] Several compute styles that can be called when pairwise interactions are calculated to tally information (forces, heat flux, energy, stress, etc) about individual interactions. [Author:] Axel Kohlmeyer (Temple U). [Install or un-install:] make yes-user-tally make machine :pre make no-user-tally make machine :pre [Supporting info:] src/USER-TALLY: filenames -> commands src/USER-TALLY/README "compute */tally"_compute_tally.html examples/USER/tally :ul :line USER-VTK package :link(USER-VTK),h4 [Contents:] A "dump vtk"_dump_vtk.html command which outputs snapshot info in the "VTK format"_vtk, enabling visualization by "Paraview"_paraview or other visuzlization packages. :link(vtk,http://www.vtk.org) :link(paraview,http://www.paraview.org) To use this package you must have VTK library available on your system. [Authors:] Richard Berger (JKU) and Daniel Queteschiner (DCS Computing). [Install or un-install:] The lib/vtk/Makefile.lammps file has settings for accessing VTK files and its library, which are required for LAMMPS to build and link with this package. If the settings are not valid for your system, check if one of the other lib/vtk/Makefile.lammps.* files is compatible and copy it to Makefile.lammps. If none of the provided files work, you will need to edit the Makefile.lammps file. You can then install/un-install the package and build LAMMPS in the usual manner: make yes-user-vtk make machine :pre make no-user-vtk make machine :pre [Supporting info:] src/USER-VTK: filenames -> commands src/USER-VTK/README lib/vtk/README "dump vtk"_dump_vtk.html :ul diff --git a/doc/src/pair_meam.txt b/doc/src/pair_meam.txt index 4fcb7a2e6..62fa59f40 100644 --- a/doc/src/pair_meam.txt +++ b/doc/src/pair_meam.txt @@ -1,371 +1,379 @@ "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 meam command :h3 +pair_style meam/c command :h3 [Syntax:] -pair_style meam :pre +pair_style style :pre + +style = {meam} or {meam/c} [Examples:] pair_style meam pair_coeff * * ../potentials/library.meam Si ../potentials/si.meam Si pair_coeff * * ../potentials/library.meam Ni Al NULL Ni Al Ni Ni :pre [Description:] NOTE: The behavior of the MEAM potential for alloy systems has changed as of November 2010; see description below of the mixture_ref_t parameter Style {meam} computes pairwise interactions for a variety of materials using modified embedded-atom method (MEAM) potentials "(Baskes)"_#Baskes. Conceptually, it is an extension to the original "EAM potentials"_pair_eam.html which adds angular forces. It is thus suitable for modeling metals and alloys with fcc, bcc, hcp and diamond cubic structures, as well as covalently bonded materials like -silicon and carbon. +silicon and carbon. Style {meam/c} is a translation of the {meam} code +from (mostly) Fortran to C++. It is functionally equivalent to {meam}. In the MEAM formulation, the total energy E of a system of atoms is given by: :c,image(Eqs/pair_meam.jpg) where F is the embedding energy which is a function of the atomic electron density rho, and phi is a pair potential interaction. The pair interaction is summed over all neighbors J of atom I within the cutoff distance. As with EAM, the multi-body nature of the MEAM potential is a result of the embedding energy term. Details of the computation of the embedding and pair energies, as implemented in LAMMPS, are given in "(Gullet)"_#Gullet and references therein. The various parameters in the MEAM formulas are listed in two files which are specified by the "pair_coeff"_pair_coeff.html command. These are ASCII text files in a format consistent with other MD codes that implement MEAM potentials, such as the serial DYNAMO code and Warp. Several MEAM potential files with parameters for different materials are included in the "potentials" directory of the LAMMPS distribution with a ".meam" suffix. All of these are parameterized in terms of LAMMPS "metal units"_units.html. Note that unlike for other potentials, cutoffs for MEAM potentials are not set in the pair_style or pair_coeff command; they are specified in the MEAM potential files themselves. Only a single pair_coeff command is used with the {meam} style which specifies two MEAM files and the element(s) to extract information for. The MEAM elements are mapped to LAMMPS atom types by specifying N additional arguments after the 2nd filename in the pair_coeff command, where N is the number of LAMMPS atom types: MEAM library file Elem1, Elem2, ... MEAM parameter file N element names = mapping of MEAM elements to atom types :ul See the "pair_coeff"_pair_coeff.html doc page for alternate ways to specify the path for the potential files. As an example, the potentials/library.meam file has generic MEAM settings for a variety of elements. The potentials/sic.meam file has specific parameter settings for a Si and C alloy system. 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 * * library.meam Si C sic.meam Si Si Si C :pre The 1st 2 arguments must be * * so as to span all LAMMPS atom types. The two filenames are for the library and parameter file respectively. The Si and C arguments (between the file names) are the two elements for which info will be extracted from the library file. The first three trailing Si arguments map LAMMPS atom types 1,2,3 to the MEAM Si element. The final C argument maps LAMMPS atom type 4 to the MEAM C element. If the 2nd filename is specified as NULL, no parameter file is read, which simply means the generic parameters in the library file are used. Use of the NULL specification for the parameter file is discouraged for systems with more than a single element type (e.g. alloys), since the parameter file is expected to set element interaction terms that are not captured by the information in the library file. If a mapping value is specified as NULL, the mapping is not performed. This can be used when a {meam} 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. The MEAM library file provided with LAMMPS has the name potentials/library.meam. It is the "meamf" file used by other MD codes. Aside from blank and comment lines (start with #) which can appear anywhere, it is formatted as a series of entries, each of which has 19 parameters and can span multiple lines: elt, lat, z, ielement, atwt, alpha, b0, b1, b2, b3, alat, esub, asub, t0, t1, t2, t3, rozero, ibar The "elt" and "lat" parameters are text strings, such as elt = Si or Cu and lat = dia or fcc. Because the library file is used by Fortran MD codes, these strings may be enclosed in single quotes, but this is not required. The other numeric parameters match values in the formulas above. The value of the "elt" string is what is used in the pair_coeff command to identify which settings from the library file you wish to read in. There can be multiple entries in the library file with the same "elt" value; LAMMPS reads the 1st matching entry it finds and ignores the rest. Other parameters in the MEAM library file correspond to single-element potential parameters: lat = lattice structure of reference configuration z = number of nearest neighbors in the reference structure ielement = atomic number atwt = atomic weight alat = lattice constant of reference structure esub = energy per atom (eV) in the reference structure at equilibrium asub = "A" parameter for MEAM (see e.g. "(Baskes)"_#Baskes) :pre The alpha, b0, b1, b2, b3, t0, t1, t2, t3 parameters correspond to the standard MEAM parameters in the literature "(Baskes)"_#Baskes (the b parameters are the standard beta parameters). The rozero parameter is an element-dependent density scaling that weights the reference background density (see e.g. equation 4.5 in "(Gullet)"_#Gullet) and is typically 1.0 for single-element systems. The ibar parameter selects the form of the function G(Gamma) used to compute the electron density; options are 0 => G = sqrt(1+Gamma) 1 => G = exp(Gamma/2) 2 => not implemented 3 => G = 2/(1+exp(-Gamma)) 4 => G = sqrt(1+Gamma) -5 => G = +-sqrt(abs(1+Gamma)) :pre If used, the MEAM parameter file contains settings that override or complement the library file settings. Examples of such parameter files are in the potentials directory with a ".meam" suffix. Their format is the same as is read by other Fortran MD codes. Aside from blank and comment lines (start with #) which can appear anywhere, each line has one of the following forms. Each line can also have a trailing comment (starting with #) which is ignored. keyword = value keyword(I) = value keyword(I,J) = value keyword(I,J,K) = value :pre The recognized keywords are as follows: Ec, alpha, rho0, delta, lattce, attrac, repuls, nn2, Cmin, Cmax, rc, delr, augt1, gsmooth_factor, re where rc = cutoff radius for cutoff function; default = 4.0 delr = length of smoothing distance for cutoff function; default = 0.1 rho0(I) = relative density for element I (overwrites value read from meamf file) Ec(I,J) = cohesive energy of reference structure for I-J mixture delta(I,J) = heat of formation for I-J alloy; if Ec_IJ is input as zero, then LAMMPS sets Ec_IJ = (Ec_II + Ec_JJ)/2 - delta_IJ alpha(I,J) = alpha parameter for pair potential between I and J (can be computed from bulk modulus of reference structure re(I,J) = equilibrium distance between I and J in the reference structure Cmax(I,J,K) = Cmax screening parameter when I-J pair is screened by K (I<=J); default = 2.8 Cmin(I,J,K) = Cmin screening parameter when I-J pair is screened by K (I<=J); default = 2.0 lattce(I,J) = lattice structure of I-J reference structure: dia = diamond (interlaced fcc for alloy) fcc = face centered cubic bcc = body centered cubic dim = dimer b1 = rock salt (NaCl structure) hcp = hexagonal close-packed c11 = MoSi2 structure l12 = Cu3Au structure (lower case L, followed by 12) b2 = CsCl structure (interpenetrating simple cubic) nn2(I,J) = turn on second-nearest neighbor MEAM formulation for I-J pair (see for example "(Lee)"_#Lee). 0 = second-nearest neighbor formulation off 1 = second-nearest neighbor formulation on default = 0 attrac(I,J) = additional cubic attraction term in Rose energy I-J pair potential default = 0 repuls(I,J) = additional cubic repulsive term in Rose energy I-J pair potential default = 0 zbl(I,J) = blend the MEAM I-J pair potential with the ZBL potential for small atom separations "(ZBL)"_#ZBL default = 1 gsmooth_factor = factor determining the length of the G-function smoothing region; only significant for ibar=0 or ibar=4. 99.0 = short smoothing region, sharp step 0.5 = long smoothing region, smooth step default = 99.0 augt1 = integer flag for whether to augment t1 parameter by 3/5*t3 to account for old vs. new meam formulations; 0 = don't augment t1 1 = augment t1 default = 1 ialloy = integer flag to use alternative averaging rule for t parameters, for comparison with the DYNAMO MEAM code 0 = standard averaging (matches ialloy=0 in DYNAMO) 1 = alternative averaging (matches ialloy=1 in DYNAMO) 2 = no averaging of t (use single-element values) default = 0 mixture_ref_t = integer flag to use mixture average of t to compute the background reference density for alloys, instead of the single-element values (see description and warning elsewhere in this doc page) 0 = do not use mixture averaging for t in the reference density 1 = use mixture averaging for t in the reference density default = 0 erose_form = integer value to select the form of the Rose energy function (see description below). default = 0 emb_lin_neg = integer value to select embedding function for negative densities 0 = F(rho)=0 1 = F(rho) = -asub*esub*rho (linear in rho, matches DYNAMO) default = 0 bkgd_dyn = integer value to select background density formula 0 = rho_bkgd = rho_ref_meam(a) (as in the reference structure) 1 = rho_bkgd = rho0_meam(a)*Z_meam(a) (matches DYNAMO) default = 0 :pre Rc, delr, re are in distance units (Angstroms in the case of metal units). Ec and delta are in energy units (eV in the case of metal units). Each keyword represents a quantity which is either a scalar, vector, 2d array, or 3d array and must be specified with the correct corresponding array syntax. The indices I,J,K each run from 1 to N where N is the number of MEAM elements being used. Thus these lines rho0(2) = 2.25 alpha(1,2) = 4.37 :pre set rho0 for the 2nd element to the value 2.25 and set alpha for the alloy interaction between elements 1 and 2 to 4.37. The augt1 parameter is related to modifications in the MEAM formulation of the partial electron density function. In recent literature, an extra term is included in the expression for the third-order density in order to make the densities orthogonal (see for example "(Wang)"_#Wang2, equation 3d); this term is included in the MEAM implementation in lammps. However, in earlier published work this term was not included when deriving parameters, including most of those provided in the library.meam file included with lammps, and to account for this difference the parameter t1 must be augmented by 3/5*t3. If augt1=1, the default, this augmentation is done automatically. When parameter values are fit using the modified density function, as in more recent literature, augt1 should be set to 0. The mixture_ref_t parameter is available to match results with those of previous versions of lammps (before January 2011). Newer versions of lammps, by default, use the single-element values of the t parameters to compute the background reference density. This is the proper way to compute these parameters. Earlier versions of lammps used an alloy mixture averaged value of t to compute the background reference density. Setting mixture_ref_t=1 gives the old behavior. WARNING: using mixture_ref_t=1 will give results that are demonstrably incorrect for second-neighbor MEAM, and non-standard for first-neighbor MEAM; this option is included only for matching with previous versions of lammps and should be avoided if possible. The parameters attrac and repuls, along with the integer selection parameter erose_form, can be used to modify the Rose energy function used to compute the pair potential. This function gives the energy of the reference state as a function of interatomic spacing. The form of this function is: astar = alpha * (r/re - 1.d0) if erose_form = 0: erose = -Ec*(1+astar+a3*(astar**3)/(r/re))*exp(-astar) if erose_form = 1: erose = -Ec*(1+astar+(-attrac+repuls/r)*(astar**3))*exp(-astar) if erose_form = 2: erose = -Ec*(1 +astar + a3*(astar**3))*exp(-astar) a3 = repuls, astar < 0 a3 = attrac, astar >= 0 :pre Most published MEAM parameter sets use the default values attrac=repulse=0. Setting repuls=attrac=delta corresponds to the form used in several recent published MEAM parameter sets, such as "(Valone)"_#Valone NOTE: The default form of the erose expression in LAMMPS was corrected in March 2009. The current version is correct, but may show different behavior compared with earlier versions of lammps with the attrac and/or repuls parameters are non-zero. To obtain the previous default form, use erose_form = 1 (this form does not seem to appear in the literature). An alternative form (see e.g. "(Lee2)"_#Lee2) is available using erose_form = 2. :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 with user-specifiable parameters as described above. You never need to specify a pair_coeff command with I != J arguments for this style. 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 style is part of the MEAM package. It is only enabled if LAMMPS +The {meam} style is part of the MEAM package. It is only enabled if LAMMPS was built with that package, which also requires the MEAM library be -built and linked with LAMMPS. See the "Making -LAMMPS"_Section_start.html#start_3 section for more info. +built and linked with LAMMPS. +The {meam/c} style is provided in the USER-MEAMC package. It is only enabled +if LAMMPS was built with that package. In contrast to the {meam} style, +{meam/c} does not require a separate library to be compiled and it can be +instantiated multiple times in a "hybrid"_pair_hybrid.html pair style. +See the "Making LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "pair_coeff"_pair_coeff.html, "pair_style eam"_pair_eam.html, "pair_style meam/spline"_pair_meam_spline.html [Default:] none :line :link(Baskes) [(Baskes)] Baskes, Phys Rev B, 46, 2727-2742 (1992). :link(Gullet) [(Gullet)] Gullet, Wagner, Slepoy, SANDIA Report 2003-8782 (2003). This report may be accessed on-line via "this link"_sandreport. :link(sandreport,http://infoserve.sandia.gov/sand_doc/2003/038782.pdf) :link(Lee) [(Lee)] Lee, Baskes, Phys. Rev. B, 62, 8564-8567 (2000). :link(Lee2) [(Lee2)] Lee, Baskes, Kim, Cho. Phys. Rev. B, 64, 184102 (2001). :link(Valone) [(Valone)] Valone, Baskes, Martin, Phys. Rev. B, 73, 214209 (2006). :link(Wang2) [(Wang)] Wang, Van Hove, Ross, Baskes, J. Chem. Phys., 121, 5410 (2004). :link(ZBL) [(ZBL)] J.F. Ziegler, J.P. Biersack, U. Littmark, "Stopping and Ranges of Ions in Matter", Vol 1, 1985, Pergamon Press. diff --git a/examples/meam/in.meamc b/examples/meam/in.meamc new file mode 100644 index 000000000..f6815cd7d --- /dev/null +++ b/examples/meam/in.meamc @@ -0,0 +1,30 @@ +# Test of MEAM potential for SiC system + +units metal +boundary p p p + +atom_style atomic + +read_data data.meam + +pair_style meam/c +pair_coeff * * library.meam Si C SiC.meam Si C + +neighbor 0.3 bin +neigh_modify delay 10 + +fix 1 all nve +thermo 10 +timestep 0.001 + +#dump 1 all atom 50 dump.meam + +#dump 2 all image 10 image.*.jpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 2 pad 3 element Si C + +#dump 3 all movie 10 movie.mpg element element & +# axes yes 0.8 0.02 view 60 -30 +#dump_modify 3 pad 3 element Si C + +run 100 diff --git a/examples/meam/in.meamc.shear b/examples/meam/in.meamc.shear new file mode 100644 index 000000000..e4584d974 --- /dev/null +++ b/examples/meam/in.meamc.shear @@ -0,0 +1,79 @@ +# 3d metal shear simulation + +units metal +boundary s s p + +atom_style atomic +lattice fcc 3.52 +region box block 0 16.0 0 10.0 0 2.828427 +create_box 3 box + +lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 & + origin 0.5 0 0 +create_atoms 1 box + +pair_style meam/c +pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 + +neighbor 0.3 bin +neigh_modify delay 5 + +region lower block INF INF INF 0.9 INF INF +region upper block INF INF 6.1 INF INF INF +group lower region lower +group upper region upper +group boundary union lower upper +group mobile subtract all boundary + +set group lower type 2 +set group upper type 3 + +# void + +#region void cylinder z 8 5 2.5 INF INF +#delete_atoms region void + +# temp controllers + +compute new3d mobile temp +compute new2d mobile temp/partial 0 1 1 + +# equilibrate + +velocity mobile create 300.0 5812775 temp new3d +fix 1 all nve +fix 2 boundary setforce 0.0 0.0 0.0 + +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new3d + +thermo 25 +thermo_modify temp new3d + +timestep 0.001 +run 100 + +# shear + +velocity upper set 1.0 0 0 +velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes + +unfix 3 +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new2d + +#dump 1 all atom 500 dump.meam.shear + +#dump 2 all image 100 image.*.jpg type type & +# axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 2 pad 4 + +#dump 3 all movie 100 movie.mpg type type & +# axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 3 pad 4 + +thermo 100 +thermo_modify temp new2d + +reset_timestep 0 +run 3000 diff --git a/examples/meam/log.5Oct16.meam.icc.1 b/examples/meam/log.19May17.meam.g++.1 similarity index 68% copy from examples/meam/log.5Oct16.meam.icc.1 copy to examples/meam/log.19May17.meam.g++.1 index 200da68e0..a98de97f8 100644 --- a/examples/meam/log.5Oct16.meam.icc.1 +++ b/examples/meam/log.19May17.meam.g++.1 @@ -1,84 +1,95 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal boundary p p p atom_style atomic read_data data.meam orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) 1 by 1 by 1 MPI processor grid reading atoms ... 128 atoms pair_style meam pair_coeff * * library.meam Si C SiC.meam Si C Reading potential file library.meam with DATE: 2012-06-29 Reading potential file SiC.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 10 fix 1 all nve thermo 10 timestep 0.001 #dump 1 all atom 50 dump.meam #dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 2 pad 3 element Si C #dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 3 pad 3 element Si C run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.39054 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.103 | 8.103 | 8.103 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 20 1932.4467 -668.2581 0 -636.53498 -120223.52 30 1951.3652 -668.58139 0 -636.54771 -100508.4 40 2172.5974 -672.22715 0 -636.5617 -110753.34 50 2056.9149 -670.33108 0 -636.56468 -105418.07 60 1947.9564 -668.52788 0 -636.55015 -111413.04 70 1994.7712 -669.28849 0 -636.54225 -109645.76 80 2126.0903 -671.43755 0 -636.53557 -97475.831 90 2065.755 -670.4349 0 -636.52338 -95858.837 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.094512 on 1 procs for 100 steps with 128 atoms +Loop time of 0.0864418 on 1 procs for 100 steps with 128 atoms -Performance: 91.417 ns/day, 0.263 hours/ns, 1058.067 timesteps/s -99.4% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 99.952 ns/day, 0.240 hours/ns, 1156.848 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.091268 | 0.091268 | 0.091268 | 0.0 | 96.57 -Neigh | 0.0021861 | 0.0021861 | 0.0021861 | 0.0 | 2.31 -Comm | 0.00059438 | 0.00059438 | 0.00059438 | 0.0 | 0.63 -Output | 9.0837e-05 | 9.0837e-05 | 9.0837e-05 | 0.0 | 0.10 -Modify | 0.00024438 | 0.00024438 | 0.00024438 | 0.0 | 0.26 -Other | | 0.000128 | | | 0.14 +Pair | 0.082592 | 0.082592 | 0.082592 | 0.0 | 95.55 +Neigh | 0.0028124 | 0.0028124 | 0.0028124 | 0.0 | 3.25 +Comm | 0.00049043 | 0.00049043 | 0.00049043 | 0.0 | 0.57 +Output | 0.00014329 | 0.00014329 | 0.00014329 | 0.0 | 0.17 +Modify | 0.00025415 | 0.00025415 | 0.00025415 | 0.0 | 0.29 +Other | | 0.0001497 | | | 0.17 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 543 ave 543 max 543 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 1526 ave 1526 max 1526 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 3052 ave 3052 max 3052 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 3052 Ave neighs/atom = 23.8438 Neighbor list builds = 10 Dangerous builds = 10 Total wall time: 0:00:00 diff --git a/examples/meam/log.5Oct16.meam.icc.4 b/examples/meam/log.19May17.meam.g++.4 similarity index 68% copy from examples/meam/log.5Oct16.meam.icc.4 copy to examples/meam/log.19May17.meam.g++.4 index 51a6619e3..adc34d08a 100644 --- a/examples/meam/log.5Oct16.meam.icc.4 +++ b/examples/meam/log.19May17.meam.g++.4 @@ -1,84 +1,95 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal boundary p p p atom_style atomic read_data data.meam orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) 1 by 2 by 2 MPI processor grid reading atoms ... 128 atoms pair_style meam pair_coeff * * library.meam Si C SiC.meam Si C Reading potential file library.meam with DATE: 2012-06-29 Reading potential file SiC.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 10 fix 1 all nve thermo 10 timestep 0.001 #dump 1 all atom 50 dump.meam #dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 2 pad 3 element Si C #dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 3 pad 3 element Si C run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.319 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.024 | 8.026 | 8.027 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 20 1932.4467 -668.2581 0 -636.53498 -120223.52 30 1951.3652 -668.58139 0 -636.54771 -100508.4 40 2172.5974 -672.22715 0 -636.5617 -110753.34 50 2056.9149 -670.33108 0 -636.56468 -105418.07 60 1947.9564 -668.52788 0 -636.55015 -111413.04 70 1994.7712 -669.28849 0 -636.54225 -109645.76 80 2126.0903 -671.43755 0 -636.53557 -97475.831 90 2065.755 -670.4349 0 -636.52338 -95858.837 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.0350628 on 4 procs for 100 steps with 128 atoms +Loop time of 0.0389078 on 4 procs for 100 steps with 128 atoms -Performance: 246.415 ns/day, 0.097 hours/ns, 2852.026 timesteps/s -98.4% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 222.063 ns/day, 0.108 hours/ns, 2570.177 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.030952 | 0.031776 | 0.032203 | 0.3 | 90.63 -Neigh | 0.00058937 | 0.00061423 | 0.00063896 | 0.1 | 1.75 -Comm | 0.0018125 | 0.0022421 | 0.0030777 | 1.1 | 6.39 -Output | 0.00018525 | 0.00019765 | 0.00021911 | 0.1 | 0.56 -Modify | 8.0585e-05 | 9.0539e-05 | 9.7752e-05 | 0.1 | 0.26 -Other | | 0.0001422 | | | 0.41 +Pair | 0.031958 | 0.033267 | 0.034691 | 0.6 | 85.50 +Neigh | 0.00079155 | 0.00086409 | 0.00098801 | 0.0 | 2.22 +Comm | 0.0025704 | 0.0041765 | 0.005573 | 1.9 | 10.73 +Output | 0.0002749 | 0.00029588 | 0.00033569 | 0.0 | 0.76 +Modify | 9.4891e-05 | 0.00010347 | 0.00011587 | 0.0 | 0.27 +Other | | 0.000201 | | | 0.52 Nlocal: 32 ave 36 max 30 min Histogram: 1 2 0 0 0 0 0 0 0 1 Nghost: 293.75 ave 305 max 285 min Histogram: 2 0 0 0 0 0 0 1 0 1 Neighs: 381.5 ave 413 max 334 min Histogram: 1 0 0 0 1 0 0 0 0 2 FullNghs: 763 ave 866 max 678 min Histogram: 1 0 1 0 0 1 0 0 0 1 Total # of neighbors = 3052 Ave neighs/atom = 23.8438 Neighbor list builds = 10 Dangerous builds = 10 Total wall time: 0:00:00 diff --git a/examples/meam/log.5Oct16.meam.shear.icc.1 b/examples/meam/log.19May17.meam.shear.g++.1 similarity index 55% rename from examples/meam/log.5Oct16.meam.shear.icc.1 rename to examples/meam/log.19May17.meam.shear.g++.1 index 57f48d5ee..77b968845 100644 --- a/examples/meam/log.5Oct16.meam.shear.icc.1 +++ b/examples/meam/log.19May17.meam.shear.g++.1 @@ -1,196 +1,207 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # 3d metal shear simulation units metal boundary s s p atom_style atomic lattice fcc 3.52 Lattice spacing in x,y,z = 3.52 3.52 3.52 region box block 0 16.0 0 10.0 0 2.828427 create_box 3 box Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) 1 by 1 by 1 MPI processor grid lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 Lattice spacing in x,y,z = 3.52 4.97803 4.97803 create_atoms 1 box Created 1912 atoms pair_style meam pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 Reading potential file library.meam with DATE: 2012-06-29 Reading potential file Ni.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 5 region lower block INF INF INF 0.9 INF INF region upper block INF INF 6.1 INF INF INF group lower region lower 264 atoms in group lower group upper region upper 264 atoms in group upper group boundary union lower upper 528 atoms in group boundary group mobile subtract all boundary 1384 atoms in group mobile set group lower type 2 264 settings made for type set group upper type 3 264 settings made for type # void #region void cylinder z 8 5 2.5 INF INF #delete_atoms region void # temp controllers compute new3d mobile temp compute new2d mobile temp/partial 0 1 1 # equilibrate velocity mobile create 300.0 5812775 temp new3d fix 1 all nve fix 2 boundary setforce 0.0 0.0 0.0 fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 fix_modify 3 temp new3d thermo 25 thermo_modify temp new3d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 5 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 27 17 5 -Memory usage per processor = 8.55725 Mbytes + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 9.788 | 9.788 | 9.788 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 25 222.78953 -8188.1215 0 -8148.2941 9095.9008 19547.02 50 300 -8149.7654 0 -8096.1353 10633.141 19684.382 75 304.80657 -8163.4557 0 -8108.9665 7045.457 19759.745 100 300 -8173.6884 0 -8120.0584 5952.521 19886.589 -Loop time of 1.72323 on 1 procs for 100 steps with 1912 atoms +Loop time of 1.58103 on 1 procs for 100 steps with 1912 atoms -Performance: 5.014 ns/day, 4.787 hours/ns, 58.031 timesteps/s -99.8% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 5.465 ns/day, 4.392 hours/ns, 63.250 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.7026 | 1.7026 | 1.7026 | 0.0 | 98.80 -Neigh | 0.014496 | 0.014496 | 0.014496 | 0.0 | 0.84 -Comm | 0.0015783 | 0.0015783 | 0.0015783 | 0.0 | 0.09 -Output | 6.0081e-05 | 6.0081e-05 | 6.0081e-05 | 0.0 | 0.00 -Modify | 0.0034628 | 0.0034628 | 0.0034628 | 0.0 | 0.20 -Other | | 0.00101 | | | 0.06 +Pair | 1.5561 | 1.5561 | 1.5561 | 0.0 | 98.42 +Neigh | 0.018544 | 0.018544 | 0.018544 | 0.0 | 1.17 +Comm | 0.0013864 | 0.0013864 | 0.0013864 | 0.0 | 0.09 +Output | 0.00011396 | 0.00011396 | 0.00011396 | 0.0 | 0.01 +Modify | 0.0038245 | 0.0038245 | 0.0038245 | 0.0 | 0.24 +Other | | 0.001096 | | | 0.07 Nlocal: 1912 ave 1912 max 1912 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 1672 ave 1672 max 1672 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 23806 ave 23806 max 23806 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 47612 ave 47612 max 47612 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 47612 Ave neighs/atom = 24.9017 Neighbor list builds = 5 Dangerous builds = 0 # shear velocity upper set 1.0 0 0 velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes unfix 3 fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 fix_modify 3 temp new2d #dump 1 all atom 500 dump.meam.shear #dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 #dump_modify 2 pad 4 #dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 #dump_modify 3 pad 4 thermo 100 thermo_modify temp new2d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) reset_timestep 0 run 3000 -Memory usage per processor = 8.73384 Mbytes +Per MPI rank memory allocation (min/avg/max) = 9.964 | 9.964 | 9.964 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300.39988 -8173.6884 0 -8137.8874 4992.9811 19894.297 100 292.06374 -8177.7096 0 -8142.9021 2568.3762 19871.53 200 306.69894 -8177.1357 0 -8140.584 874.24259 20047.24 300 295.68229 -8172.9213 0 -8137.6825 -1049.0836 20091.759 400 308.99958 -8169.6355 0 -8132.8096 -1785.9335 20121.698 500 303.85723 -8163.984 0 -8127.7709 -150.56268 20183.813 600 300 -8157.7632 0 -8122.0099 1492.5742 20279.887 700 300 -8148.1328 0 -8112.3794 3506.9234 20435.302 800 300 -8139.1821 0 -8103.4288 3628.3957 20509.519 900 305.03425 -8126.7734 0 -8090.4201 5316.2206 20638.992 - 1000 304.00321 -8112.1616 0 -8075.9311 7441.9639 20767.243 - 1100 304.14051 -8096.5041 0 -8060.2573 9646.698 20888.167 - 1200 302.78461 -8080.5931 0 -8044.5079 11516.21 20995.917 - 1300 308.67046 -8061.6724 0 -8024.8857 11496.487 21130.013 - 1400 309.83019 -8046.2701 0 -8009.3452 12926.847 21247.271 - 1500 300 -8035.0322 0 -7999.2789 15346.188 21370.637 - 1600 300 -8030.6678 0 -7994.9144 14802.342 21496.446 - 1700 300 -8024.5988 0 -7988.8454 13177.445 21611.262 - 1800 300 -8023.045 0 -7987.2916 10240.041 21740.735 - 1900 300 -8028.2797 0 -7992.5263 6912.1441 21866.544 - 2000 300 -8036.4487 0 -8000.6953 3561.8365 21977.695 - 2100 300 -8037.8249 0 -8002.0715 2879.2618 22109.611 - 2200 300 -8033.6682 0 -7997.9148 4936.3695 22224.427 - 2300 304.49349 -8033.4561 0 -7997.1673 5593.0915 22356.343 - 2400 300 -8033.2969 0 -7997.5436 7537.0891 22473.601 - 2500 300 -8033.1874 0 -7997.4341 11476.447 22598.189 - 2600 307.77395 -8026.9234 0 -7990.2436 15758.81 22720.333 - 2700 300 -8021.1736 0 -7985.4203 17948.896 22832.706 - 2800 300 -8017.0863 0 -7981.3329 17154.618 22957.293 - 2900 300 -8012.0514 0 -7976.298 13224.292 23089.209 - 3000 304.58031 -8008.1654 0 -7971.8661 8572.9227 23211.354 -Loop time of 55.136 on 1 procs for 3000 steps with 1912 atoms - -Performance: 4.701 ns/day, 5.105 hours/ns, 54.411 timesteps/s -99.9% CPU use with 1 MPI tasks x no OpenMP threads + 1000 304.00321 -8112.1616 0 -8075.9311 7441.9638 20767.243 + 1100 304.14047 -8096.5041 0 -8060.2573 9646.6976 20888.167 + 1200 302.78457 -8080.5931 0 -8044.5079 11516.209 20995.917 + 1300 308.67054 -8061.6724 0 -8024.8857 11496.479 21130.013 + 1400 309.8301 -8046.27 0 -8009.3452 12926.835 21247.271 + 1500 300 -8035.0321 0 -7999.2788 15346.455 21370.637 + 1600 300 -8030.6657 0 -7994.9123 14802.869 21496.446 + 1700 300 -8024.5251 0 -7988.7718 13176.923 21611.262 + 1800 300 -8022.9963 0 -7987.243 10260.665 21741.956 + 1900 300 -8028.0522 0 -7992.2988 6955.1367 21867.765 + 2000 300 -8037.2708 0 -8001.5175 3520.3749 21987.467 + 2100 300 -8035.9945 0 -8000.2412 3237.6121 22109.611 + 2200 300 -8036.1882 0 -8000.4348 4295.1386 22223.205 + 2300 300 -8032.7689 0 -7997.0155 6231.2346 22355.121 + 2400 300 -8034.6621 0 -7998.9088 8585.3799 22468.716 + 2500 300 -8031.7774 0 -7996.0241 11627.871 22587.196 + 2600 300 -8024.032 0 -7988.2786 16254.69 22716.669 + 2700 308.64215 -8017.407 0 -7980.6237 18440.226 22835.149 + 2800 300 -8015.7348 0 -7979.9814 17601.716 22957.293 + 2900 305.82558 -8013.7448 0 -7977.2972 14123.494 23089.209 + 3000 300 -8011.0289 0 -7975.2755 9957.2884 23205.247 +Loop time of 51.9315 on 1 procs for 3000 steps with 1912 atoms + +Performance: 4.991 ns/day, 4.808 hours/ns, 57.768 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 54.317 | 54.317 | 54.317 | -nan | 98.51 -Neigh | 0.63189 | 0.63189 | 0.63189 | 0.0 | 1.15 -Comm | 0.051245 | 0.051245 | 0.051245 | 0.0 | 0.09 -Output | 0.0005548 | 0.0005548 | 0.0005548 | 0.0 | 0.00 -Modify | 0.10452 | 0.10452 | 0.10452 | 0.0 | 0.19 -Other | | 0.03128 | | | 0.06 +Pair | 50.918 | 50.918 | 50.918 | 0.0 | 98.05 +Neigh | 0.81033 | 0.81033 | 0.81033 | 0.0 | 1.56 +Comm | 0.047331 | 0.047331 | 0.047331 | 0.0 | 0.09 +Output | 0.0011976 | 0.0011976 | 0.0011976 | 0.0 | 0.00 +Modify | 0.11889 | 0.11889 | 0.11889 | 0.0 | 0.23 +Other | | 0.03606 | | | 0.07 Nlocal: 1912 ave 1912 max 1912 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 1667 ave 1667 max 1667 min +Nghost: 1672 ave 1672 max 1672 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 23365 ave 23365 max 23365 min +Neighs: 23557 ave 23557 max 23557 min Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 46730 ave 46730 max 46730 min +FullNghs: 47114 ave 47114 max 47114 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 46730 -Ave neighs/atom = 24.4404 +Total # of neighbors = 47114 +Ave neighs/atom = 24.6412 Neighbor list builds = 221 Dangerous builds = 0 -Total wall time: 0:00:56 +Total wall time: 0:00:53 diff --git a/examples/meam/log.5Oct16.meam.shear.icc.4 b/examples/meam/log.19May17.meam.shear.g++.4 similarity index 55% rename from examples/meam/log.5Oct16.meam.shear.icc.4 rename to examples/meam/log.19May17.meam.shear.g++.4 index 2f197de92..84cb94f4b 100644 --- a/examples/meam/log.5Oct16.meam.shear.icc.4 +++ b/examples/meam/log.19May17.meam.shear.g++.4 @@ -1,196 +1,207 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # 3d metal shear simulation units metal boundary s s p atom_style atomic lattice fcc 3.52 Lattice spacing in x,y,z = 3.52 3.52 3.52 region box block 0 16.0 0 10.0 0 2.828427 create_box 3 box Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) 2 by 2 by 1 MPI processor grid lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 Lattice spacing in x,y,z = 3.52 4.97803 4.97803 create_atoms 1 box Created 1912 atoms pair_style meam pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 Reading potential file library.meam with DATE: 2012-06-29 Reading potential file Ni.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 5 region lower block INF INF INF 0.9 INF INF region upper block INF INF 6.1 INF INF INF group lower region lower 264 atoms in group lower group upper region upper 264 atoms in group upper group boundary union lower upper 528 atoms in group boundary group mobile subtract all boundary 1384 atoms in group mobile set group lower type 2 264 settings made for type set group upper type 3 264 settings made for type # void #region void cylinder z 8 5 2.5 INF INF #delete_atoms region void # temp controllers compute new3d mobile temp compute new2d mobile temp/partial 0 1 1 # equilibrate velocity mobile create 300.0 5812775 temp new3d fix 1 all nve fix 2 boundary setforce 0.0 0.0 0.0 fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 fix_modify 3 temp new3d thermo 25 thermo_modify temp new3d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) timestep 0.001 run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 5 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 27 17 5 -Memory usage per processor = 7.74146 Mbytes + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.954 | 8.957 | 8.959 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 25 221.59546 -8187.6813 0 -8148.0673 9100.4509 19547.02 50 300 -8150.0685 0 -8096.4384 10317.407 19685.743 75 307.76021 -8164.6669 0 -8109.6496 6289.7138 19757.814 100 300 -8176.5141 0 -8122.884 4162.2559 19873.327 -Loop time of 0.469502 on 4 procs for 100 steps with 1912 atoms +Loop time of 0.482293 on 4 procs for 100 steps with 1912 atoms -Performance: 18.402 ns/day, 1.304 hours/ns, 212.992 timesteps/s -99.7% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 17.914 ns/day, 1.340 hours/ns, 207.343 timesteps/s +98.7% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.44052 | 0.45213 | 0.45813 | 1.0 | 96.30 -Neigh | 0.0036478 | 0.0037832 | 0.003854 | 0.1 | 0.81 -Comm | 0.0055377 | 0.011533 | 0.02316 | 6.5 | 2.46 -Output | 9.0837e-05 | 9.8228e-05 | 0.00011325 | 0.1 | 0.02 -Modify | 0.00098062 | 0.0010158 | 0.0010564 | 0.1 | 0.22 -Other | | 0.0009408 | | | 0.20 +Pair | 0.44374 | 0.45604 | 0.46922 | 1.4 | 94.56 +Neigh | 0.0047338 | 0.0049097 | 0.0051899 | 0.2 | 1.02 +Comm | 0.0054841 | 0.019044 | 0.031472 | 6.9 | 3.95 +Output | 0.00012755 | 0.00013644 | 0.00015831 | 0.0 | 0.03 +Modify | 0.0011139 | 0.0011852 | 0.0012643 | 0.2 | 0.25 +Other | | 0.0009753 | | | 0.20 Nlocal: 478 ave 492 max 465 min Histogram: 2 0 0 0 0 0 0 0 1 1 Nghost: 809 ave 822 max 795 min Histogram: 1 1 0 0 0 0 0 0 0 2 Neighs: 5916 ave 6133 max 5658 min Histogram: 1 0 0 1 0 0 0 0 1 1 FullNghs: 11832 ave 12277 max 11299 min Histogram: 1 0 0 1 0 0 0 0 1 1 Total # of neighbors = 47328 Ave neighs/atom = 24.7531 Neighbor list builds = 5 Dangerous builds = 0 # shear velocity upper set 1.0 0 0 velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes unfix 3 fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 fix_modify 3 temp new2d #dump 1 all atom 500 dump.meam.shear #dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 #dump_modify 2 pad 4 #dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 #dump_modify 3 pad 4 thermo 100 thermo_modify temp new2d -WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:474) +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) reset_timestep 0 run 3000 -Memory usage per processor = 7.78572 Mbytes +Per MPI rank memory allocation (min/avg/max) = 8.999 | 9.002 | 9.005 Mbytes Step Temp E_pair E_mol TotEng Press Volume 0 295.32113 -8176.5141 0 -8141.3183 3169.3113 19886.93 100 292.00251 -8176.5358 0 -8141.7356 -825.04802 19918.765 200 306.11682 -8176.7719 0 -8140.2895 -1370.6886 19948.877 300 300 -8172.6262 0 -8136.8729 -1735.9765 20085.714 400 306.88489 -8168.435 0 -8131.8611 -933.02058 20117.012 500 308.99003 -8166.2906 0 -8129.4658 -1049.3138 20198.256 600 304.23435 -8158.0946 0 -8121.8366 583.93595 20328.848 700 296.44479 -8149.7914 0 -8114.4618 1985.4155 20421.046 800 307.75738 -8139.1649 0 -8102.487 4319.078 20513.183 900 304.61422 -8126.9246 0 -8090.6214 6654.0963 20640.213 - 1000 300 -8113.8464 0 -8078.0931 7760.1242 20768.465 - 1100 300.17874 -8097.7469 0 -8061.9722 8438.1263 20874.731 - 1200 306.01444 -8083.3367 0 -8046.8665 10835.585 20994.432 + 1000 300 -8113.8464 0 -8078.0931 7760.1239 20768.465 + 1100 300.17873 -8097.7469 0 -8061.9722 8438.126 20874.731 + 1200 306.01441 -8083.3367 0 -8046.8665 10835.586 20994.432 1300 300 -8067.022 0 -8031.2686 11216.067 21126.348 - 1400 300 -8053.223 0 -8017.4697 10570.21 21253.378 - 1500 300 -8043.4848 0 -8007.7314 11360.829 21375.523 - 1600 300 -8034.6216 0 -7998.8683 11371.642 21498.889 - 1700 300 -8028.6774 0 -7992.924 9595.8772 21613.705 - 1800 300 -8033.0808 0 -7997.3274 8767.6261 21743.178 - 1900 303.30302 -8035.1958 0 -7999.0488 8059.5152 21859.215 - 2000 300 -8025.0857 0 -7989.3323 9308.9938 21980.138 - 2100 300 -8041.5796 0 -8005.8263 6656.0066 22108.39 - 2200 300 -8039.6315 0 -8003.8781 7532.9687 22226.87 - 2300 300 -8053.203 0 -8017.4497 8466.9094 22356.343 - 2400 300 -8050.9154 0 -8015.162 11784.136 22467.494 - 2500 300 -8037.6394 0 -8001.886 16464.786 22588.417 - 2600 300 -8030.9221 0 -7995.1688 16807.326 22719.112 - 2700 300 -8025.2102 0 -7989.4569 13729.61 22837.592 - 2800 300 -8014.5312 0 -7978.7779 6784.6283 22953.629 - 2900 300 -8007.4768 0 -7971.7234 1362.3131 23084.324 - 3000 300 -7994.5614 0 -7958.808 -1726.5273 23194.254 -Loop time of 14.8108 on 4 procs for 3000 steps with 1912 atoms - -Performance: 17.501 ns/day, 1.371 hours/ns, 202.555 timesteps/s -99.8% CPU use with 4 MPI tasks x no OpenMP threads + 1400 300 -8053.223 0 -8017.4697 10570.206 21253.378 + 1500 300 -8043.4849 0 -8007.7315 11360.766 21375.523 + 1600 300 -8034.621 0 -7998.8676 11371.584 21498.889 + 1700 300 -8028.6783 0 -7992.925 9596.524 21613.705 + 1800 300 -8033.0818 0 -7997.3285 8767.2651 21743.178 + 1900 303.18912 -8035.194 0 -7999.0606 8059.9558 21859.215 + 2000 300 -8025.0327 0 -7989.2794 9305.7521 21980.138 + 2100 300 -8041.4626 0 -8005.7092 6623.8789 22108.39 + 2200 300 -8040.3133 0 -8004.5599 7512.9368 22225.648 + 2300 300 -8055.6567 0 -8019.9033 8281.354 22344.128 + 2400 304.05922 -8050.289 0 -8014.0518 11964.826 22476.044 + 2500 305.75646 -8037.0481 0 -8000.6087 16594.032 22595.746 + 2600 307.71105 -8031.2253 0 -7994.5529 18381.745 22708.119 + 2700 307.397 -8026.5338 0 -7989.8988 13944.653 22829.042 + 2800 309.3455 -8020.2305 0 -7983.3634 7037.4046 22954.851 + 2900 301.2859 -8010.4731 0 -7974.5665 3843.8972 23072.109 + 3000 303.29908 -8000.0395 0 -7963.8929 364.90172 23207.69 +Loop time of 14.5278 on 4 procs for 3000 steps with 1912 atoms + +Performance: 17.842 ns/day, 1.345 hours/ns, 206.500 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 14.05 | 14.237 | 14.332 | 2.9 | 96.12 -Neigh | 0.1592 | 0.16414 | 0.1671 | 0.8 | 1.11 -Comm | 0.26002 | 0.35589 | 0.54696 | 18.8 | 2.40 -Output | 0.00061679 | 0.00065172 | 0.0007441 | 0.2 | 0.00 -Modify | 0.02895 | 0.030174 | 0.03104 | 0.5 | 0.20 -Other | | 0.02338 | | | 0.16 - -Nlocal: 478 ave 509 max 448 min -Histogram: 2 0 0 0 0 0 0 0 0 2 -Nghost: 799.25 ave 844 max 756 min -Histogram: 1 1 0 0 0 0 0 1 0 1 -Neighs: 5813.25 ave 6081 max 5602 min -Histogram: 2 0 0 0 0 0 1 0 0 1 -FullNghs: 11626.5 ave 12151 max 11205 min -Histogram: 1 1 0 0 0 0 1 0 0 1 - -Total # of neighbors = 46506 -Ave neighs/atom = 24.3232 -Neighbor list builds = 225 +Pair | 13.872 | 13.929 | 13.998 | 1.4 | 95.88 +Neigh | 0.20891 | 0.21114 | 0.21272 | 0.3 | 1.45 +Comm | 0.25364 | 0.32377 | 0.37706 | 8.9 | 2.23 +Output | 0.0011427 | 0.0012097 | 0.0013931 | 0.3 | 0.01 +Modify | 0.033687 | 0.033991 | 0.034694 | 0.2 | 0.23 +Other | | 0.02871 | | | 0.20 + +Nlocal: 478 ave 509 max 445 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Nghost: 804 ave 845 max 759 min +Histogram: 1 1 0 0 0 0 0 0 1 1 +Neighs: 5827 ave 6177 max 5496 min +Histogram: 1 0 0 1 0 1 0 0 0 1 +FullNghs: 11654 ave 12330 max 11039 min +Histogram: 1 0 0 1 0 1 0 0 0 1 + +Total # of neighbors = 46616 +Ave neighs/atom = 24.3808 +Neighbor list builds = 223 Dangerous builds = 0 Total wall time: 0:00:15 diff --git a/examples/meam/log.5Oct16.meam.icc.1 b/examples/meam/log.19May17.meamc.g++.1 similarity index 63% rename from examples/meam/log.5Oct16.meam.icc.1 rename to examples/meam/log.19May17.meamc.g++.1 index 200da68e0..4aa1f7bcc 100644 --- a/examples/meam/log.5Oct16.meam.icc.1 +++ b/examples/meam/log.19May17.meamc.g++.1 @@ -1,84 +1,95 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal boundary p p p atom_style atomic read_data data.meam orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) 1 by 1 by 1 MPI processor grid reading atoms ... 128 atoms -pair_style meam +pair_style meam/c pair_coeff * * library.meam Si C SiC.meam Si C Reading potential file library.meam with DATE: 2012-06-29 Reading potential file SiC.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 10 fix 1 all nve thermo 10 timestep 0.001 #dump 1 all atom 50 dump.meam #dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 2 pad 3 element Si C #dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 3 pad 3 element Si C run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.39054 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.103 | 8.103 | 8.103 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 20 1932.4467 -668.2581 0 -636.53498 -120223.52 30 1951.3652 -668.58139 0 -636.54771 -100508.4 40 2172.5974 -672.22715 0 -636.5617 -110753.34 50 2056.9149 -670.33108 0 -636.56468 -105418.07 60 1947.9564 -668.52788 0 -636.55015 -111413.04 70 1994.7712 -669.28849 0 -636.54225 -109645.76 - 80 2126.0903 -671.43755 0 -636.53557 -97475.831 - 90 2065.755 -670.4349 0 -636.52338 -95858.837 - 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.094512 on 1 procs for 100 steps with 128 atoms + 80 2126.0903 -671.43755 0 -636.53557 -97475.832 + 90 2065.7549 -670.4349 0 -636.52338 -95858.836 + 100 2051.4553 -670.20799 0 -636.53122 -107068.89 +Loop time of 0.0778153 on 1 procs for 100 steps with 128 atoms -Performance: 91.417 ns/day, 0.263 hours/ns, 1058.067 timesteps/s -99.4% CPU use with 1 MPI tasks x no OpenMP threads +Performance: 111.032 ns/day, 0.216 hours/ns, 1285.094 timesteps/s +99.5% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.091268 | 0.091268 | 0.091268 | 0.0 | 96.57 -Neigh | 0.0021861 | 0.0021861 | 0.0021861 | 0.0 | 2.31 -Comm | 0.00059438 | 0.00059438 | 0.00059438 | 0.0 | 0.63 -Output | 9.0837e-05 | 9.0837e-05 | 9.0837e-05 | 0.0 | 0.10 -Modify | 0.00024438 | 0.00024438 | 0.00024438 | 0.0 | 0.26 -Other | | 0.000128 | | | 0.14 +Pair | 0.073801 | 0.073801 | 0.073801 | 0.0 | 94.84 +Neigh | 0.0029731 | 0.0029731 | 0.0029731 | 0.0 | 3.82 +Comm | 0.00047708 | 0.00047708 | 0.00047708 | 0.0 | 0.61 +Output | 0.00015664 | 0.00015664 | 0.00015664 | 0.0 | 0.20 +Modify | 0.00025702 | 0.00025702 | 0.00025702 | 0.0 | 0.33 +Other | | 0.0001504 | | | 0.19 Nlocal: 128 ave 128 max 128 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 543 ave 543 max 543 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 1526 ave 1526 max 1526 min Histogram: 1 0 0 0 0 0 0 0 0 0 FullNghs: 3052 ave 3052 max 3052 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 3052 Ave neighs/atom = 23.8438 Neighbor list builds = 10 Dangerous builds = 10 Total wall time: 0:00:00 diff --git a/examples/meam/log.5Oct16.meam.icc.4 b/examples/meam/log.19May17.meamc.g++.4 similarity index 63% rename from examples/meam/log.5Oct16.meam.icc.4 rename to examples/meam/log.19May17.meamc.g++.4 index 51a6619e3..3701fb80d 100644 --- a/examples/meam/log.5Oct16.meam.icc.4 +++ b/examples/meam/log.19May17.meamc.g++.4 @@ -1,84 +1,95 @@ -LAMMPS (5 Oct 2016) +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task # Test of MEAM potential for SiC system units metal boundary p p p atom_style atomic read_data data.meam orthogonal box = (-6 -6 -6) to (5.97232 5.97232 5.97232) 1 by 2 by 2 MPI processor grid reading atoms ... 128 atoms -pair_style meam +pair_style meam/c pair_coeff * * library.meam Si C SiC.meam Si C Reading potential file library.meam with DATE: 2012-06-29 Reading potential file SiC.meam with DATE: 2007-06-11 neighbor 0.3 bin neigh_modify delay 10 fix 1 all nve thermo 10 timestep 0.001 #dump 1 all atom 50 dump.meam #dump 2 all image 10 image.*.jpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 2 pad 3 element Si C #dump 3 all movie 10 movie.mpg element element # axes yes 0.8 0.02 view 60 -30 #dump_modify 3 pad 3 element Si C run 100 Neighbor list info ... - 2 neighbor list requests update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 4.3 ghost atom cutoff = 4.3 - binsize = 2.15 -> bins = 6 6 6 -Memory usage per processor = 7.319 Mbytes + binsize = 2.15, bins = 6 6 6 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.024 | 8.026 | 8.027 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -636.38121 0 -636.38121 -76571.819 10 1807.8862 -666.21959 0 -636.54126 -150571.49 20 1932.4467 -668.2581 0 -636.53498 -120223.52 30 1951.3652 -668.58139 0 -636.54771 -100508.4 40 2172.5974 -672.22715 0 -636.5617 -110753.34 50 2056.9149 -670.33108 0 -636.56468 -105418.07 60 1947.9564 -668.52788 0 -636.55015 -111413.04 70 1994.7712 -669.28849 0 -636.54225 -109645.76 - 80 2126.0903 -671.43755 0 -636.53557 -97475.831 - 90 2065.755 -670.4349 0 -636.52338 -95858.837 - 100 2051.4553 -670.20799 0 -636.53122 -107068.9 -Loop time of 0.0350628 on 4 procs for 100 steps with 128 atoms + 80 2126.0903 -671.43755 0 -636.53557 -97475.832 + 90 2065.7549 -670.4349 0 -636.52338 -95858.836 + 100 2051.4553 -670.20799 0 -636.53122 -107068.89 +Loop time of 0.037066 on 4 procs for 100 steps with 128 atoms -Performance: 246.415 ns/day, 0.097 hours/ns, 2852.026 timesteps/s -98.4% CPU use with 4 MPI tasks x no OpenMP threads +Performance: 233.097 ns/day, 0.103 hours/ns, 2697.887 timesteps/s +97.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 0.030952 | 0.031776 | 0.032203 | 0.3 | 90.63 -Neigh | 0.00058937 | 0.00061423 | 0.00063896 | 0.1 | 1.75 -Comm | 0.0018125 | 0.0022421 | 0.0030777 | 1.1 | 6.39 -Output | 0.00018525 | 0.00019765 | 0.00021911 | 0.1 | 0.56 -Modify | 8.0585e-05 | 9.0539e-05 | 9.7752e-05 | 0.1 | 0.26 -Other | | 0.0001422 | | | 0.41 +Pair | 0.029985 | 0.031596 | 0.033021 | 0.8 | 85.24 +Neigh | 0.0007906 | 0.00085384 | 0.00088596 | 0.0 | 2.30 +Comm | 0.0025654 | 0.0040313 | 0.0057514 | 2.2 | 10.88 +Output | 0.00027013 | 0.00029153 | 0.00033426 | 0.0 | 0.79 +Modify | 9.5367e-05 | 0.00010639 | 0.00012016 | 0.0 | 0.29 +Other | | 0.0001866 | | | 0.50 Nlocal: 32 ave 36 max 30 min Histogram: 1 2 0 0 0 0 0 0 0 1 Nghost: 293.75 ave 305 max 285 min Histogram: 2 0 0 0 0 0 0 1 0 1 Neighs: 381.5 ave 413 max 334 min Histogram: 1 0 0 0 1 0 0 0 0 2 FullNghs: 763 ave 866 max 678 min Histogram: 1 0 1 0 0 1 0 0 0 1 Total # of neighbors = 3052 Ave neighs/atom = 23.8438 Neighbor list builds = 10 Dangerous builds = 10 Total wall time: 0:00:00 diff --git a/examples/meam/log.19May17.meamc.shear.g++.1 b/examples/meam/log.19May17.meamc.shear.g++.1 new file mode 100644 index 000000000..5eb06592d --- /dev/null +++ b/examples/meam/log.19May17.meamc.shear.g++.1 @@ -0,0 +1,207 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d metal shear simulation + +units metal +boundary s s p + +atom_style atomic +lattice fcc 3.52 +Lattice spacing in x,y,z = 3.52 3.52 3.52 +region box block 0 16.0 0 10.0 0 2.828427 +create_box 3 box +Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) + 1 by 1 by 1 MPI processor grid + +lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 +Lattice spacing in x,y,z = 3.52 4.97803 4.97803 +create_atoms 1 box +Created 1912 atoms + +pair_style meam/c +pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file Ni.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 5 + +region lower block INF INF INF 0.9 INF INF +region upper block INF INF 6.1 INF INF INF +group lower region lower +264 atoms in group lower +group upper region upper +264 atoms in group upper +group boundary union lower upper +528 atoms in group boundary +group mobile subtract all boundary +1384 atoms in group mobile + +set group lower type 2 + 264 settings made for type +set group upper type 3 + 264 settings made for type + +# void + +#region void cylinder z 8 5 2.5 INF INF +#delete_atoms region void + +# temp controllers + +compute new3d mobile temp +compute new2d mobile temp/partial 0 1 1 + +# equilibrate + +velocity mobile create 300.0 5812775 temp new3d +fix 1 all nve +fix 2 boundary setforce 0.0 0.0 0.0 + +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new3d + +thermo 25 +thermo_modify temp new3d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +timestep 0.001 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 9.788 | 9.788 | 9.788 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 + 25 222.78953 -8188.1215 0 -8148.2941 9095.9003 19547.02 + 50 300 -8149.7654 0 -8096.1353 10633.139 19684.382 + 75 304.80657 -8163.4557 0 -8108.9665 7045.4555 19759.745 + 100 300 -8173.6884 0 -8120.0584 5952.5197 19886.589 +Loop time of 1.46986 on 1 procs for 100 steps with 1912 atoms + +Performance: 5.878 ns/day, 4.083 hours/ns, 68.034 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.445 | 1.445 | 1.445 | 0.0 | 98.31 +Neigh | 0.018564 | 0.018564 | 0.018564 | 0.0 | 1.26 +Comm | 0.0012956 | 0.0012956 | 0.0012956 | 0.0 | 0.09 +Output | 0.00012612 | 0.00012612 | 0.00012612 | 0.0 | 0.01 +Modify | 0.0038197 | 0.0038197 | 0.0038197 | 0.0 | 0.26 +Other | | 0.001095 | | | 0.07 + +Nlocal: 1912 ave 1912 max 1912 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1672 ave 1672 max 1672 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 23806 ave 23806 max 23806 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 47612 ave 47612 max 47612 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 47612 +Ave neighs/atom = 24.9017 +Neighbor list builds = 5 +Dangerous builds = 0 + +# shear + +velocity upper set 1.0 0 0 +velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes + +unfix 3 +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new2d + +#dump 1 all atom 500 dump.meam.shear + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 2 pad 4 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 3 pad 4 + +thermo 100 +thermo_modify temp new2d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +reset_timestep 0 +run 3000 +Per MPI rank memory allocation (min/avg/max) = 9.964 | 9.964 | 9.964 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300.39988 -8173.6884 0 -8137.8874 4992.9799 19894.297 + 100 292.06374 -8177.7096 0 -8142.9021 2568.3756 19871.53 + 200 306.69894 -8177.1357 0 -8140.584 874.24118 20047.24 + 300 295.68216 -8172.9213 0 -8137.6825 -1049.0799 20091.759 + 400 308.99955 -8169.6355 0 -8132.8096 -1785.9554 20121.698 + 500 303.85688 -8163.9842 0 -8127.7712 -150.60892 20183.813 + 600 300 -8157.7627 0 -8122.0093 1492.8514 20279.887 + 700 300 -8148.1314 0 -8112.3781 3507.1949 20435.297 + 800 300 -8139.1805 0 -8103.4272 3628.5908 20509.519 + 900 305.03217 -8126.7741 0 -8090.421 5313.7881 20638.992 + 1000 303.7648 -8112.1574 0 -8075.9554 7433.3181 20767.243 + 1100 302.39719 -8096.1399 0 -8060.1009 9681.7685 20888.167 + 1200 304.04919 -8080.7022 0 -8044.4663 11621.974 21011.532 + 1300 303.56395 -8062.0984 0 -8025.9203 11410.793 21125.127 + 1400 309.92338 -8046.0008 0 -8009.0648 12408.158 21246.05 + 1500 300 -8034.7094 0 -7998.956 14845.312 21363.308 + 1600 300 -8028.4585 0 -7992.7051 15120.908 21489.117 + 1700 308.23904 -8015.9618 0 -7979.2265 14714.73 21612.483 + 1800 300 -8013.5458 0 -7977.7924 11955.065 21737.07 + 1900 300 -8012.2984 0 -7976.545 6667.1353 21854.329 + 2000 300 -8025.6019 0 -7989.8485 2006.6545 21981.359 + 2100 300 -8027.6823 0 -7991.9289 16.47633 22109.611 + 2200 300 -8029.6905 0 -7993.9372 -603.98293 22224.427 + 2300 300 -8033.2663 0 -7997.513 -464.68645 22351.457 + 2400 300 -8040.6863 0 -8004.9329 -640.54641 22467.494 + 2500 300 -8037.0332 0 -8001.2799 1504.2444 22587.196 + 2600 300 -8036.0909 0 -8000.3375 4190.2052 22708.119 + 2700 308.97892 -8028.5269 0 -7991.7035 5755.7418 22832.706 + 2800 305.27189 -8023.8286 0 -7987.4469 2611.7551 22962.179 + 2900 301.94251 -8017.4523 0 -7981.4675 358.11928 23078.216 + 3000 305.67682 -8009.853 0 -7973.4231 -2345.487 23197.918 +Loop time of 48.351 on 1 procs for 3000 steps with 1912 atoms + +Performance: 5.361 ns/day, 4.477 hours/ns, 62.046 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 47.356 | 47.356 | 47.356 | 0.0 | 97.94 +Neigh | 0.79977 | 0.79977 | 0.79977 | 0.0 | 1.65 +Comm | 0.043133 | 0.043133 | 0.043133 | 0.0 | 0.09 +Output | 0.0011899 | 0.0011899 | 0.0011899 | 0.0 | 0.00 +Modify | 0.11648 | 0.11648 | 0.11648 | 0.0 | 0.24 +Other | | 0.03404 | | | 0.07 + +Nlocal: 1912 ave 1912 max 1912 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 1662 ave 1662 max 1662 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 23143 ave 23143 max 23143 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 46286 ave 46286 max 46286 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 46286 +Ave neighs/atom = 24.2082 +Neighbor list builds = 220 +Dangerous builds = 0 +Total wall time: 0:00:49 diff --git a/examples/meam/log.19May17.meamc.shear.g++.4 b/examples/meam/log.19May17.meamc.shear.g++.4 new file mode 100644 index 000000000..136459a44 --- /dev/null +++ b/examples/meam/log.19May17.meamc.shear.g++.4 @@ -0,0 +1,207 @@ +LAMMPS (19 May 2017) + using 1 OpenMP thread(s) per MPI task +# 3d metal shear simulation + +units metal +boundary s s p + +atom_style atomic +lattice fcc 3.52 +Lattice spacing in x,y,z = 3.52 3.52 3.52 +region box block 0 16.0 0 10.0 0 2.828427 +create_box 3 box +Created orthogonal box = (0 0 0) to (56.32 35.2 9.95606) + 2 by 2 by 1 MPI processor grid + +lattice fcc 3.52 orient x 1 0 0 orient y 0 1 1 orient z 0 -1 1 origin 0.5 0 0 +Lattice spacing in x,y,z = 3.52 4.97803 4.97803 +create_atoms 1 box +Created 1912 atoms + +pair_style meam/c +pair_coeff * * library.meam Ni4 Ni.meam Ni4 Ni4 Ni4 +Reading potential file library.meam with DATE: 2012-06-29 +Reading potential file Ni.meam with DATE: 2007-06-11 + +neighbor 0.3 bin +neigh_modify delay 5 + +region lower block INF INF INF 0.9 INF INF +region upper block INF INF 6.1 INF INF INF +group lower region lower +264 atoms in group lower +group upper region upper +264 atoms in group upper +group boundary union lower upper +528 atoms in group boundary +group mobile subtract all boundary +1384 atoms in group mobile + +set group lower type 2 + 264 settings made for type +set group upper type 3 + 264 settings made for type + +# void + +#region void cylinder z 8 5 2.5 INF INF +#delete_atoms region void + +# temp controllers + +compute new3d mobile temp +compute new2d mobile temp/partial 0 1 1 + +# equilibrate + +velocity mobile create 300.0 5812775 temp new3d +fix 1 all nve +fix 2 boundary setforce 0.0 0.0 0.0 + +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new3d + +thermo 25 +thermo_modify temp new3d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +timestep 0.001 +run 100 +Neighbor list info ... + update every 1 steps, delay 5 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 27 17 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair meam/c, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard + (2) pair meam/c, perpetual, half/full from (1) + attributes: half, newton on + pair build: halffull/newton + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 8.954 | 8.957 | 8.959 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 300 -8232.7767 0 -8179.1466 1386.6643 19547.02 + 25 221.59546 -8187.6813 0 -8148.0673 9100.4505 19547.02 + 50 300 -8150.0685 0 -8096.4384 10317.406 19685.743 + 75 307.76021 -8164.6669 0 -8109.6496 6289.7123 19757.814 + 100 300 -8176.5141 0 -8122.884 4162.2548 19873.327 +Loop time of 0.435874 on 4 procs for 100 steps with 1912 atoms + +Performance: 19.822 ns/day, 1.211 hours/ns, 229.424 timesteps/s +98.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.4092 | 0.41563 | 0.42184 | 0.7 | 95.35 +Neigh | 0.0048575 | 0.004932 | 0.0049984 | 0.1 | 1.13 +Comm | 0.0069079 | 0.013151 | 0.019513 | 4.2 | 3.02 +Output | 0.00012398 | 0.00013405 | 0.00015688 | 0.0 | 0.03 +Modify | 0.0011275 | 0.0011509 | 0.0011735 | 0.1 | 0.26 +Other | | 0.0008795 | | | 0.20 + +Nlocal: 478 ave 492 max 465 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +Nghost: 809 ave 822 max 795 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Neighs: 5916 ave 6133 max 5658 min +Histogram: 1 0 0 1 0 0 0 0 1 1 +FullNghs: 11832 ave 12277 max 11299 min +Histogram: 1 0 0 1 0 0 0 0 1 1 + +Total # of neighbors = 47328 +Ave neighs/atom = 24.7531 +Neighbor list builds = 5 +Dangerous builds = 0 + +# shear + +velocity upper set 1.0 0 0 +velocity mobile ramp vx 0.0 1.0 y 1.4 8.6 sum yes + +unfix 3 +fix 3 mobile temp/rescale 10 300.0 300.0 10.0 1.0 +fix_modify 3 temp new2d + +#dump 1 all atom 500 dump.meam.shear + +#dump 2 all image 100 image.*.jpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 2 pad 4 + +#dump 3 all movie 100 movie.mpg type type # axes yes 0.8 0.02 view 0 0 zoom 1.5 up 0 1 0 adiam 2.0 +#dump_modify 3 pad 4 + +thermo 100 +thermo_modify temp new2d +WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:489) + +reset_timestep 0 +run 3000 +Per MPI rank memory allocation (min/avg/max) = 8.999 | 9.002 | 9.005 Mbytes +Step Temp E_pair E_mol TotEng Press Volume + 0 295.32113 -8176.5141 0 -8141.3183 3169.3102 19886.93 + 100 292.0025 -8176.5358 0 -8141.7356 -825.04852 19918.765 + 200 306.11682 -8176.7718 0 -8140.2895 -1370.6881 19948.878 + 300 300 -8172.6262 0 -8136.8729 -1735.9794 20085.715 + 400 306.88504 -8168.4351 0 -8131.8612 -933.05532 20117.008 + 500 308.99111 -8166.2909 0 -8129.466 -1049.3442 20198.267 + 600 304.22555 -8158.0946 0 -8121.8377 583.69142 20328.753 + 700 296.41606 -8149.7777 0 -8114.4515 1986.7982 20421.032 + 800 307.88628 -8139.1709 0 -8102.4776 4311.4142 20513.183 + 900 303.37209 -8126.9382 0 -8090.7829 6712.7316 20640.213 + 1000 300 -8113.7973 0 -8078.044 7630.2594 20750.143 + 1100 300.07815 -8098.1383 0 -8062.3756 8423.7063 20879.616 + 1200 300 -8083.3163 0 -8047.563 10772.917 21000.539 + 1300 300 -8066.6741 0 -8030.9208 10834.336 21128.791 + 1400 300 -8050.8799 0 -8015.1265 10842.382 21257.043 + 1500 300 -8040.3206 0 -8004.5673 11852.589 21362.087 + 1600 300 -8033.2471 0 -7997.4937 11298.745 21492.782 + 1700 300 -8030.6375 0 -7994.8842 10850.43 21610.04 + 1800 300 -8035.1631 0 -7999.4097 9985.6107 21734.628 + 1900 308.56562 -8040.1954 0 -8003.4213 9865.7107 21859.215 + 2000 300 -8030.1651 0 -7994.4117 11817.502 21980.138 + 2100 300 -8031.6147 0 -7995.8613 12791.357 22101.061 + 2200 300 -8033.7793 0 -7998.0259 13823.043 22234.198 + 2300 300 -8040.5964 0 -8004.8431 16204.549 22350.236 + 2400 309.42867 -8045.9414 0 -8009.0644 18506.386 22465.051 + 2500 300 -8054.2629 0 -8018.5095 20099.612 22593.303 + 2600 300 -8054.9562 0 -8019.2028 20036.318 22721.555 + 2700 300 -8051.4788 0 -8015.7254 16993.437 22844.921 + 2800 300 -8050.6908 0 -8014.9374 9048.5896 22964.622 + 2900 309.90783 -8044.3096 0 -8007.3754 5017.0198 23080.659 + 3000 300 -8035.8165 0 -8000.0632 2084.8999 23207.69 +Loop time of 13.4901 on 4 procs for 3000 steps with 1912 atoms + +Performance: 19.214 ns/day, 1.249 hours/ns, 222.386 timesteps/s +99.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 12.851 | 12.919 | 12.945 | 1.1 | 95.76 +Neigh | 0.20449 | 0.20777 | 0.21169 | 0.6 | 1.54 +Comm | 0.27479 | 0.30264 | 0.36667 | 6.8 | 2.24 +Output | 0.0010171 | 0.0010971 | 0.0012388 | 0.3 | 0.01 +Modify | 0.033248 | 0.033878 | 0.034567 | 0.3 | 0.25 +Other | | 0.02594 | | | 0.19 + +Nlocal: 478 ave 506 max 450 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Nghost: 790.5 ave 822 max 751 min +Histogram: 1 0 1 0 0 0 0 0 0 2 +Neighs: 5829.5 ave 6014 max 5672 min +Histogram: 2 0 0 0 0 0 0 0 1 1 +FullNghs: 11659 ave 12027 max 11320 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 46636 +Ave neighs/atom = 24.3912 +Neighbor list builds = 220 +Dangerous builds = 0 +Total wall time: 0:00:13 diff --git a/src/.gitignore b/src/.gitignore index 3bdf64a4c..ae5b3d957 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,1073 +1,1078 @@ /Makefile.package /Makefile.package.settings /MAKE/MINE /Make.py.last /lmp_* /style_*.h /*_gpu.h /*_gpu.cpp /*_intel.h /*_intel.cpp /*_kokkos.h /*_kokkos.cpp /*_omp.h /*_omp.cpp /*_tally.h /*_tally.cpp /*_rx.h /*_rx.cpp /*_ssa.h /*_ssa.cpp /kokkos.cpp /kokkos.h /kokkos_type.h /kokkos_few.h /manifold*.cpp /manifold*.h /fix_*manifold*.cpp /fix_*manifold*.h +/meam*.h +/meam*.cpp +/pair_meamc.cpp +/pair_meamc.h + /fix_qeq*.cpp /fix_qeq*.h /compute_test_nbl.cpp /compute_test_nbl.h /pair_multi_lucy.cpp /pair_multi_lucy.h /colvarproxy_lammps.cpp /colvarproxy_lammps.h /fix_colvars.cpp /fix_colvars.h /dump_molfile.cpp /dump_molfile.h /molfile_interface.cpp /molfile_interface.h /type_detector.h /intel_buffers.cpp /intel_buffers.h /intel_intrinsics.h /intel_preprocess.h /intel_simd.h /compute_sna_atom.cpp /compute_sna_atom.h /compute_snad_atom.cpp /compute_snad_atom.h /compute_snav_atom.cpp /compute_snav_atom.h /openmp_snap.h /pair_snap.cpp /pair_snap.h /sna.cpp /sna.h /atom_vec_wavepacket.cpp /atom_vec_wavepacket.h /fix_nve_awpmd.cpp /fix_nve_awpmd.h /pair_awpmd_cut.cpp /pair_awpmd_cut.h /dihedral_charmmfsw.cpp /dihedral_charmmfsw.h /pair_lj_charmmfsw_coul_charmmfsh.cpp /pair_lj_charmmfsw_coul_charmmfsh.h /pair_lj_charmmfsw_coul_long.cpp /pair_lj_charmmfsw_coul_long.h /angle_cg_cmm.cpp /angle_cg_cmm.h /angle_charmm.cpp /angle_charmm.h /angle_class2.cpp /angle_class2.h /angle_cosine.cpp /angle_cosine.h /angle_cosine_delta.cpp /angle_cosine_delta.h /angle_cosine_periodic.cpp /angle_cosine_periodic.h /angle_cosine_shift.cpp /angle_cosine_shift.h /angle_cosine_shift_exp.cpp /angle_cosine_shift_exp.h /angle_cosine_squared.cpp /angle_cosine_squared.h /angle_dipole.cpp /angle_dipole.h /angle_fourier.cpp /angle_fourier.h /angle_fourier_simple.cpp /angle_fourier_simple.h /angle_harmonic.cpp /angle_harmonic.h /angle_quartic.cpp /angle_quartic.h /angle_sdk.cpp /angle_sdk.h /angle_table.cpp /angle_table.h /atom_vec_angle.cpp /atom_vec_angle.h /atom_vec_bond.cpp /atom_vec_bond.h /atom_vec_colloid.cpp /atom_vec_colloid.h /atom_vec_dipole.cpp /atom_vec_dipole.h /atom_vec_dpd.cpp /atom_vec_dpd.h /atom_vec_electron.cpp /atom_vec_electron.h /atom_vec_ellipsoid.cpp /atom_vec_ellipsoid.h /atom_vec_full.cpp /atom_vec_full.h /atom_vec_full_hars.cpp /atom_vec_full_hars.h /atom_vec_granular.cpp /atom_vec_granular.h /atom_vec_meso.cpp /atom_vec_meso.h /atom_vec_molecular.cpp /atom_vec_molecular.h /atom_vec_peri.cpp /atom_vec_peri.h /atom_vec_template.cpp /atom_vec_template.h /body_nparticle.cpp /body_nparticle.h /bond_class2.cpp /bond_class2.h /bond_fene.cpp /bond_fene.h /bond_fene_expand.cpp /bond_fene_expand.h /bond_harmonic.cpp /bond_harmonic.h /bond_harmonic_shift.cpp /bond_harmonic_shift.h /bond_harmonic_shift_cut.cpp /bond_harmonic_shift_cut.h /bond_morse.cpp /bond_morse.h /bond_nonlinear.cpp /bond_nonlinear.h /bond_oxdna_fene.cpp /bond_oxdna_fene.h /bond_oxdna2_fene.cpp /bond_oxdna2_fene.h /bond_quartic.cpp /bond_quartic.h /bond_table.cpp /bond_table.h /cg_cmm_parms.cpp /cg_cmm_parms.h /commgrid.cpp /commgrid.h /compute_ackland_atom.cpp /compute_ackland_atom.h /compute_basal_atom.cpp /compute_basal_atom.h /compute_body_local.cpp /compute_body_local.h /compute_cnp_atom.cpp /compute_cnp_atom.h /compute_damage_atom.cpp /compute_damage_atom.h /compute_dilatation_atom.cpp /compute_dilatation_atom.h /compute_dpd.cpp /compute_dpd.h /compute_dpd_atom.cpp /compute_dpd_atom.h /compute_erotate_asphere.cpp /compute_erotate_asphere.h /compute_erotate_rigid.cpp /compute_erotate_rigid.h /compute_event_displace.cpp /compute_event_displace.h /compute_fep.cpp /compute_fep.h /compute_force_tally.cpp /compute_force_tally.h /compute_heat_flux_tally.cpp /compute_heat_flux_tally.h /compute_ke_atom_eff.cpp /compute_ke_atom_eff.h /compute_ke_eff.cpp /compute_ke_eff.h /compute_ke_rigid.cpp /compute_ke_rigid.h /compute_meso_e_atom.cpp /compute_meso_e_atom.h /compute_meso_rho_atom.cpp /compute_meso_rho_atom.h /compute_meso_t_atom.cpp /compute_meso_t_atom.h /compute_msd_nongauss.cpp /compute_msd_nongauss.h /compute_pe_tally.cpp /compute_pe_tally.h /compute_plasticity_atom.cpp /compute_plasticity_atom.h /compute_pressure_grem.cpp /compute_pressure_grem.h /compute_rigid_local.cpp /compute_rigid_local.h /compute_spec_atom.cpp /compute_spec_atom.h /compute_stress_tally.cpp /compute_stress_tally.h /compute_temp_asphere.cpp /compute_temp_asphere.h /compute_temp_body.cpp /compute_temp_body.h /compute_temp_deform_eff.cpp /compute_temp_deform_eff.h /compute_temp_eff.cpp /compute_temp_eff.h /compute_temp_region_eff.cpp /compute_temp_region_eff.h /compute_temp_rotate.cpp /compute_temp_rotate.h /compute_ti.cpp /compute_ti.h /compute_voronoi_atom.cpp /compute_voronoi_atom.h /dihedral_charmm.cpp /dihedral_charmm.h /dihedral_class2.cpp /dihedral_class2.h /dihedral_cosine_shift_exp.cpp /dihedral_cosine_shift_exp.h /dihedral_fourier.cpp /dihedral_fourier.h /dihedral_harmonic.cpp /dihedral_harmonic.h /dihedral_helix.cpp /dihedral_helix.h /dihedral_hybrid.cpp /dihedral_hybrid.h /dihedral_multi_harmonic.cpp /dihedral_multi_harmonic.h /dihedral_nharmonic.cpp /dihedral_nharmonic.h /dihedral_opls.cpp /dihedral_opls.h /dihedral_quadratic.cpp /dihedral_quadratic.h /dihedral_spherical.cpp /dihedral_spherical.h /dihedral_table.cpp /dihedral_table.h /dump_atom_gz.cpp /dump_atom_gz.h /dump_xyz_gz.cpp /dump_xyz_gz.h /dump_atom_mpiio.cpp /dump_atom_mpiio.h /dump_cfg_gz.cpp /dump_cfg_gz.h /dump_cfg_mpiio.cpp /dump_cfg_mpiio.h /dump_custom_gz.cpp /dump_custom_gz.h /dump_custom_mpiio.cpp /dump_custom_mpiio.h /dump_h5md.cpp /dump_h5md.h /dump_netcdf.cpp /dump_netcdf.h /dump_netcdf_mpiio.cpp /dump_netcdf_mpiio.h /dump_vtk.cpp /dump_vtk.h /dump_xtc.cpp /dump_xtc.h /dump_xyz_mpiio.cpp /dump_xyz_mpiio.h /ewald.cpp /ewald.h /ewald_cg.cpp /ewald_cg.h /ewald_disp.cpp /ewald_disp.h /ewald_n.cpp /ewald_n.h /fft3d.cpp /fft3d.h /fft3d_wrap.cpp /fft3d_wrap.h /fix_adapt_fep.cpp /fix_adapt_fep.h /fix_addtorque.cpp /fix_addtorque.h /fix_append_atoms.cpp /fix_append_atoms.h /fix_atc.cpp /fix_atc.h /fix_ave_correlate_long.cpp /fix_ave_correlate_long.h /fix_bond_break.cpp /fix_bond_break.h /fix_bond_create.cpp /fix_bond_create.h /fix_bond_swap.cpp /fix_bond_swap.h /fix_cmap.cpp /fix_cmap.h /fix_deposit.cpp /fix_deposit.h /fix_dpd_energy.cpp /fix_dpd_energy.h /fix_efield.cpp /fix_efield.h /fix_eos_cv.cpp /fix_eos_cv.h /fix_eos_table.cpp /fix_eos_table.h /fix_evaporate.cpp /fix_evaporate.h /fix_filter_corotate.cpp /fix_filter_corotate.h /fix_viscosity.cpp /fix_viscosity.h /fix_ehex.cpp /fix_ehex.h /fix_event.cpp /fix_event.h /fix_event_prd.cpp /fix_event_prd.h /fix_event_tad.cpp /fix_event_tad.h /fix_flow_gauss.cpp /fix_flow_gauss.h /fix_freeze.cpp /fix_freeze.h /fix_gcmc.cpp /fix_gcmc.h /fix_gld.cpp /fix_gld.h /fix_gle.cpp /fix_gle.h /fix_gpu.cpp /fix_gpu.h /fix_grem.cpp /fix_grem.h /fix_imd.cpp /fix_imd.h /fix_ipi.cpp /fix_ipi.h /fix_lambdah_calc.cpp /fix_lambdah_calc.h /fix_langevin_eff.cpp /fix_langevin_eff.h /fix_lb_fluid.cpp /fix_lb_fluid.h /fix_lb_momentum.cpp /fix_lb_momentum.h /fix_lb_pc.cpp /fix_lb_pc.h /fix_lb_rigid_pc_sphere.cpp /fix_lb_rigid_pc_sphere.h /fix_lb_viscous.cpp /fix_lb_viscous.h /fix_load_report.cpp /fix_load_report.h /fix_meso.cpp /fix_meso.h /fix_meso_stationary.cpp /fix_meso_stationary.h /fix_mscg.cpp /fix_mscg.h /fix_msst.cpp /fix_msst.h /fix_neb.cpp /fix_neb.h /fix_nh_asphere.cpp /fix_nh_asphere.h /fix_nph_asphere.cpp /fix_nph_asphere.h /fix_npt_asphere.cpp /fix_npt_asphere.h /fix_nve_asphere.cpp /fix_nve_asphere.h /fix_nve_asphere_noforce.cpp /fix_nve_asphere_noforce.h /fix_nve_dot.cpp /fix_nve_dot.h /fix_nve_dotc_langevin.cpp /fix_nve_dotc_langevin.h /fix_nh_body.cpp /fix_nh_body.h /fix_nph_body.cpp /fix_nph_body.h /fix_npt_body.cpp /fix_npt_body.h /fix_nvk.cpp /fix_nvk.h /fix_nvt_body.cpp /fix_nvt_body.h /fix_nve_body.cpp /fix_nve_body.h /fix_nvt_asphere.cpp /fix_nvt_asphere.h /fix_nh_eff.cpp /fix_nh_eff.h /fix_nph_eff.cpp /fix_nph_eff.h /fix_nphug.cpp /fix_nphug.h /fix_npt_eff.cpp /fix_npt_eff.h /fix_nve_eff.cpp /fix_nve_eff.h /fix_nve_line.cpp /fix_nve_line.h /fix_nvt_eff.cpp /fix_nvt_eff.h /fix_nvt_sllod_eff.cpp /fix_nvt_sllod_eff.h /fix_nve_tri.cpp /fix_nve_tri.h /fix_oneway.cpp /fix_oneway.h /fix_orient_bcc.cpp /fix_orient_bcc.h /fix_orient_fcc.cpp /fix_orient_fcc.h /fix_peri_neigh.cpp /fix_peri_neigh.h /fix_phonon.cpp /fix_phonon.h /fix_poems.cpp /fix_poems.h /fix_pour.cpp /fix_pour.h /fix_qeq_comb.cpp /fix_qeq_comb.h /fix_qeq_reax.cpp /fix_qeq_fire.cpp /fix_qeq_fire.h /fix_qeq_reax.h /fix_qmmm.cpp /fix_qmmm.h /fix_reax_bonds.cpp /fix_reax_bonds.h /fix_reaxc.cpp /fix_reaxc.h /fix_reaxc_bonds.cpp /fix_reaxc_bonds.h /fix_reaxc_species.cpp /fix_reaxc_species.h /fix_rigid.cpp /fix_rigid.h /fix_rigid_nh.cpp /fix_rigid_nh.h /fix_rigid_nph.cpp /fix_rigid_nph.h /fix_rigid_npt.cpp /fix_rigid_npt.h /fix_rigid_nve.cpp /fix_rigid_nve.h /fix_rigid_nvt.cpp /fix_rigid_nvt.h /fix_rigid_nh_small.cpp /fix_rigid_nh_small.h /fix_rigid_nph_small.cpp /fix_rigid_nph_small.h /fix_rigid_npt_small.cpp /fix_rigid_npt_small.h /fix_rigid_nve_small.cpp /fix_rigid_nve_small.h /fix_rigid_nvt_small.cpp /fix_rigid_nvt_small.h /fix_rigid_small.cpp /fix_rigid_small.h /fix_shake.cpp /fix_shake.h /fix_shardlow.cpp /fix_shardlow.h /fix_smd.cpp /fix_smd.h /fix_species.cpp /fix_species.h /fix_spring_pull.cpp /fix_spring_pull.h /fix_srd.cpp /fix_srd.h /fix_temp_rescale_eff.cpp /fix_temp_rescale_eff.h /fix_thermal_conductivity.cpp /fix_thermal_conductivity.h /fix_ti_rs.cpp /fix_ti_rs.h /fix_ti_spring.cpp /fix_ti_spring.h /fix_ttm.cpp /fix_ttm.h /fix_tune_kspace.cpp /fix_tune_kspace.h /fix_wall_colloid.cpp /fix_wall_colloid.h /fix_wall_gran.cpp /fix_wall_gran.h /fix_wall_gran_region.cpp /fix_wall_gran_region.h /fix_wall_piston.cpp /fix_wall_piston.h /fix_wall_srd.cpp /fix_wall_srd.h /gpu_extra.h /gridcomm.cpp /gridcomm.h /group_ndx.cpp /group_ndx.h /ndx_group.cpp /ndx_group.h /improper_class2.cpp /improper_class2.h /improper_cossq.cpp /improper_cossq.h /improper_cvff.cpp /improper_cvff.h /improper_distance.cpp /improper_distance.h /improper_fourier.cpp /improper_fourier.h /improper_harmonic.cpp /improper_harmonic.h /improper_hybrid.cpp /improper_hybrid.h /improper_ring.cpp /improper_ring.h /improper_umbrella.cpp /improper_umbrella.h /kissfft.h /lj_sdk_common.h /math_complex.h /math_vector.h /mgpt_*.cpp /mgpt_*.h /msm.cpp /msm.h /msm_cg.cpp /msm_cg.h /neb.cpp /neb.h /pair_adp.cpp /pair_adp.h /pair_agni.cpp /pair_agni.h /pair_airebo.cpp /pair_airebo.h /pair_airebo_morse.cpp /pair_airebo_morse.h /pair_body.cpp /pair_body.h /pair_bop.cpp /pair_bop.h /pair_born_coul_long.cpp /pair_born_coul_long.h /pair_born_coul_msm.cpp /pair_born_coul_msm.h /pair_brownian.cpp /pair_brownian.h /pair_brownian_poly.cpp /pair_brownian_poly.h /pair_buck_coul_long.cpp /pair_buck_coul_long.h /pair_buck_coul_msm.cpp /pair_buck_coul_msm.h /pair_buck_coul.cpp /pair_buck_coul.h /pair_buck_long_coul_long.cpp /pair_buck_long_coul_long.h /pair_cdeam.cpp /pair_cdeam.h /pair_cg_cmm.cpp /pair_cg_cmm.h /pair_cg_cmm_coul_cut.cpp /pair_cg_cmm_coul_cut.h /pair_cg_cmm_coul_long.cpp /pair_cg_cmm_coul_long.h /pair_cmm_common.cpp /pair_cmm_common.h /pair_cg_cmm_coul_msm.cpp /pair_cg_cmm_coul_msm.h /pair_comb.cpp /pair_comb.h /pair_comb3.cpp /pair_comb3.h /pair_colloid.cpp /pair_colloid.h /pair_coul_diel.cpp /pair_coul_diel.h /pair_coul_long.cpp /pair_coul_long.h /pair_coul_msm.cpp /pair_coul_msm.h /pair_dipole_cut.cpp /pair_dipole_cut.h /pair_dipole_sf.cpp /pair_dipole_sf.h /pair_dpd_mt.cpp /pair_dpd_mt.h /pair_dsmc.cpp /pair_dsmc.h /pair_eam.cpp /pair_eam.h /pair_eam_opt.cpp /pair_eam_opt.h /pair_eam_alloy.cpp /pair_eam_alloy.h /pair_eam_alloy_opt.cpp /pair_eam_alloy_opt.h /pair_eam_fs.cpp /pair_eam_fs.h /pair_eam_fs_opt.cpp /pair_eam_fs_opt.h /pair_edip.cpp /pair_edip.h /pair_edip_multi.cpp /pair_edip_multi.h /pair_eff_cut.cpp /pair_eff_cut.h /pair_eff_inline.h /pair_eim.cpp /pair_eim.h /pair_gauss_cut.cpp /pair_gauss_cut.h /pair_gayberne.cpp /pair_gayberne.h /pair_gran_easy.cpp /pair_gran_easy.h /pair_gran_hertz_history.cpp /pair_gran_hertz_history.h /pair_gran_hooke.cpp /pair_gran_hooke.h /pair_gran_hooke_history.cpp /pair_gran_hooke_history.h /pair_gw.cpp /pair_gw.h /pair_gw_zbl.cpp /pair_gw_zbl.h /pair_hbond_dreiding_lj.cpp /pair_hbond_dreiding_lj.h /pair_hbond_dreiding_morse.cpp /pair_hbond_dreiding_morse.h /pair_kolmogorov_crespi_z.cpp /pair_kolmogorov_crespi_z.h /pair_lcbop.cpp /pair_lcbop.h /pair_line_lj.cpp /pair_line_lj.h /pair_list.cpp /pair_list.h /pair_lj_charmm_coul_charmm.cpp /pair_lj_charmm_coul_charmm.h /pair_lj_charmm_coul_charmm_implicit.cpp /pair_lj_charmm_coul_charmm_implicit.h /pair_lj_charmm_coul_long.cpp /pair_lj_charmm_coul_long.h /pair_lj_charmm_coul_long_opt.cpp /pair_lj_charmm_coul_long_opt.h /pair_lj_charmm_coul_long_soft.cpp /pair_lj_charmm_coul_long_soft.h /pair_lj_charmm_coul_msm.cpp /pair_lj_charmm_coul_msm.h /pair_lj_class2.cpp /pair_lj_class2.h /pair_lj_class2_coul_cut.cpp /pair_lj_class2_coul_cut.h /pair_lj_class2_coul_long.cpp /pair_lj_class2_coul_long.h /pair_lj_coul.cpp /pair_lj_coul.h /pair_coul_cut_soft.cpp /pair_coul_cut_soft.h /pair_coul_long_soft.cpp /pair_coul_long_soft.h /pair_lj_cut_coul_cut_soft.cpp /pair_lj_cut_coul_cut_soft.h /pair_lj_cut_tip4p_cut.cpp /pair_lj_cut_tip4p_cut.h /pair_lj_cut_coul_long.cpp /pair_lj_cut_coul_long.h /pair_lj_cut_coul_long_opt.cpp /pair_lj_cut_coul_long_opt.h /pair_lj_cut_coul_long_soft.cpp /pair_lj_cut_coul_long_soft.h /pair_lj_cut_coul_msm.cpp /pair_lj_cut_coul_msm.h /pair_lj_cut_dipole_cut.cpp /pair_lj_cut_dipole_cut.h /pair_lj_cut_dipole_long.cpp /pair_lj_cut_dipole_long.h /pair_lj_cut_*hars_*.cpp /pair_lj_cut_*hars_*.h /pair_lj_cut_soft.cpp /pair_lj_cut_soft.h /pair_lj_cut_tip4p_long.cpp /pair_lj_cut_tip4p_long.h /pair_lj_cut_tip4p_long_opt.cpp /pair_lj_cut_tip4p_long_opt.h /pair_lj_cut_tip4p_long_soft.cpp /pair_lj_cut_tip4p_long_soft.h /pair_lj_long_coul_long.cpp /pair_lj_long_coul_long.h /pair_lj_long_coul_long_opt.cpp /pair_lj_long_coul_long_opt.h /pair_lj_long_dipole_long.cpp /pair_lj_long_dipole_long.h /pair_lj_long_tip4p_long.cpp /pair_lj_long_tip4p_long.h /pair_lj_cut_opt.cpp /pair_lj_cut_opt.h /pair_lj_cut_tgpu.cpp /pair_lj_cut_tgpu.h /pair_lj_sdk.cpp /pair_lj_sdk.h /pair_lj_sdk_coul_long.cpp /pair_lj_sdk_coul_long.h /pair_lj_sdk_coul_msm.cpp /pair_lj_sdk_coul_msm.h /pair_lj_sf_dipole_sf.cpp /pair_lj_sf_dipole_sf.h /pair_lubricateU.cpp /pair_lubricateU.h /pair_lubricateU_poly.cpp /pair_lubricateU_poly.h /pair_lubricate_poly.cpp /pair_lubricate_poly.h /pair_lubricate.cpp /pair_lubricate.h /pair_meam.cpp /pair_meam.h /pair_meam_spline.cpp /pair_meam_spline.h /pair_meam_sw_spline.cpp /pair_meam_sw_spline.h /pair_morse_opt.cpp /pair_morse_opt.h /pair_morse_soft.cpp /pair_morse_soft.h /pair_nb3b_harmonic.cpp /pair_nb3b_harmonic.h /pair_nm_cut.cpp /pair_nm_cut.h /pair_nm_cut_coul_cut.cpp /pair_nm_cut_coul_cut.h /pair_nm_cut_coul_long.cpp /pair_nm_cut_coul_long.h /pair_oxdna_*.cpp /pair_oxdna_*.h /pair_oxdna2_*.cpp /pair_oxdna2_*.h /mf_oxdna.h /pair_peri_eps.cpp /pair_peri_eps.h /pair_peri_lps.cpp /pair_peri_lps.h /pair_peri_pmb.cpp /pair_peri_pmb.h /pair_peri_ves.cpp /pair_peri_ves.h /pair_reax.cpp /pair_reax.h /pair_reax_fortran.h /pair_reaxc.cpp /pair_reaxc.h /pair_rebo.cpp /pair_rebo.h /pair_resquared.cpp /pair_resquared.h /pair_sph_heatconduction.cpp /pair_sph_heatconduction.h /pair_sph_idealgas.cpp /pair_sph_idealgas.h /pair_sph_lj.cpp /pair_sph_lj.h /pair_sph_rhosum.cpp /pair_sph_rhosum.h /pair_sph_taitwater.cpp /pair_sph_taitwater.h /pair_sph_taitwater_morris.cpp /pair_sph_taitwater_morris.h /pair_sw.cpp /pair_sw.h /pair_tersoff.cpp /pair_tersoff.h /pair_tersoff_mod.cpp /pair_tersoff_mod.h /pair_tersoff_mod_c.cpp /pair_tersoff_mod_c.h /pair_tersoff_table.cpp /pair_tersoff_table.h /pair_tersoff_zbl.cpp /pair_tersoff_zbl.h /pair_tip4p_cut.cpp /pair_tip4p_cut.h /pair_tip4p_long.cpp /pair_tip4p_long.h /pair_tip4p_long_soft.cpp /pair_tip4p_long_soft.h /pair_tri_lj.cpp /pair_tri_lj.h /pair_yukawa_colloid.cpp /pair_yukawa_colloid.h /pair_momb.cpp /pair_momb.h /pppm.cpp /pppm.h /pppm_cg.cpp /pppm_cg.h /pppm_disp.cpp /pppm_disp.h /pppm_disp_tip4p.cpp /pppm_disp_tip4p.h /pppm_old.cpp /pppm_old.h /pppm_proxy.cpp /pppm_proxy.h /pppm_stagger.cpp /pppm_stagger.h /pppm_tip4p.cpp /pppm_tip4p.h /pppm_tip4p_proxy.cpp /pppm_tip4p_proxy.h /pppm_tip4p_cg.cpp /pppm_tip4p_cg.h /prd.cpp /prd.h /python_impl.cpp /python_impl.h /python_compat.h /fix_python.cpp /fix_python.h /pair_python.cpp /pair_python.h /reader_molfile.cpp /reader_molfile.h /reaxc_allocate.cpp /reaxc_allocate.h /reaxc_basic_comm.cpp /reaxc_basic_comm.h /reaxc_bond_orders.cpp /reaxc_bond_orders.h /reaxc_bonds.cpp /reaxc_bonds.h /reaxc_control.cpp /reaxc_control.h /reaxc_defs.h /reaxc_ffield.cpp /reaxc_ffield.h /reaxc_forces.cpp /reaxc_forces.h /reaxc_hydrogen_bonds.cpp /reaxc_hydrogen_bonds.h /reaxc_init_md.cpp /reaxc_init_md.h /reaxc_io_tools.cpp /reaxc_io_tools.h /reaxc_list.cpp /reaxc_list.h /reaxc_lookup.cpp /reaxc_lookup.h /reaxc_multi_body.cpp /reaxc_multi_body.h /reaxc_nonbonded.cpp /reaxc_nonbonded.h /reaxc_reset_tools.cpp /reaxc_reset_tools.h /reaxc_system_props.cpp /reaxc_system_props.h /reaxc_tool_box.cpp /reaxc_tool_box.h /reaxc_torsion_angles.cpp /reaxc_torsion_angles.h /reaxc_traj.cpp /reaxc_traj.h /reaxc_types.h /reaxc_valence_angles.cpp /reaxc_valence_angles.h /reaxc_vector.cpp /reaxc_vector.h /remap.cpp /remap.h /remap_wrap.cpp /remap_wrap.h /restart_mpiio.cpp /restart_mpiio.h /smd_kernels.h /smd_material_models.cpp /smd_material_models.h /smd_math.h /tad.cpp /tad.h /temper.cpp /temper.h /temper_grem.cpp /temper_grem.h /thr_data.cpp /thr_data.h /verlet_split.cpp /verlet_split.h /write_dump.cpp /write_dump.h /xdr_compat.cpp /xdr_compat.h /atom_vec_smd.cpp /atom_vec_smd.h /compute_saed.cpp /compute_saed.h /compute_saed_consts.h /compute_smd_contact_radius.cpp /compute_smd_contact_radius.h /compute_smd_damage.cpp /compute_smd_damage.h /compute_smd_hourglass_error.cpp /compute_smd_hourglass_error.h /compute_smd_internal_energy.cpp /compute_smd_internal_energy.h /compute_smd_plastic_strain.cpp /compute_smd_plastic_strain.h /compute_smd_plastic_strain_rate.cpp /compute_smd_plastic_strain_rate.h /compute_smd_rho.cpp /compute_smd_rho.h /compute_smd_tlsph_defgrad.cpp /compute_smd_tlsph_defgrad.h /compute_smd_tlsph_dt.cpp /compute_smd_tlsph_dt.h /compute_smd_tlsph_num_neighs.cpp /compute_smd_tlsph_num_neighs.h /compute_smd_tlsph_shape.cpp /compute_smd_tlsph_shape.h /compute_smd_tlsph_strain.cpp /compute_smd_tlsph_strain.h /compute_smd_tlsph_strain_rate.cpp /compute_smd_tlsph_strain_rate.h /compute_smd_tlsph_stress.cpp /compute_smd_tlsph_stress.h /compute_smd_triangle_mesh_vertices.cpp /compute_smd_triangle_mesh_vertices.h /compute_smd_ulsph_effm.cpp /compute_smd_ulsph_effm.h /compute_smd_ulsph_num_neighs.cpp /compute_smd_ulsph_num_neighs.h /compute_smd_ulsph_strain.cpp /compute_smd_ulsph_strain.h /compute_smd_ulsph_strain_rate.cpp /compute_smd_ulsph_strain_rate.h /compute_smd_ulsph_stress.cpp /compute_smd_ulsph_stress.h /compute_smd_vol.cpp /compute_smd_vol.h /compute_temp_cs.cpp /compute_temp_cs.h /compute_temp_drude.cpp /compute_temp_drude.h /compute_xrd.cpp /compute_xrd.h /compute_xrd_consts.h /fix_atom_swap.cpp /fix_atom_swap.h /fix_ave_spatial_sphere.cpp /fix_ave_spatial_sphere.h /fix_drude.cpp /fix_drude.h /fix_drude_transform.cpp /fix_drude_transform.h /fix_langevin_drude.cpp /fix_langevin_drude.h /fix_pimd.cpp /fix_pimd.h /fix_qbmsst.cpp /fix_qbmsst.h /fix_qtb.cpp /fix_qtb.h /fix_rattle.cpp /fix_rattle.h /fix_saed_vtk.cpp /fix_saed_vtk.h /fix_smd_adjust_dt.cpp /fix_smd_adjust_dt.h /fix_smd_integrate_tlsph.cpp /fix_smd_integrate_tlsph.h /fix_smd_integrate_ulsph.cpp /fix_smd_integrate_ulsph.h /fix_smd_move_triangulated_surface.cpp /fix_smd_move_triangulated_surface.h /fix_smd_setvel.cpp /fix_smd_setvel.h /fix_smd_tlsph_reference_configuration.cpp /fix_smd_tlsph_reference_configuration.h /fix_smd_wall_surface.cpp /fix_smd_wall_surface.h /fix_srp.cpp /fix_srp.h /fix_tfmc.cpp /fix_tfmc.h /fix_ttm_mod.cpp /fix_ttm_mod.h /pair_born_coul_long_cs.cpp /pair_born_coul_long_cs.h /pair_born_coul_dsf_cs.cpp /pair_born_coul_dsf_cs.h /pair_buck_coul_long_cs.cpp /pair_buck_coul_long_cs.h /pair_coul_long_cs.cpp /pair_coul_long_cs.h /pair_lj_cut_thole_long.cpp /pair_lj_cut_thole_long.h /pair_plum_hb.cpp /pair_plum_hb.h /pair_plum_hp.cpp /pair_plum_hp.h /pair_polymorphic.cpp /pair_polymorphic.h /pair_smd_hertz.cpp /pair_smd_hertz.h /pair_smd_tlsph.cpp /pair_smd_tlsph.h /pair_smd_triangulated_surface.cpp /pair_smd_triangulated_surface.h /pair_smd_ulsph.cpp /pair_smd_ulsph.h /pair_srp.cpp /pair_srp.h /pair_thole.cpp /pair_thole.h /pair_buck_mdf.cpp /pair_buck_mdf.h /pair_dpd_conservative.cpp /pair_dpd_conservative.h /pair_dpd_fdt.cpp /pair_dpd_fdt.h /pair_dpd_fdt_energy.cpp /pair_dpd_fdt_energy.h /pair_lennard_mdf.cpp /pair_lennard_mdf.h /pair_lj_cut_coul_long_cs.cpp /pair_lj_cut_coul_long_cs.h /pair_lj_mdf.cpp /pair_lj_mdf.h /pair_mgpt.cpp /pair_mgpt.h /pair_morse_smooth_linear.cpp /pair_morse_smooth_linear.h /pair_smtbq.cpp /pair_smtbq.h /pair_vashishta*.cpp /pair_vashishta*.h diff --git a/src/Makefile b/src/Makefile index 92a430a74..c7b20dcb1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,383 +1,383 @@ # LAMMPS multiple-machine -*- Makefile -*- SHELL = /bin/bash PYTHON = python #.IGNORE: # Definitions ROOT = lmp EXE = lmp_$@ ARLIB = liblammps_$@.a SHLIB = liblammps_$@.so ARLINK = liblammps.a SHLINK = liblammps.so OBJDIR = Obj_$@ OBJSHDIR = Obj_shared_$@ SRC = $(wildcard *.cpp) INC = $(wildcard *.h) OBJ = $(SRC:.cpp=.o) SRCLIB = $(filter-out main.cpp,$(SRC)) OBJLIB = $(filter-out main.o,$(OBJ)) # Command-line options for mode: exe (default), shexe, lib, shlib mode = exe objdir = $(OBJDIR) ifeq ($(mode),shexe) objdir = $(OBJSHDIR) endif ifeq ($(mode),lib) objdir = $(OBJDIR) endif ifeq ($(mode),shlib) objdir = $(OBJSHDIR) endif # Package variables # PACKAGE = standard packages # PACKUSER = user packagse # PACKLIB = all packages that require an additional lib # should be PACKSYS + PACKINT + PACKEXT # PACKSYS = subset that reqiure a common system library # include MPIIO and LB b/c require full MPI, not just STUBS # PACKINT = subset that require an internal (provided) library # PACKEXT = subset that require an external (downloaded) library PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \ granular kim kokkos kspace manybody mc meam misc molecule \ mpiio mscg opt peri poems \ python qeq reax replica rigid shock snap srd voronoi PACKUSER = user-atc user-awpmd user-cgdna user-cgsdk user-colvars \ user-diffraction user-dpd user-drude user-eff user-fep user-h5md \ - user-intel user-lb user-manifold user-mgpt user-misc user-molfile \ + user-intel user-lb user-manifold user-meamc user-mgpt user-misc user-molfile \ user-netcdf user-omp user-phonon user-qmmm user-qtb \ user-quip user-reaxc user-smd user-smtbq user-sph user-tally \ user-vtk PACKLIB = compress gpu kim kokkos meam mpiio mscg poems \ python reax voronoi \ user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \ user-netcdf user-qmmm user-quip user-smd user-vtk PACKSYS = compress mpiio python user-lb PACKINT = gpu kokkos meam poems reax user-atc user-awpmd user-colvars PACKEXT = kim mscg voronoi \ user-h5md user-molfile user-netcdf user-qmmm user-quip \ user-smd user-vtk PACKALL = $(PACKAGE) $(PACKUSER) PACKAGEUC = $(shell echo $(PACKAGE) | tr a-z A-Z) PACKUSERUC = $(shell echo $(PACKUSER) | tr a-z A-Z) YESDIR = $(shell echo $(@:yes-%=%) | tr a-z A-Z) NODIR = $(shell echo $(@:no-%=%) | tr a-z A-Z) LIBDIR = $(shell echo $(@:lib-%=%)) LIBUSERDIR = $(shell echo $(@:lib-user-%=%)) # List of all targets help: @echo '' @echo 'make clean-all delete all object files' @echo 'make clean-machine delete object files for one machine' @echo 'make mpi-stubs build dummy MPI library in STUBS' @echo 'make install-python install LAMMPS wrapper in Python' @echo 'make tar create lmp_src.tar.gz for src dir and packages' @echo '' @echo 'make package list available packages and their dependencies' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @echo 'make yes-all install all pgks in src dir' @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-std) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' @echo 'make yes-lib install all pkgs with libs (included or ext)' @echo 'make no-lib remove all pkgs with libs (included or ext)' @echo 'make yes-ext install all pkgs with external libs' @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with updated package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package files' @echo '' @echo 'make lib-package download/build/install a package library' @echo 'make purge purge obsolete copies of source files' @echo '' @echo 'make machine build LAMMPS for machine' @echo 'make mode=lib machine build LAMMPS as static lib for machine' @echo 'make mode=shlib machine build LAMMPS as shared lib for machine' @echo 'make mode=shexe machine build LAMMPS as shared exe for machine' @echo 'make makelist create Makefile.list used by old makes' @echo 'make -f Makefile.list machine build LAMMPS for machine (old)' @echo '' @echo 'machine is one of these from src/MAKE:' @echo '' @files="`ls MAKE/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/OPTIONS:' @echo '' @files="`ls MAKE/OPTIONS/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/MACHINES:' @echo '' @files="`ls MAKE/MACHINES/Makefile.*`"; \ for file in $$files; do head -1 $$file; done @echo '' @echo '... or one of these from src/MAKE/MINE:' @echo '' @files="`ls MAKE/MINE/Makefile.* 2>/dev/null`"; \ for file in $$files; do head -1 $$file; done @echo '' # Build LAMMPS in one of 4 modes # exe = exe with static compile in Obj_machine (default) # shexe = exe with shared compile in Obj_shared_machine # lib = static lib in Obj_machine # shlib = shared lib in Obj_shared_machine .DEFAULT: @if [ $@ = "serial" -a ! -f STUBS/libmpi_stubs.a ]; \ then $(MAKE) mpi-stubs; fi @test -f MAKE/Makefile.$@ -o -f MAKE/OPTIONS/Makefile.$@ -o \ -f MAKE/MACHINES/Makefile.$@ -o -f MAKE/MINE/Makefile.$@ @if [ ! -d $(objdir) ]; then mkdir $(objdir); fi @$(SHELL) Make.sh style @if [ -f MAKE/MACHINES/Makefile.$@ ]; \ then cp MAKE/MACHINES/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/OPTIONS/Makefile.$@ ]; \ then cp MAKE/OPTIONS/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/Makefile.$@ ]; \ then cp MAKE/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/MINE/Makefile.$@ ]; \ then cp MAKE/MINE/Makefile.$@ $(objdir)/Makefile; fi @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @if [ ! -e Makefile.package.settings ]; \ then cp Makefile.package.settings.empty Makefile.package.settings; fi @cp Makefile.package Makefile.package.settings $(objdir) @cd $(objdir); rm -f .depend; \ $(MAKE) $(MFLAGS) "SRC = $(SRC)" "INC = $(INC)" depend || : ifeq ($(mode),exe) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "SHFLAGS =" \ "EXE = ../$(EXE)" ../$(EXE) endif ifeq ($(mode),shexe) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" \ "EXE = ../$(EXE)" ../$(EXE) endif ifeq ($(mode),lib) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" "SHFLAGS =" \ "EXE = ../$(ARLIB)" lib @rm -f $(ARLINK) @ln -s $(ARLIB) $(ARLINK) endif ifeq ($(mode),shlib) @cd $(objdir); \ $(MAKE) $(MFLAGS) "OBJ = $(OBJLIB)" "INC = $(INC)" \ "EXE = ../$(SHLIB)" shlib @rm -f $(SHLINK) @ln -s $(SHLIB) $(SHLINK) endif # Remove machine-specific object files clean: @echo 'make clean-all delete all object files' @echo 'make clean-machine delete object files for one machine' clean-all: rm -rf Obj_* clean-%: rm -rf Obj_$(@:clean-%=%) Obj_shared_$(@:clean-%=%) # Create Makefile.list makelist: @$(SHELL) Make.sh style @$(SHELL) Make.sh Makefile.list # Make MPI STUBS library mpi-stubs: @cd STUBS; $(MAKE) clean; $(MAKE) # install LAMMPS shared lib and Python wrapper for Python usage # include python package settings to # automatically adapt name of python interpreter sinclude ../lib/python/Makefile.lammps install-python: @$(PYTHON) ../python/install.py # Create a tarball of src dir and packages tar: @cd STUBS; $(MAKE) clean @cd ..; tar cvzf src/$(ROOT)_src.tar.gz \ src/Make* src/Package.sh src/Depend.sh src/Install.sh \ src/MAKE src/DEPEND src/*.cpp src/*.h src/STUBS \ $(patsubst %,src/%,$(PACKAGEUC)) $(patsubst %,src/%,$(PACKUSERUC)) \ --exclude=*/.svn @cd STUBS; $(MAKE) @echo "Created $(ROOT)_src.tar.gz" # Package management package: @echo 'Standard packages:' $(PACKAGE) @echo '' @echo 'User-contributed packages:' $(PACKUSER) @echo '' @echo 'Packages that need system libraries:' $(PACKSYS) @echo '' @echo 'Packages that need provided libraries:' $(PACKINT) @echo '' @echo 'Packages that need external libraries:' $(PACKEXT) @echo '' @echo 'make package list available packages' @echo 'make package list available packages' @echo 'make package-status (ps) status of all packages' @echo 'make yes-package install a single pgk in src dir' @echo 'make no-package remove a single pkg from src dir' @echo 'make yes-all install all pgks in src dir' @echo 'make no-all remove all pkgs from src dir' @echo 'make yes-standard (yes-std) install all standard pkgs' @echo 'make no-standard (no-srd) remove all standard pkgs' @echo 'make yes-user install all user pkgs' @echo 'make no-user remove all user pkgs' @echo 'make yes-lib install all pkgs with libs (included or ext)' @echo 'make no-lib remove all pkgs with libs (included or ext)' @echo 'make yes-ext install all pkgs with external libs' @echo 'make no-ext remove all pkgs with external libs' @echo '' @echo 'make package-update (pu) replace src files with package files' @echo 'make package-overwrite replace package files with src files' @echo 'make package-diff (pd) diff src files against package file' @echo '' @echo 'make lib-package build and/or download a package library' yes-all: @for p in $(PACKALL); do $(MAKE) yes-$$p; done no-all: @for p in $(PACKALL); do $(MAKE) no-$$p; done yes-standard yes-std: @for p in $(PACKAGE); do $(MAKE) yes-$$p; done no-standard no-std: @for p in $(PACKAGE); do $(MAKE) no-$$p; done yes-user: @for p in $(PACKUSER); do $(MAKE) yes-$$p; done no-user: @for p in $(PACKUSER); do $(MAKE) no-$$p; done yes-lib: @for p in $(PACKLIB); do $(MAKE) yes-$$p; done no-lib: @for p in $(PACKLIB); do $(MAKE) no-$$p; done yes-ext: @for p in $(PACKEXT); do $(MAKE) yes-$$p; done no-ext: @for p in $(PACKEXT); do $(MAKE) no-$$p; done yes-%: @if [ ! -e Makefile.package ]; \ then cp Makefile.package.empty Makefile.package; fi @if [ ! -e Makefile.package.settings ]; \ then cp Makefile.package.settings.empty Makefile.package.settings; fi @if [ ! -e $(YESDIR) ]; then \ echo "Package $(@:yes-%=%) does not exist"; \ elif [ -e $(YESDIR)/Install.sh ]; then \ echo "Installing package $(@:yes-%=%)"; \ cd $(YESDIR); $(SHELL) Install.sh 1; cd ..; \ $(SHELL) Depend.sh $(YESDIR) 1; \ else \ echo "Installing package $(@:yes-%=%)"; \ cd $(YESDIR); $(SHELL) ../Install.sh 1; cd ..; \ $(SHELL) Depend.sh $(YESDIR) 1; \ fi; no-%: @if [ ! -e $(NODIR) ]; then \ echo "Package $(@:no-%=%) does not exist"; \ elif [ -e $(NODIR)/Install.sh ]; then \ echo "Uninstalling package $(@:no-%=%)"; \ cd $(NODIR); $(SHELL) Install.sh 0; cd ..; \ $(SHELL) Depend.sh $(NODIR) 0; \ else \ echo "Uninstalling package $(@:no-%=%)"; \ cd $(NODIR); $(SHELL) ../Install.sh 0; cd ..; \ $(SHELL) Depend.sh $(NODIR) 0; \ fi; # download/build/install a package library lib-%: @if [ -e ../lib/$(LIBDIR)/Install.py ]; then \ echo "Installing lib $(@:lib-%=%)"; \ cd ../lib/$(LIBDIR); python Install.py $(args); \ elif [ -e ../lib/$(LIBUSERDIR)/Install.py ]; then \ echo "Installing lib $(@:lib-user-%=%)"; \ cd ../lib/$(LIBUSERDIR); python Install.py $(args); \ else \ echo "Install script for lib $(@:lib-%=%) does not exist"; \ fi; # status = list src files that differ from package files # update = replace src files with newer package files # overwrite = overwrite package files with newer src files # diff = show differences between src and package files # purge = delete obsolete and auto-generated package files package-status ps: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p status; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p status; done package-update pu: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p update; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p update; done package-overwrite: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p overwrite; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p overwrite; done package-diff pd: @for p in $(PACKAGEUC); do $(SHELL) Package.sh $$p diff; done @echo '' @for p in $(PACKUSERUC); do $(SHELL) Package.sh $$p diff; done purge: Purge.list @echo 'Purging obsolete and auto-generated source files' @for f in `grep -v '#' Purge.list` ; \ do test -f $$f && rm $$f && echo $$f || : ; \ done diff --git a/src/USER-MEAMC/README b/src/USER-MEAMC/README new file mode 100644 index 000000000..c1faf7c0c --- /dev/null +++ b/src/USER-MEAMC/README @@ -0,0 +1,26 @@ +This package implements the MEAM/C potential as a LAMMPS pair style. + +============================================================================== + +This package is a translation of the MEAM package to native C++. See +that package as well as the Fortran code distributed in lib/meam for +the original sources and information. + + +Translation by + Sebastian Hütter, sebastian.huetter@ovgu.de + Institute of Materials and Joining Technology + Otto-von-Guericke University Magdeburg, Germany + +The original Fortran implementation was created by + Greg Wagner (while at Sandia, now at Northwestern U). + +============================================================================== + +Use "make yes-user-meamc" to enable this package when building LAMMPS. + +In your LAMMPS input script, specifiy + pair_style meam/c +to enable the use of this implementation. All parameters, input files and +outputs are exactly identical to these used with pair_style meam. + diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h new file mode 100644 index 000000000..944b3fdf2 --- /dev/null +++ b/src/USER-MEAMC/meam.h @@ -0,0 +1,252 @@ +#ifndef LMP_MEAM_H +#define LMP_MEAM_H + +#include "memory.h" +#include +#include + +#define maxelt 5 + +namespace LAMMPS_NS { + +typedef enum { FCC, BCC, HCP, DIM, DIA, B1, C11, L12, B2 } lattice_t; + +class MEAM +{ +public: + MEAM(Memory* mem); + ~MEAM(); + +private: + Memory* memory; + + // cutforce = force cutoff + // cutforcesq = force cutoff squared + + double cutforce, cutforcesq; + + // Ec_meam = cohesive energy + // re_meam = nearest-neighbor distance + // Omega_meam = atomic volume + // B_meam = bulk modulus + // Z_meam = number of first neighbors for reference structure + // ielt_meam = atomic number of element + // A_meam = adjustable parameter + // alpha_meam = sqrt(9*Omega*B/Ec) + // rho0_meam = density scaling parameter + // delta_meam = heat of formation for alloys + // beta[0-3]_meam = electron density constants + // t[0-3]_meam = coefficients on densities in Gamma computation + // rho_ref_meam = background density for reference structure + // ibar_meam(i) = selection parameter for Gamma function for elt i, + // lattce_meam(i,j) = lattce configuration for elt i or alloy (i,j) + // neltypes = maximum number of element type defined + // eltind = index number of pair (similar to Voigt notation; ij = ji) + // phir = pair potential function array + // phirar[1-6] = spline coeffs + // attrac_meam = attraction parameter in Rose energy + // repuls_meam = repulsion parameter in Rose energy + // nn2_meam = 1 if second nearest neighbors are to be computed, else 0 + // zbl_meam = 1 if zbl potential for small r to be use, else 0 + // emb_lin_neg = 1 if linear embedding function for rhob to be used, else 0 + // bkgd_dyn = 1 if reference densities follows Dynamo, else 0 + // Cmin_meam, Cmax_meam = min and max values in screening cutoff + // rc_meam = cutoff distance for meam + // delr_meam = cutoff region for meam + // ebound_meam = factor giving maximum boundary of sceen fcn ellipse + // augt1 = flag for whether t1 coefficient should be augmented + // ialloy = flag for newer alloy formulation (as in dynamo code) + // mix_ref_t = flag to recover "old" way of computing t in reference config + // erose_form = selection parameter for form of E_rose function + // gsmooth_factor = factor determining length of G smoothing region + // vind[23]D = Voight notation index maps for 2 and 3D + // v2D,v3D = array of factors to apply for Voight notation + + // nr,dr = pair function discretization parameters + // nrar,rdrar = spline coeff array parameters + + double Ec_meam[maxelt][maxelt], re_meam[maxelt][maxelt]; + double Omega_meam[maxelt], Z_meam[maxelt]; + double A_meam[maxelt], alpha_meam[maxelt][maxelt], rho0_meam[maxelt]; + double delta_meam[maxelt][maxelt]; + double beta0_meam[maxelt], beta1_meam[maxelt]; + double beta2_meam[maxelt], beta3_meam[maxelt]; + double t0_meam[maxelt], t1_meam[maxelt]; + double t2_meam[maxelt], t3_meam[maxelt]; + double rho_ref_meam[maxelt]; + int ibar_meam[maxelt], ielt_meam[maxelt]; + lattice_t lattce_meam[maxelt][maxelt]; + int nn2_meam[maxelt][maxelt]; + int zbl_meam[maxelt][maxelt]; + int eltind[maxelt][maxelt]; + int neltypes; + + double** phir; + + double **phirar, **phirar1, **phirar2, **phirar3, **phirar4, **phirar5, **phirar6; + + double attrac_meam[maxelt][maxelt], repuls_meam[maxelt][maxelt]; + + double Cmin_meam[maxelt][maxelt][maxelt]; + double Cmax_meam[maxelt][maxelt][maxelt]; + double rc_meam, delr_meam, ebound_meam[maxelt][maxelt]; + int augt1, ialloy, mix_ref_t, erose_form; + int emb_lin_neg, bkgd_dyn; + double gsmooth_factor; + int vind2D[3][3], vind3D[3][3][3]; + int v2D[6], v3D[10]; + + int nr, nrar; + double dr, rdrar; + +public: + int nmax; + double *rho, *rho0, *rho1, *rho2, *rho3, *frhop; + double *gamma, *dgamma1, *dgamma2, *dgamma3, *arho2b; + double **arho1, **arho2, **arho3, **arho3b, **t_ave, **tsq_ave; + + int maxneigh; + double *scrfcn, *dscrfcn, *fcpair; + +protected: + // meam_funcs.cpp + + //----------------------------------------------------------------------------- + // Cutoff function + // + static double fcut(const double xi) { + double a; + if (xi >= 1.0) + return 1.0; + else if (xi <= 0.0) + return 0.0; + else { + a = 1.0 - xi; + a *= a; a *= a; + a = 1.0 - a; + return a * a; + } + } + + //----------------------------------------------------------------------------- + // Cutoff function and derivative + // + static double dfcut(const double xi, double& dfc) { + double a, a3, a4, a1m4; + if (xi >= 1.0) { + dfc = 0.0; + return 1.0; + } else if (xi <= 0.0) { + dfc = 0.0; + return 0.0; + } else { + a = 1.0 - xi; + a3 = a * a * a; + a4 = a * a3; + a1m4 = 1.0-a4; + + dfc = 8 * a1m4 * a3; + return a1m4*a1m4; + } + } + + //----------------------------------------------------------------------------- + // Derivative of Cikj w.r.t. rij + // Inputs: rij,rij2,rik2,rjk2 + // + static double dCfunc(const double rij2, const double rik2, const double rjk2) { + double rij4, a, asq, b,denom; + + rij4 = rij2 * rij2; + a = rik2 - rjk2; + b = rik2 + rjk2; + asq = a*a; + denom = rij4 - asq; + denom = denom * denom; + return -4 * (-2 * rij2 * asq + rij4 * b + asq * b) / denom; + } + + //----------------------------------------------------------------------------- + // Derivative of Cikj w.r.t. rik and rjk + // Inputs: rij,rij2,rik2,rjk2 + // + static void dCfunc2(const double rij2, const double rik2, const double rjk2, + double& dCikj1, double& dCikj2) { + double rij4, rik4, rjk4, a, denom; + + rij4 = rij2 * rij2; + rik4 = rik2 * rik2; + rjk4 = rjk2 * rjk2; + a = rik2 - rjk2; + denom = rij4 - a * a; + denom = denom * denom; + dCikj1 = 4 * rij2 * (rij4 + rik4 + 2 * rik2 * rjk2 - 3 * rjk4 - 2 * rij2 * a) / denom; + dCikj2 = 4 * rij2 * (rij4 - 3 * rik4 + 2 * rik2 * rjk2 + rjk4 + 2 * rij2 * a) / denom; + } + + double G_gam(const double gamma, const int ibar, int &errorflag) const; + double dG_gam(const double gamma, const int ibar, double &dG) const; + static double zbl(const double r, const int z1, const int z2); + static double erose(const double r, const double re, const double alpha, const double Ec, const double repuls, const double attrac, const int form); + + static void get_shpfcn(const lattice_t latt, double (&s)[3]); + static int get_Zij(const lattice_t latt); + static int get_Zij2(const lattice_t latt, const double cmin, const double cmax, double &a, double &S); +protected: + void meam_checkindex(int, int, int, int*, int*); + void getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap); + void calc_rho1(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + double* scrfcn, double* fcpair); + + void alloyparams(); + void compute_pair_meam(); + double phi_meam(double, int, int); + void compute_reference_density(); + void get_tavref(double*, double*, double*, double*, double*, double*, double, double, double, double, + double, double, double, int, int, lattice_t); + void get_sijk(double, int, int, int, double*); + void get_densref(double, int, int, double*, double*, double*, double*, double*, double*, double*, double*); + void interpolate_meam(int); + double compute_phi(double, int, int); + +public: + void meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, double* alpha, + double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, + double* asub, double* t0, double* t1, double* t2, double* t3, double* rozero, + int* ibar); + void meam_setup_param(int which, double value, int nindex, int* index /*index(3)*/, int* errorflag); + void meam_setup_done(double* cutmax); + void meam_dens_setup(int atom_nmax, int nall, int n_neigh); + void meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset); + void meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, int& errorflag); + void meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom); +}; + +// Functions we need for compat + +static inline bool iszero(const double f) { + return fabs(f) < 1e-20; +} + +template +static inline void setall2d(TYPE (&arr)[maxi][maxj], const TYPE v) { + for (size_t i = 0; i < maxi; i++) + for (size_t j = 0; j < maxj; j++) + arr[i][j] = v; +} + +template +static inline void setall3d(TYPE (&arr)[maxi][maxj][maxk], const TYPE v) { + for (size_t i = 0; i < maxi; i++) + for (size_t j = 0; j < maxj; j++) + for (size_t k = 0; k < maxk; k++) + arr[i][j][k] = v; +} + +}; +#endif diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp new file mode 100644 index 000000000..2adf4000f --- /dev/null +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -0,0 +1,148 @@ +#include "meam.h" +#include "math_special.h" + +using namespace LAMMPS_NS; + +void +MEAM::meam_dens_final(int nlocal, int eflag_either, int eflag_global, int eflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, int& errorflag) +{ + int i, elti; + int m; + double rhob, G, dG, Gbar, dGbar, gam, shp[3], Z; + double B, denom, rho_bkgd; + + // Complete the calculation of density + + for (i = 0; i < nlocal; i++) { + elti = fmap[type[i]]; + if (elti >= 0) { + rho1[i] = 0.0; + rho2[i] = -1.0 / 3.0 * arho2b[i] * arho2b[i]; + rho3[i] = 0.0; + for (m = 0; m < 3; m++) { + rho1[i] = rho1[i] + arho1[i][m] * arho1[i][m]; + rho3[i] = rho3[i] - 3.0 / 5.0 * arho3b[i][m] * arho3b[i][m]; + } + for (m = 0; m < 6; m++) { + rho2[i] = rho2[i] + this->v2D[m] * arho2[i][m] * arho2[i][m]; + } + for (m = 0; m < 10; m++) { + rho3[i] = rho3[i] + this->v3D[m] * arho3[i][m] * arho3[i][m]; + } + + if (rho0[i] > 0.0) { + if (this->ialloy == 1) { + t_ave[i][0] = t_ave[i][0] / tsq_ave[i][0]; + t_ave[i][1] = t_ave[i][1] / tsq_ave[i][1]; + t_ave[i][2] = t_ave[i][2] / tsq_ave[i][2]; + } else if (this->ialloy == 2) { + t_ave[i][0] = this->t1_meam[elti]; + t_ave[i][1] = this->t2_meam[elti]; + t_ave[i][2] = this->t3_meam[elti]; + } else { + t_ave[i][0] = t_ave[i][0] / rho0[i]; + t_ave[i][1] = t_ave[i][1] / rho0[i]; + t_ave[i][2] = t_ave[i][2] / rho0[i]; + } + } + + gamma[i] = t_ave[i][0] * rho1[i] + t_ave[i][1] * rho2[i] + t_ave[i][2] * rho3[i]; + + if (rho0[i] > 0.0) { + gamma[i] = gamma[i] / (rho0[i] * rho0[i]); + } + + Z = this->Z_meam[elti]; + + G = G_gam(gamma[i], this->ibar_meam[elti], errorflag); + if (errorflag != 0) + return; + get_shpfcn(this->lattce_meam[elti][elti], shp); + if (this->ibar_meam[elti] <= 0) { + Gbar = 1.0; + dGbar = 0.0; + } else { + if (this->mix_ref_t == 1) { + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); + } else { + gam = (this->t1_meam[elti] * shp[0] + this->t2_meam[elti] * shp[1] + this->t3_meam[elti] * shp[2]) / + (Z * Z); + } + Gbar = G_gam(gam, this->ibar_meam[elti], errorflag); + } + rho[i] = rho0[i] * G; + + if (this->mix_ref_t == 1) { + if (this->ibar_meam[elti] <= 0) { + Gbar = 1.0; + dGbar = 0.0; + } else { + gam = (t_ave[i][0] * shp[0] + t_ave[i][1] * shp[1] + t_ave[i][2] * shp[2]) / (Z * Z); + Gbar = dG_gam(gam, this->ibar_meam[elti], dGbar); + } + rho_bkgd = this->rho0_meam[elti] * Z * Gbar; + } else { + if (this->bkgd_dyn == 1) { + rho_bkgd = this->rho0_meam[elti] * Z; + } else { + rho_bkgd = this->rho_ref_meam[elti]; + } + } + rhob = rho[i] / rho_bkgd; + denom = 1.0 / rho_bkgd; + + G = dG_gam(gamma[i], this->ibar_meam[elti], dG); + + dgamma1[i] = (G - 2 * dG * gamma[i]) * denom; + + if (!iszero(rho0[i])) { + dgamma2[i] = (dG / rho0[i]) * denom; + } else { + dgamma2[i] = 0.0; + } + + // dgamma3 is nonzero only if we are using the "mixed" rule for + // computing t in the reference system (which is not correct, but + // included for backward compatibility + if (this->mix_ref_t == 1) { + dgamma3[i] = rho0[i] * G * dGbar / (Gbar * Z * Z) * denom; + } else { + dgamma3[i] = 0.0; + } + + B = this->A_meam[elti] * this->Ec_meam[elti][elti]; + + if (!iszero(rhob)) { + if (this->emb_lin_neg == 1 && rhob <= 0) { + frhop[i] = -B; + } else { + frhop[i] = B * (log(rhob) + 1.0); + } + if (eflag_either != 0) { + if (eflag_global != 0) { + if (this->emb_lin_neg == 1 && rhob <= 0) { + *eng_vdwl = *eng_vdwl - B * rhob; + } else { + *eng_vdwl = *eng_vdwl + B * rhob * log(rhob); + } + } + if (eflag_atom != 0) { + if (this->emb_lin_neg == 1 && rhob <= 0) { + eatom[i] = eatom[i] - B * rhob; + } else { + eatom[i] = eatom[i] + B * rhob * log(rhob); + } + } + } + } else { + if (this->emb_lin_neg == 1) { + frhop[i] = -B; + } else { + frhop[i] = B; + } + } + } + } +} + diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp new file mode 100644 index 000000000..e1a7509ab --- /dev/null +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -0,0 +1,355 @@ +#include "meam.h" +#include "math_special.h" + +using namespace LAMMPS_NS; + +void +MEAM::meam_dens_setup(int atom_nmax, int nall, int n_neigh) +{ + int i, j; + + // grow local arrays if necessary + + if (atom_nmax > nmax) { + memory->destroy(rho); + memory->destroy(rho0); + memory->destroy(rho1); + memory->destroy(rho2); + memory->destroy(rho3); + memory->destroy(frhop); + memory->destroy(gamma); + memory->destroy(dgamma1); + memory->destroy(dgamma2); + memory->destroy(dgamma3); + memory->destroy(arho2b); + memory->destroy(arho1); + memory->destroy(arho2); + memory->destroy(arho3); + memory->destroy(arho3b); + memory->destroy(t_ave); + memory->destroy(tsq_ave); + + nmax = atom_nmax; + + memory->create(rho, nmax, "pair:rho"); + memory->create(rho0, nmax, "pair:rho0"); + memory->create(rho1, nmax, "pair:rho1"); + memory->create(rho2, nmax, "pair:rho2"); + memory->create(rho3, nmax, "pair:rho3"); + memory->create(frhop, nmax, "pair:frhop"); + memory->create(gamma, nmax, "pair:gamma"); + memory->create(dgamma1, nmax, "pair:dgamma1"); + memory->create(dgamma2, nmax, "pair:dgamma2"); + memory->create(dgamma3, nmax, "pair:dgamma3"); + memory->create(arho2b, nmax, "pair:arho2b"); + memory->create(arho1, nmax, 3, "pair:arho1"); + memory->create(arho2, nmax, 6, "pair:arho2"); + memory->create(arho3, nmax, 10, "pair:arho3"); + memory->create(arho3b, nmax, 3, "pair:arho3b"); + memory->create(t_ave, nmax, 3, "pair:t_ave"); + memory->create(tsq_ave, nmax, 3, "pair:tsq_ave"); + } + + if (n_neigh > maxneigh) { + memory->destroy(scrfcn); + memory->destroy(dscrfcn); + memory->destroy(fcpair); + maxneigh = n_neigh; + memory->create(scrfcn, maxneigh, "pair:scrfcn"); + memory->create(dscrfcn, maxneigh, "pair:dscrfcn"); + memory->create(fcpair, maxneigh, "pair:fcpair"); + } + + // zero out local arrays + + for (i = 0; i < nall; i++) { + rho0[i] = 0.0; + arho2b[i] = 0.0; + arho1[i][0] = arho1[i][1] = arho1[i][2] = 0.0; + for (j = 0; j < 6; j++) + arho2[i][j] = 0.0; + for (j = 0; j < 10; j++) + arho3[i][j] = 0.0; + arho3b[i][0] = arho3b[i][1] = arho3b[i][2] = 0.0; + t_ave[i][0] = t_ave[i][1] = t_ave[i][2] = 0.0; + tsq_ave[i][0] = tsq_ave[i][1] = tsq_ave[i][2] = 0.0; + } +} + +void +MEAM::meam_dens_init(int i, int ntype, int* type, int* fmap, double** x, + int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset) +{ + // Compute screening function and derivatives + getscreen(i, &scrfcn[fnoffset], &dscrfcn[fnoffset], &fcpair[fnoffset], x, numneigh, firstneigh, + numneigh_full, firstneigh_full, ntype, type, fmap); + + // Calculate intermediate density terms to be communicated + calc_rho1(i, ntype, type, fmap, x, numneigh, firstneigh, &scrfcn[fnoffset], &fcpair[fnoffset]); +} + +// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc + +void +MEAM::getscreen(int i, double* scrfcn, double* dscrfcn, double* fcpair, double** x, int numneigh, + int* firstneigh, int numneigh_full, int* firstneigh_full, int ntype, int* type, int* fmap) +{ + int jn, j, kn, k; + int elti, eltj, eltk; + double xitmp, yitmp, zitmp, delxij, delyij, delzij, rij2, rij; + double xjtmp, yjtmp, zjtmp, delxik, delyik, delzik, rik2 /*,rik*/; + double xktmp, yktmp, zktmp, delxjk, delyjk, delzjk, rjk2 /*,rjk*/; + double xik, xjk, sij, fcij, sfcij, dfcij, sikj, dfikj, cikj; + double Cmin, Cmax, delc, /*ebound,*/ rbound, a, coef1, coef2; + double dCikj; + double rnorm, fc, dfc, drinv; + + drinv = 1.0 / this->delr_meam; + elti = fmap[type[i]]; + if (elti < 0) return; + + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; + + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; + + eltj = fmap[type[j]]; + if (eltj < 0) continue; + + // First compute screening function itself, sij + xjtmp = x[j][0]; + yjtmp = x[j][1]; + zjtmp = x[j][2]; + delxij = xjtmp - xitmp; + delyij = yjtmp - yitmp; + delzij = zjtmp - zitmp; + rij2 = delxij * delxij + delyij * delyij + delzij * delzij; + rij = sqrt(rij2); + + if (rij > this->rc_meam) { + fcij = 0.0; + dfcij = 0.0; + sij = 0.0; + } else { + rnorm = (this->rc_meam - rij) * drinv; + sij = 1.0; + + // if rjk2 > ebound*rijsq, atom k is definitely outside the ellipse + const double rbound = this->ebound_meam[elti][eltj] * rij2; + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + eltk = fmap[type[k]]; + if (eltk < 0) continue; + if (k == j) continue; + + delxjk = x[k][0] - xjtmp; + delyjk = x[k][1] - yjtmp; + delzjk = x[k][2] - zjtmp; + rjk2 = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; + if (rjk2 > rbound) continue; + + delxik = x[k][0] - xitmp; + delyik = x[k][1] - yitmp; + delzik = x[k][2] - zitmp; + rik2 = delxik * delxik + delyik * delyik + delzik * delzik; + if (rik2 > rbound) continue; + + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + // if a < 0, then ellipse equation doesn't describe this case and + // atom k can't possibly screen i-j + if (a <= 0.0) continue; + + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + Cmax = this->Cmax_meam[elti][eltj][eltk]; + Cmin = this->Cmin_meam[elti][eltj][eltk]; + if (cikj >= Cmax) continue; + // note that cikj may be slightly negative (within numerical + // tolerance) if atoms are colinear, so don't reject that case here + // (other negative cikj cases were handled by the test on "a" above) + else if (cikj <= Cmin) { + sij = 0.0; + break; + } else { + delc = Cmax - Cmin; + cikj = (cikj - Cmin) / delc; + sikj = fcut(cikj); + } + sij *= sikj; + } + + fc = dfcut(rnorm, dfc); + fcij = fc; + dfcij = dfc * drinv; + } + + // Now compute derivatives + dscrfcn[jn] = 0.0; + sfcij = sij * fcij; + if (iszero(sfcij) || iszero(sfcij - 1.0)) + goto LABEL_100; + + rbound = this->ebound_meam[elti][eltj] * rij2; + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + if (k == j) continue; + eltk = fmap[type[k]]; + if (eltk < 0) continue; + + xktmp = x[k][0]; + yktmp = x[k][1]; + zktmp = x[k][2]; + delxjk = xktmp - xjtmp; + delyjk = yktmp - yjtmp; + delzjk = zktmp - zjtmp; + rjk2 = delxjk * delxjk + delyjk * delyjk + delzjk * delzjk; + if (rjk2 > rbound) continue; + + delxik = xktmp - xitmp; + delyik = yktmp - yitmp; + delzik = zktmp - zitmp; + rik2 = delxik * delxik + delyik * delyik + delzik * delzik; + if (rik2 > rbound) continue; + + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + // if a < 0, then ellipse equation doesn't describe this case and + // atom k can't possibly screen i-j + if (a <= 0.0) continue; + + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + Cmax = this->Cmax_meam[elti][eltj][eltk]; + Cmin = this->Cmin_meam[elti][eltj][eltk]; + if (cikj >= Cmax) { + continue; + // Note that cikj may be slightly negative (within numerical + // tolerance) if atoms are colinear, so don't reject that case + // here + // (other negative cikj cases were handled by the test on "a" + // above) + // Note that we never have 0cutforcesq) { + eltj = fmap[type[j]]; + rij = sqrt(rij2); + ai = rij / this->re_meam[elti][elti] - 1.0; + aj = rij / this->re_meam[eltj][eltj] - 1.0; + ro0i = this->rho0_meam[elti]; + ro0j = this->rho0_meam[eltj]; + rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj) * sij; + rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj) * sij; + rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj) * sij; + rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj) * sij; + rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai) * sij; + rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai) * sij; + rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai) * sij; + rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai) * sij; + if (this->ialloy == 1) { + rhoa1j = rhoa1j * this->t1_meam[eltj]; + rhoa2j = rhoa2j * this->t2_meam[eltj]; + rhoa3j = rhoa3j * this->t3_meam[eltj]; + rhoa1i = rhoa1i * this->t1_meam[elti]; + rhoa2i = rhoa2i * this->t2_meam[elti]; + rhoa3i = rhoa3i * this->t3_meam[elti]; + } + rho0[i] = rho0[i] + rhoa0j; + rho0[j] = rho0[j] + rhoa0i; + // For ialloy = 2, use single-element value (not average) + if (this->ialloy != 2) { + t_ave[i][0] = t_ave[i][0] + this->t1_meam[eltj] * rhoa0j; + t_ave[i][1] = t_ave[i][1] + this->t2_meam[eltj] * rhoa0j; + t_ave[i][2] = t_ave[i][2] + this->t3_meam[eltj] * rhoa0j; + t_ave[j][0] = t_ave[j][0] + this->t1_meam[elti] * rhoa0i; + t_ave[j][1] = t_ave[j][1] + this->t2_meam[elti] * rhoa0i; + t_ave[j][2] = t_ave[j][2] + this->t3_meam[elti] * rhoa0i; + } + if (this->ialloy == 1) { + tsq_ave[i][0] = tsq_ave[i][0] + this->t1_meam[eltj] * this->t1_meam[eltj] * rhoa0j; + tsq_ave[i][1] = tsq_ave[i][1] + this->t2_meam[eltj] * this->t2_meam[eltj] * rhoa0j; + tsq_ave[i][2] = tsq_ave[i][2] + this->t3_meam[eltj] * this->t3_meam[eltj] * rhoa0j; + tsq_ave[j][0] = tsq_ave[j][0] + this->t1_meam[elti] * this->t1_meam[elti] * rhoa0i; + tsq_ave[j][1] = tsq_ave[j][1] + this->t2_meam[elti] * this->t2_meam[elti] * rhoa0i; + tsq_ave[j][2] = tsq_ave[j][2] + this->t3_meam[elti] * this->t3_meam[elti] * rhoa0i; + } + arho2b[i] = arho2b[i] + rhoa2j; + arho2b[j] = arho2b[j] + rhoa2i; + + A1j = rhoa1j / rij; + A2j = rhoa2j / rij2; + A3j = rhoa3j / (rij2 * rij); + A1i = rhoa1i / rij; + A2i = rhoa2i / rij2; + A3i = rhoa3i / (rij2 * rij); + nv2 = 0; + nv3 = 0; + for (m = 0; m < 3; m++) { + arho1[i][m] = arho1[i][m] + A1j * delij[m]; + arho1[j][m] = arho1[j][m] - A1i * delij[m]; + arho3b[i][m] = arho3b[i][m] + rhoa3j * delij[m] / rij; + arho3b[j][m] = arho3b[j][m] - rhoa3i * delij[m] / rij; + for (n = m; n < 3; n++) { + arho2[i][nv2] = arho2[i][nv2] + A2j * delij[m] * delij[n]; + arho2[j][nv2] = arho2[j][nv2] + A2i * delij[m] * delij[n]; + nv2 = nv2 + 1; + for (p = n; p < 3; p++) { + arho3[i][nv3] = arho3[i][nv3] + A3j * delij[m] * delij[n] * delij[p]; + arho3[j][nv3] = arho3[j][nv3] - A3i * delij[m] * delij[n] * delij[p]; + nv3 = nv3 + 1; + } + } + } + } + } + } +} + diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp new file mode 100644 index 000000000..cbed31fd5 --- /dev/null +++ b/src/USER-MEAMC/meam_force.cpp @@ -0,0 +1,531 @@ +#include "meam.h" +#include "math_special.h" +#include + +using namespace LAMMPS_NS; + + +void +MEAM::meam_force(int i, int eflag_either, int eflag_global, int eflag_atom, int vflag_atom, double* eng_vdwl, + double* eatom, int ntype, int* type, int* fmap, double** x, int numneigh, int* firstneigh, + int numneigh_full, int* firstneigh_full, int fnoffset, double** f, double** vatom) +{ + int j, jn, k, kn, kk, m, n, p, q; + int nv2, nv3, elti, eltj, eltk, ind; + double xitmp, yitmp, zitmp, delij[3], rij2, rij, rij3; + double v[6], fi[3], fj[3]; + double third, sixth; + double pp, dUdrij, dUdsij, dUdrijm[3], force, forcem; + double r, recip, phi, phip; + double sij; + double a1, a1i, a1j, a2, a2i, a2j; + double a3i, a3j; + double shpi[3], shpj[3]; + double ai, aj, ro0i, ro0j, invrei, invrej; + double rhoa0j, drhoa0j, rhoa0i, drhoa0i; + double rhoa1j, drhoa1j, rhoa1i, drhoa1i; + double rhoa2j, drhoa2j, rhoa2i, drhoa2i; + double a3, a3a, rhoa3j, drhoa3j, rhoa3i, drhoa3i; + double drho0dr1, drho0dr2, drho0ds1, drho0ds2; + double drho1dr1, drho1dr2, drho1ds1, drho1ds2; + double drho1drm1[3], drho1drm2[3]; + double drho2dr1, drho2dr2, drho2ds1, drho2ds2; + double drho2drm1[3], drho2drm2[3]; + double drho3dr1, drho3dr2, drho3ds1, drho3ds2; + double drho3drm1[3], drho3drm2[3]; + double dt1dr1, dt1dr2, dt1ds1, dt1ds2; + double dt2dr1, dt2dr2, dt2ds1, dt2ds2; + double dt3dr1, dt3dr2, dt3ds1, dt3ds2; + double drhodr1, drhodr2, drhods1, drhods2, drhodrm1[3], drhodrm2[3]; + double arg; + double arg1i1, arg1j1, arg1i2, arg1j2, arg1i3, arg1j3, arg3i3, arg3j3; + double dsij1, dsij2, force1, force2; + double t1i, t2i, t3i, t1j, t2j, t3j; + + third = 1.0 / 3.0; + sixth = 1.0 / 6.0; + + // Compute forces atom i + + elti = fmap[type[i]]; + if (elti < 0) return; + + xitmp = x[i][0]; + yitmp = x[i][1]; + zitmp = x[i][2]; + + // Treat each pair + for (jn = 0; jn < numneigh; jn++) { + j = firstneigh[jn]; + eltj = fmap[type[j]]; + + if (!iszero(scrfcn[fnoffset + jn]) && eltj >= 0) { + + sij = scrfcn[fnoffset + jn] * fcpair[fnoffset + jn]; + delij[0] = x[j][0] - xitmp; + delij[1] = x[j][1] - yitmp; + delij[2] = x[j][2] - zitmp; + rij2 = delij[0] * delij[0] + delij[1] * delij[1] + delij[2] * delij[2]; + if (rij2 < this->cutforcesq) { + rij = sqrt(rij2); + r = rij; + + // Compute phi and phip + ind = this->eltind[elti][eltj]; + pp = rij * this->rdrar; + kk = (int)pp; + kk = std::min(kk, this->nrar - 2); + pp = pp - kk; + pp = std::min(pp, 1.0); + phi = ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + + this->phirar[ind][kk]; + phip = (this->phirar6[ind][kk] * pp + this->phirar5[ind][kk]) * pp + this->phirar4[ind][kk]; + recip = 1.0 / r; + + if (eflag_either != 0) { + if (eflag_global != 0) + *eng_vdwl = *eng_vdwl + phi * sij; + if (eflag_atom != 0) { + eatom[i] = eatom[i] + 0.5 * phi * sij; + eatom[j] = eatom[j] + 0.5 * phi * sij; + } + } + + // write(1,*) "force_meamf: phi: ",phi + // write(1,*) "force_meamf: phip: ",phip + + // Compute pair densities and derivatives + invrei = 1.0 / this->re_meam[elti][elti]; + ai = rij * invrei - 1.0; + ro0i = this->rho0_meam[elti]; + rhoa0i = ro0i * MathSpecial::fm_exp(-this->beta0_meam[elti] * ai); + drhoa0i = -this->beta0_meam[elti] * invrei * rhoa0i; + rhoa1i = ro0i * MathSpecial::fm_exp(-this->beta1_meam[elti] * ai); + drhoa1i = -this->beta1_meam[elti] * invrei * rhoa1i; + rhoa2i = ro0i * MathSpecial::fm_exp(-this->beta2_meam[elti] * ai); + drhoa2i = -this->beta2_meam[elti] * invrei * rhoa2i; + rhoa3i = ro0i * MathSpecial::fm_exp(-this->beta3_meam[elti] * ai); + drhoa3i = -this->beta3_meam[elti] * invrei * rhoa3i; + + if (elti != eltj) { + invrej = 1.0 / this->re_meam[eltj][eltj]; + aj = rij * invrej - 1.0; + ro0j = this->rho0_meam[eltj]; + rhoa0j = ro0j * MathSpecial::fm_exp(-this->beta0_meam[eltj] * aj); + drhoa0j = -this->beta0_meam[eltj] * invrej * rhoa0j; + rhoa1j = ro0j * MathSpecial::fm_exp(-this->beta1_meam[eltj] * aj); + drhoa1j = -this->beta1_meam[eltj] * invrej * rhoa1j; + rhoa2j = ro0j * MathSpecial::fm_exp(-this->beta2_meam[eltj] * aj); + drhoa2j = -this->beta2_meam[eltj] * invrej * rhoa2j; + rhoa3j = ro0j * MathSpecial::fm_exp(-this->beta3_meam[eltj] * aj); + drhoa3j = -this->beta3_meam[eltj] * invrej * rhoa3j; + } else { + rhoa0j = rhoa0i; + drhoa0j = drhoa0i; + rhoa1j = rhoa1i; + drhoa1j = drhoa1i; + rhoa2j = rhoa2i; + drhoa2j = drhoa2i; + rhoa3j = rhoa3i; + drhoa3j = drhoa3i; + } + + const double t1mi = this->t1_meam[elti]; + const double t2mi = this->t2_meam[elti]; + const double t3mi = this->t3_meam[elti]; + const double t1mj = this->t1_meam[eltj]; + const double t2mj = this->t2_meam[eltj]; + const double t3mj = this->t3_meam[eltj]; + + if (this->ialloy == 1) { + rhoa1j *= t1mj; + rhoa2j *= t2mj; + rhoa3j *= t3mj; + rhoa1i *= t1mi; + rhoa2i *= t2mi; + rhoa3i *= t3mi; + drhoa1j *= t1mj; + drhoa2j *= t2mj; + drhoa3j *= t3mj; + drhoa1i *= t1mi; + drhoa2i *= t2mi; + drhoa3i *= t3mi; + } + + nv2 = 0; + nv3 = 0; + arg1i1 = 0.0; + arg1j1 = 0.0; + arg1i2 = 0.0; + arg1j2 = 0.0; + arg1i3 = 0.0; + arg1j3 = 0.0; + arg3i3 = 0.0; + arg3j3 = 0.0; + for (n = 0; n < 3; n++) { + for (p = n; p < 3; p++) { + for (q = p; q < 3; q++) { + arg = delij[n] * delij[p] * delij[q] * this->v3D[nv3]; + arg1i3 = arg1i3 + arho3[i][nv3] * arg; + arg1j3 = arg1j3 - arho3[j][nv3] * arg; + nv3 = nv3 + 1; + } + arg = delij[n] * delij[p] * this->v2D[nv2]; + arg1i2 = arg1i2 + arho2[i][nv2] * arg; + arg1j2 = arg1j2 + arho2[j][nv2] * arg; + nv2 = nv2 + 1; + } + arg1i1 = arg1i1 + arho1[i][n] * delij[n]; + arg1j1 = arg1j1 - arho1[j][n] * delij[n]; + arg3i3 = arg3i3 + arho3b[i][n] * delij[n]; + arg3j3 = arg3j3 - arho3b[j][n] * delij[n]; + } + + // rho0 terms + drho0dr1 = drhoa0j * sij; + drho0dr2 = drhoa0i * sij; + + // rho1 terms + a1 = 2 * sij / rij; + drho1dr1 = a1 * (drhoa1j - rhoa1j / rij) * arg1i1; + drho1dr2 = a1 * (drhoa1i - rhoa1i / rij) * arg1j1; + a1 = 2.0 * sij / rij; + for (m = 0; m < 3; m++) { + drho1drm1[m] = a1 * rhoa1j * arho1[i][m]; + drho1drm2[m] = -a1 * rhoa1i * arho1[j][m]; + } + + // rho2 terms + a2 = 2 * sij / rij2; + drho2dr1 = a2 * (drhoa2j - 2 * rhoa2j / rij) * arg1i2 - 2.0 / 3.0 * arho2b[i] * drhoa2j * sij; + drho2dr2 = a2 * (drhoa2i - 2 * rhoa2i / rij) * arg1j2 - 2.0 / 3.0 * arho2b[j] * drhoa2i * sij; + a2 = 4 * sij / rij2; + for (m = 0; m < 3; m++) { + drho2drm1[m] = 0.0; + drho2drm2[m] = 0.0; + for (n = 0; n < 3; n++) { + drho2drm1[m] = drho2drm1[m] + arho2[i][this->vind2D[m][n]] * delij[n]; + drho2drm2[m] = drho2drm2[m] - arho2[j][this->vind2D[m][n]] * delij[n]; + } + drho2drm1[m] = a2 * rhoa2j * drho2drm1[m]; + drho2drm2[m] = -a2 * rhoa2i * drho2drm2[m]; + } + + // rho3 terms + rij3 = rij * rij2; + a3 = 2 * sij / rij3; + a3a = 6.0 / 5.0 * sij / rij; + drho3dr1 = a3 * (drhoa3j - 3 * rhoa3j / rij) * arg1i3 - a3a * (drhoa3j - rhoa3j / rij) * arg3i3; + drho3dr2 = a3 * (drhoa3i - 3 * rhoa3i / rij) * arg1j3 - a3a * (drhoa3i - rhoa3i / rij) * arg3j3; + a3 = 6 * sij / rij3; + a3a = 6 * sij / (5 * rij); + for (m = 0; m < 3; m++) { + drho3drm1[m] = 0.0; + drho3drm2[m] = 0.0; + nv2 = 0; + for (n = 0; n < 3; n++) { + for (p = n; p < 3; p++) { + arg = delij[n] * delij[p] * this->v2D[nv2]; + drho3drm1[m] = drho3drm1[m] + arho3[i][this->vind3D[m][n][p]] * arg; + drho3drm2[m] = drho3drm2[m] + arho3[j][this->vind3D[m][n][p]] * arg; + nv2 = nv2 + 1; + } + } + drho3drm1[m] = (a3 * drho3drm1[m] - a3a * arho3b[i][m]) * rhoa3j; + drho3drm2[m] = (-a3 * drho3drm2[m] + a3a * arho3b[j][m]) * rhoa3i; + } + + // Compute derivatives of weighting functions t wrt rij + t1i = t_ave[i][0]; + t2i = t_ave[i][1]; + t3i = t_ave[i][2]; + t1j = t_ave[j][0]; + t2j = t_ave[j][1]; + t3j = t_ave[j][2]; + + if (this->ialloy == 1) { + + a1i = 0.0; + a1j = 0.0; + a2i = 0.0; + a2j = 0.0; + a3i = 0.0; + a3j = 0.0; + if (!iszero(tsq_ave[i][0])) + a1i = drhoa0j * sij / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) + a1j = drhoa0i * sij / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) + a2i = drhoa0j * sij / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) + a2j = drhoa0i * sij / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) + a3i = drhoa0j * sij / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) + a3j = drhoa0i * sij / tsq_ave[j][2]; + + dt1dr1 = a1i * (t1mj - t1i * t1mj*t1mj); + dt1dr2 = a1j * (t1mi - t1j * t1mi*t1mi); + dt2dr1 = a2i * (t2mj - t2i * t2mj*t2mj); + dt2dr2 = a2j * (t2mi - t2j * t2mi*t2mi); + dt3dr1 = a3i * (t3mj - t3i * t3mj*t3mj); + dt3dr2 = a3j * (t3mi - t3j * t3mi*t3mi); + + } else if (this->ialloy == 2) { + + dt1dr1 = 0.0; + dt1dr2 = 0.0; + dt2dr1 = 0.0; + dt2dr2 = 0.0; + dt3dr1 = 0.0; + dt3dr2 = 0.0; + + } else { + + ai = 0.0; + if (!iszero(rho0[i])) + ai = drhoa0j * sij / rho0[i]; + aj = 0.0; + if (!iszero(rho0[j])) + aj = drhoa0i * sij / rho0[j]; + + dt1dr1 = ai * (t1mj - t1i); + dt1dr2 = aj * (t1mi - t1j); + dt2dr1 = ai * (t2mj - t2i); + dt2dr2 = aj * (t2mi - t2j); + dt3dr1 = ai * (t3mj - t3i); + dt3dr2 = aj * (t3mi - t3j); + } + + // Compute derivatives of total density wrt rij, sij and rij(3) + get_shpfcn(this->lattce_meam[elti][elti], shpi); + get_shpfcn(this->lattce_meam[eltj][eltj], shpj); + drhodr1 = dgamma1[i] * drho0dr1 + + dgamma2[i] * (dt1dr1 * rho1[i] + t1i * drho1dr1 + dt2dr1 * rho2[i] + t2i * drho2dr1 + + dt3dr1 * rho3[i] + t3i * drho3dr1) - + dgamma3[i] * (shpi[0] * dt1dr1 + shpi[1] * dt2dr1 + shpi[2] * dt3dr1); + drhodr2 = dgamma1[j] * drho0dr2 + + dgamma2[j] * (dt1dr2 * rho1[j] + t1j * drho1dr2 + dt2dr2 * rho2[j] + t2j * drho2dr2 + + dt3dr2 * rho3[j] + t3j * drho3dr2) - + dgamma3[j] * (shpj[0] * dt1dr2 + shpj[1] * dt2dr2 + shpj[2] * dt3dr2); + for (m = 0; m < 3; m++) { + drhodrm1[m] = 0.0; + drhodrm2[m] = 0.0; + drhodrm1[m] = dgamma2[i] * (t1i * drho1drm1[m] + t2i * drho2drm1[m] + t3i * drho3drm1[m]); + drhodrm2[m] = dgamma2[j] * (t1j * drho1drm2[m] + t2j * drho2drm2[m] + t3j * drho3drm2[m]); + } + + // Compute derivatives wrt sij, but only if necessary + if (!iszero(dscrfcn[fnoffset + jn])) { + drho0ds1 = rhoa0j; + drho0ds2 = rhoa0i; + a1 = 2.0 / rij; + drho1ds1 = a1 * rhoa1j * arg1i1; + drho1ds2 = a1 * rhoa1i * arg1j1; + a2 = 2.0 / rij2; + drho2ds1 = a2 * rhoa2j * arg1i2 - 2.0 / 3.0 * arho2b[i] * rhoa2j; + drho2ds2 = a2 * rhoa2i * arg1j2 - 2.0 / 3.0 * arho2b[j] * rhoa2i; + a3 = 2.0 / rij3; + a3a = 6.0 / (5.0 * rij); + drho3ds1 = a3 * rhoa3j * arg1i3 - a3a * rhoa3j * arg3i3; + drho3ds2 = a3 * rhoa3i * arg1j3 - a3a * rhoa3i * arg3j3; + + if (this->ialloy == 1) { + + a1i = 0.0; + a1j = 0.0; + a2i = 0.0; + a2j = 0.0; + a3i = 0.0; + a3j = 0.0; + if (!iszero(tsq_ave[i][0])) + a1i = rhoa0j / tsq_ave[i][0]; + if (!iszero(tsq_ave[j][0])) + a1j = rhoa0i / tsq_ave[j][0]; + if (!iszero(tsq_ave[i][1])) + a2i = rhoa0j / tsq_ave[i][1]; + if (!iszero(tsq_ave[j][1])) + a2j = rhoa0i / tsq_ave[j][1]; + if (!iszero(tsq_ave[i][2])) + a3i = rhoa0j / tsq_ave[i][2]; + if (!iszero(tsq_ave[j][2])) + a3j = rhoa0i / tsq_ave[j][2]; + + dt1ds1 = a1i * (t1mj - t1i * pow(t1mj, 2)); + dt1ds2 = a1j * (t1mi - t1j * pow(t1mi, 2)); + dt2ds1 = a2i * (t2mj - t2i * pow(t2mj, 2)); + dt2ds2 = a2j * (t2mi - t2j * pow(t2mi, 2)); + dt3ds1 = a3i * (t3mj - t3i * pow(t3mj, 2)); + dt3ds2 = a3j * (t3mi - t3j * pow(t3mi, 2)); + + } else if (this->ialloy == 2) { + + dt1ds1 = 0.0; + dt1ds2 = 0.0; + dt2ds1 = 0.0; + dt2ds2 = 0.0; + dt3ds1 = 0.0; + dt3ds2 = 0.0; + + } else { + + ai = 0.0; + if (!iszero(rho0[i])) + ai = rhoa0j / rho0[i]; + aj = 0.0; + if (!iszero(rho0[j])) + aj = rhoa0i / rho0[j]; + + dt1ds1 = ai * (t1mj - t1i); + dt1ds2 = aj * (t1mi - t1j); + dt2ds1 = ai * (t2mj - t2i); + dt2ds2 = aj * (t2mi - t2j); + dt3ds1 = ai * (t3mj - t3i); + dt3ds2 = aj * (t3mi - t3j); + } + + drhods1 = dgamma1[i] * drho0ds1 + + dgamma2[i] * (dt1ds1 * rho1[i] + t1i * drho1ds1 + dt2ds1 * rho2[i] + t2i * drho2ds1 + + dt3ds1 * rho3[i] + t3i * drho3ds1) - + dgamma3[i] * (shpi[0] * dt1ds1 + shpi[1] * dt2ds1 + shpi[2] * dt3ds1); + drhods2 = dgamma1[j] * drho0ds2 + + dgamma2[j] * (dt1ds2 * rho1[j] + t1j * drho1ds2 + dt2ds2 * rho2[j] + t2j * drho2ds2 + + dt3ds2 * rho3[j] + t3j * drho3ds2) - + dgamma3[j] * (shpj[0] * dt1ds2 + shpj[1] * dt2ds2 + shpj[2] * dt3ds2); + } + + // Compute derivatives of energy wrt rij, sij and rij[3] + dUdrij = phip * sij + frhop[i] * drhodr1 + frhop[j] * drhodr2; + dUdsij = 0.0; + if (!iszero(dscrfcn[fnoffset + jn])) { + dUdsij = phi + frhop[i] * drhods1 + frhop[j] * drhods2; + } + for (m = 0; m < 3; m++) { + dUdrijm[m] = frhop[i] * drhodrm1[m] + frhop[j] * drhodrm2[m]; + } + + // Add the part of the force due to dUdrij and dUdsij + + force = dUdrij * recip + dUdsij * dscrfcn[fnoffset + jn]; + for (m = 0; m < 3; m++) { + forcem = delij[m] * force + dUdrijm[m]; + f[i][m] = f[i][m] + forcem; + f[j][m] = f[j][m] - forcem; + } + + // Tabulate per-atom virial as symmetrized stress tensor + + if (vflag_atom != 0) { + fi[0] = delij[0] * force + dUdrijm[0]; + fi[1] = delij[1] * force + dUdrijm[1]; + fi[2] = delij[2] * force + dUdrijm[2]; + v[0] = -0.5 * (delij[0] * fi[0]); + v[1] = -0.5 * (delij[1] * fi[1]); + v[2] = -0.5 * (delij[2] * fi[2]); + v[3] = -0.25 * (delij[0] * fi[1] + delij[1] * fi[0]); + v[4] = -0.25 * (delij[0] * fi[2] + delij[2] * fi[0]); + v[5] = -0.25 * (delij[1] * fi[2] + delij[2] * fi[1]); + + for (m = 0; m < 6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; + } + } + + // Now compute forces on other atoms k due to change in sij + + if (iszero(sij) || iszero(sij - 1.0)) continue; //: cont jn loop + + double dxik(0), dyik(0), dzik(0); + double dxjk(0), dyjk(0), dzjk(0); + + for (kn = 0; kn < numneigh_full; kn++) { + k = firstneigh_full[kn]; + eltk = fmap[type[k]]; + if (k != j && eltk >= 0) { + double xik, xjk, cikj, sikj, dfc, a; + double dCikj1, dCikj2; + double delc, rik2, rjk2; + + sij = scrfcn[jn+fnoffset] * fcpair[jn+fnoffset]; + const double Cmax = this->Cmax_meam[elti][eltj][eltk]; + const double Cmin = this->Cmin_meam[elti][eltj][eltk]; + + dsij1 = 0.0; + dsij2 = 0.0; + if (!iszero(sij) && !iszero(sij - 1.0)) { + const double rbound = rij2 * this->ebound_meam[elti][eltj]; + delc = Cmax - Cmin; + dxjk = x[k][0] - x[j][0]; + dyjk = x[k][1] - x[j][1]; + dzjk = x[k][2] - x[j][2]; + rjk2 = dxjk * dxjk + dyjk * dyjk + dzjk * dzjk; + if (rjk2 <= rbound) { + dxik = x[k][0] - x[i][0]; + dyik = x[k][1] - x[i][1]; + dzik = x[k][2] - x[i][2]; + rik2 = dxik * dxik + dyik * dyik + dzik * dzik; + if (rik2 <= rbound) { + xik = rik2 / rij2; + xjk = rjk2 / rij2; + a = 1 - (xik - xjk) * (xik - xjk); + if (!iszero(a)) { + cikj = (2.0 * (xik + xjk) + a - 2.0) / a; + if (cikj >= Cmin && cikj <= Cmax) { + cikj = (cikj - Cmin) / delc; + sikj = dfcut(cikj, dfc); + dCfunc2(rij2, rik2, rjk2, dCikj1, dCikj2); + a = sij / delc * dfc / sikj; + dsij1 = a * dCikj1; + dsij2 = a * dCikj2; + } + } + } + } + } + + if (!iszero(dsij1) || !iszero(dsij2)) { + force1 = dUdsij * dsij1; + force2 = dUdsij * dsij2; + + f[i][0] += force1 * dxik; + f[i][1] += force1 * dyik; + f[i][2] += force1 * dzik; + f[j][0] += force2 * dxjk; + f[j][1] += force2 * dyjk; + f[j][2] += force2 * dzjk; + f[k][0] -= force1 * dxik + force2 * dxjk; + f[k][1] -= force1 * dyik + force2 * dyjk; + f[k][2] -= force1 * dzik + force2 * dzjk; + + // Tabulate per-atom virial as symmetrized stress tensor + + if (vflag_atom != 0) { + fi[0] = force1 * dxik; + fi[1] = force1 * dyik; + fi[2] = force1 * dzik; + fj[0] = force2 * dxjk; + fj[1] = force2 * dyjk; + fj[2] = force2 * dzjk; + v[0] = -third * (dxik * fi[0] + dxjk * fj[0]); + v[1] = -third * (dyik * fi[1] + dyjk * fj[1]); + v[2] = -third * (dzik * fi[2] + dzjk * fj[2]); + v[3] = -sixth * (dxik * fi[1] + dxjk * fj[1] + dyik * fi[0] + dyjk * fj[0]); + v[4] = -sixth * (dxik * fi[2] + dxjk * fj[2] + dzik * fi[0] + dzjk * fj[0]); + v[5] = -sixth * (dyik * fi[2] + dyjk * fj[2] + dzik * fi[1] + dzjk * fj[1]); + + for (m = 0; m < 6; m++) { + vatom[i][m] = vatom[i][m] + v[m]; + vatom[j][m] = vatom[j][m] + v[m]; + vatom[k][m] = vatom[k][m] + v[m]; + } + } + } + } + // end of k loop + } + } + } + // end of j loop + } +} diff --git a/src/USER-MEAMC/meam_funcs.cpp b/src/USER-MEAMC/meam_funcs.cpp new file mode 100644 index 000000000..3c0dcb9d0 --- /dev/null +++ b/src/USER-MEAMC/meam_funcs.cpp @@ -0,0 +1,321 @@ +/* ---------------------------------------------------------------------- + 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: Sebastian Hütter (OvGU) +------------------------------------------------------------------------- */ + +#include "meam.h" +#include "math_special.h" +#include + +using namespace LAMMPS_NS; + + +//----------------------------------------------------------------------------- +// Compute G(gamma) based on selection flag ibar: +// 0 => G = sqrt(1+gamma) +// 1 => G = exp(gamma/2) +// 2 => not implemented +// 3 => G = 2/(1+exp(-gamma)) +// 4 => G = sqrt(1+gamma) +// -5 => G = +-sqrt(abs(1+gamma)) +// +double +MEAM::G_gam(const double gamma, const int ibar, int& errorflag) const +{ + double gsmooth_switchpoint; + + switch (ibar) { + case 0: + case 4: + gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); + if (gamma < gsmooth_switchpoint) { + // e.g. gsmooth_factor is 99, {: + // gsmooth_switchpoint = -0.99 + // G = 0.01*(-0.99/gamma)**99 + double G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); + return sqrt(G); + } else { + return sqrt(1.0 + gamma); + } + case 1: + return MathSpecial::fm_exp(gamma / 2.0); + case 3: + return 2.0 / (1.0 + exp(-gamma)); + case -5: + if ((1.0 + gamma) >= 0) { + return sqrt(1.0 + gamma); + } else { + return -sqrt(-1.0 - gamma); + } + } + errorflag = 1; + return 0.0; +} + +//----------------------------------------------------------------------------- +// Compute G(gamma and dG(gamma) based on selection flag ibar: +// 0 => G = sqrt(1+gamma) +// 1 => G = exp(gamma/2) +// 2 => not implemented +// 3 => G = 2/(1+exp(-gamma)) +// 4 => G = sqrt(1+gamma) +// -5 => G = +-sqrt(abs(1+gamma)) +// +double +MEAM::dG_gam(const double gamma, const int ibar, double& dG) const +{ + double gsmooth_switchpoint; + double G; + + switch (ibar) { + case 0: + case 4: + gsmooth_switchpoint = -gsmooth_factor / (gsmooth_factor + 1); + if (gamma < gsmooth_switchpoint) { + // e.g. gsmooth_factor is 99, {: + // gsmooth_switchpoint = -0.99 + // G = 0.01*(-0.99/gamma)**99 + double G = 1 / (gsmooth_factor + 1) * pow((gsmooth_switchpoint / gamma), gsmooth_factor); + G = sqrt(G); + dG = -gsmooth_factor * G / (2.0 * gamma); + return G; + } else { + G = sqrt(1.0 + gamma); + dG = 1.0 / (2.0 * G); + return G; + } + case 1: + G = MathSpecial::fm_exp(gamma / 2.0); + dG = G / 2.0; + return G; + case 3: + G = 2.0 / (1.0 + MathSpecial::fm_exp(-gamma)); + dG = G * (2.0 - G) / 2; + return G; + case -5: + if ((1.0 + gamma) >= 0) { + G = sqrt(1.0 + gamma); + dG = 1.0 / (2.0 * G); + return G; + } else { + G = -sqrt(-1.0 - gamma); + dG = -1.0 / (2.0 * G); + return G; + } + } + dG = 1.0; + return 0.0; +} + +//----------------------------------------------------------------------------- +// Compute ZBL potential +// +double +MEAM::zbl(const double r, const int z1, const int z2) +{ + int i; + const double c[] = { 0.028171, 0.28022, 0.50986, 0.18175 }; + const double d[] = { 0.20162, 0.40290, 0.94229, 3.1998 }; + const double azero = 0.4685; + const double cc = 14.3997; + double a, x; + // azero = (9pi^2/128)^1/3 (0.529) Angstroms + a = azero / (pow(z1, 0.23) + pow(z2, 0.23)); + double result = 0.0; + x = r / a; + for (i = 0; i <= 3; i++) { + result = result + c[i] * MathSpecial::fm_exp(-d[i] * x); + } + if (r > 0.0) + result = result * z1 * z2 / r * cc; + return result; +} + +//----------------------------------------------------------------------------- +// Compute Rose energy function, I.16 +// +double +MEAM::erose(const double r, const double re, const double alpha, const double Ec, const double repuls, + const double attrac, const int form) +{ + double astar, a3; + double result = 0.0; + + if (r > 0.0) { + astar = alpha * (r / re - 1.0); + a3 = 0.0; + if (astar >= 0) + a3 = attrac; + else if (astar < 0) + a3 = repuls; + + if (form == 1) + result = -Ec * (1 + astar + (-attrac + repuls / r) * pow(astar, 3)) * MathSpecial::fm_exp(-astar); + else if (form == 2) + result = -Ec * (1 + astar + a3 * pow(astar, 3)) * MathSpecial::fm_exp(-astar); + else + result = -Ec * (1 + astar + a3 * pow(astar, 3) / (r / re)) * MathSpecial::fm_exp(-astar); + } + return result; +} + +//----------------------------------------------------------------------------- +// Shape factors for various configurations +// +void +MEAM::get_shpfcn(const lattice_t latt, double (&s)[3]) +{ + switch (latt) { + case FCC: + case BCC: + case B1: + case B2: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 0.0; + break; + case HCP: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 1.0 / 3.0; + break; + case DIA: + s[0] = 0.0; + s[1] = 0.0; + s[2] = 32.0 / 9.0; + break; + case DIM: + s[0] = 1.0; + s[1] = 2.0 / 3.0; + // s(3) = 1.d0 + s[2] = 0.40; + break; + default: + s[0] = 0.0; + // call error('Lattice not defined in get_shpfcn.') + } +} + +//----------------------------------------------------------------------------- +// Number of neighbors for the reference structure +// +int +MEAM::get_Zij(const lattice_t latt) +{ + switch (latt) { + case FCC: + return 12; + case BCC: + return 8; + case HCP: + return 12; + case B1: + return 6; + case DIA: + return 4; + case DIM: + return 1; + case C11: + return 10; + case L12: + return 12; + case B2: + return 8; + // call error('Lattice not defined in get_Zij.') + } + return 0; +} + +//----------------------------------------------------------------------------- +// Number of second neighbors for the reference structure +// a = distance ratio R1/R2 +// S = second neighbor screening function +// +int +MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, double& a, double& S) +{ + + double C, x, sijk; + int Zij2 = 0, numscr = 0; + + switch (latt) { + + case FCC: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case BCC: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + + case HCP: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case B1: + Zij2 = 12; + a = sqrt(2.0); + numscr = 2; + break; + + case DIA: + Zij2 = 0; + a = sqrt(8.0 / 3.0); + numscr = 4; + if (cmin < 0.500001) { + // call error('can not do 2NN MEAM for dia') + } + break; + + case DIM: + // this really shouldn't be allowed; make sure screening is zero + a = 1.0; + S = 0.0; + return 0; + + case L12: + Zij2 = 6; + a = sqrt(2.0); + numscr = 4; + break; + + case B2: + Zij2 = 6; + a = 2.0 / sqrt(3.0); + numscr = 4; + break; + case C11: + // unsupported lattice flag C11 in get_Zij + break; + default: + // unknown lattic flag in get Zij + // call error('Lattice not defined in get_Zij.') + break; + } + + // Compute screening for each first neighbor + C = 4.0 / (a * a) - 1.0; + x = (C - cmin) / (cmax - cmin); + sijk = fcut(x); + // There are numscr first neighbors screening the second neighbors + S = MathSpecial::powint(sijk, numscr); + return Zij2; +} diff --git a/src/USER-MEAMC/meam_impl.cpp b/src/USER-MEAMC/meam_impl.cpp new file mode 100644 index 000000000..25c53785e --- /dev/null +++ b/src/USER-MEAMC/meam_impl.cpp @@ -0,0 +1,72 @@ +/* ---------------------------------------------------------------------- + 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: Sebastian Hütter (OvGU) +------------------------------------------------------------------------- */ + +#include "meam.h" +#include "memory.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +MEAM::MEAM(Memory* mem) + : memory(mem) +{ + phir = phirar = phirar1 = phirar2 = phirar3 = phirar4 = phirar5 = phirar6 = NULL; + + nmax = 0; + rho = rho0 = rho1 = rho2 = rho3 = frhop = NULL; + gamma = dgamma1 = dgamma2 = dgamma3 = arho2b = NULL; + arho1 = arho2 = arho3 = arho3b = t_ave = tsq_ave = NULL; + + maxneigh = 0; + scrfcn = dscrfcn = fcpair = NULL; +} + +MEAM::~MEAM() +{ + memory->destroy(this->phirar6); + memory->destroy(this->phirar5); + memory->destroy(this->phirar4); + memory->destroy(this->phirar3); + memory->destroy(this->phirar2); + memory->destroy(this->phirar1); + memory->destroy(this->phirar); + memory->destroy(this->phir); + + memory->destroy(this->rho); + memory->destroy(this->rho0); + memory->destroy(this->rho1); + memory->destroy(this->rho2); + memory->destroy(this->rho3); + memory->destroy(this->frhop); + memory->destroy(this->gamma); + memory->destroy(this->dgamma1); + memory->destroy(this->dgamma2); + memory->destroy(this->dgamma3); + memory->destroy(this->arho2b); + + memory->destroy(this->arho1); + memory->destroy(this->arho2); + memory->destroy(this->arho3); + memory->destroy(this->arho3b); + memory->destroy(this->t_ave); + memory->destroy(this->tsq_ave); + + memory->destroy(this->scrfcn); + memory->destroy(this->dscrfcn); + memory->destroy(this->fcpair); +} diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp new file mode 100644 index 000000000..5ef659525 --- /dev/null +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -0,0 +1,792 @@ +#include "meam.h" +#include "math_special.h" +#include +using namespace LAMMPS_NS; + +void +MEAM::meam_setup_done(double* cutmax) +{ + int nv2, nv3, m, n, p; + + // Force cutoff + this->cutforce = this->rc_meam; + this->cutforcesq = this->cutforce * this->cutforce; + + // Pass cutoff back to calling program + *cutmax = this->cutforce; + + // Augment t1 term + for (int i = 0; i < maxelt; i++) + this->t1_meam[i] = this->t1_meam[i] + this->augt1 * 3.0 / 5.0 * this->t3_meam[i]; + + // Compute off-diagonal alloy parameters + alloyparams(); + + // indices and factors for Voight notation + nv2 = 0; + nv3 = 0; + for (m = 0; m < 3; m++) { + for (n = m; n < 3; n++) { + this->vind2D[m][n] = nv2; + this->vind2D[n][m] = nv2; + nv2 = nv2 + 1; + for (p = n; p < 3; p++) { + this->vind3D[m][n][p] = nv3; + this->vind3D[m][p][n] = nv3; + this->vind3D[n][m][p] = nv3; + this->vind3D[n][p][m] = nv3; + this->vind3D[p][m][n] = nv3; + this->vind3D[p][n][m] = nv3; + nv3 = nv3 + 1; + } + } + } + + this->v2D[0] = 1; + this->v2D[1] = 2; + this->v2D[2] = 2; + this->v2D[3] = 1; + this->v2D[4] = 2; + this->v2D[5] = 1; + + this->v3D[0] = 1; + this->v3D[1] = 3; + this->v3D[2] = 3; + this->v3D[3] = 3; + this->v3D[4] = 6; + this->v3D[5] = 3; + this->v3D[6] = 1; + this->v3D[7] = 3; + this->v3D[8] = 3; + this->v3D[9] = 1; + + nv2 = 0; + for (m = 0; m < this->neltypes; m++) { + for (n = m; n < this->neltypes; n++) { + this->eltind[m][n] = nv2; + this->eltind[n][m] = nv2; + nv2 = nv2 + 1; + } + } + + // Compute background densities for reference structure + compute_reference_density(); + + // Compute pair potentials and setup arrays for interpolation + this->nr = 1000; + this->dr = 1.1 * this->rc_meam / this->nr; + compute_pair_meam(); +} + +// ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc +// Fill off-diagonal alloy parameters +void +MEAM::alloyparams(void) +{ + + int i, j, k; + double eb; + + // Loop over pairs + for (i = 0; i < this->neltypes; i++) { + for (j = 0; j < this->neltypes; j++) { + // Treat off-diagonal pairs + // If i>j, set all equal to i j) { + this->re_meam[i][j] = this->re_meam[j][i]; + this->Ec_meam[i][j] = this->Ec_meam[j][i]; + this->alpha_meam[i][j] = this->alpha_meam[j][i]; + this->lattce_meam[i][j] = this->lattce_meam[j][i]; + this->nn2_meam[i][j] = this->nn2_meam[j][i]; + // If i i) { + if (iszero(this->Ec_meam[i][j])) { + if (this->lattce_meam[i][j] == L12) + this->Ec_meam[i][j] = + (3 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 4.0 - this->delta_meam[i][j]; + else if (this->lattce_meam[i][j] == C11) { + if (this->lattce_meam[i][i] == DIA) + this->Ec_meam[i][j] = + (2 * this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; + else + this->Ec_meam[i][j] = + (this->Ec_meam[i][i] + 2 * this->Ec_meam[j][j]) / 3.0 - this->delta_meam[i][j]; + } else + this->Ec_meam[i][j] = (this->Ec_meam[i][i] + this->Ec_meam[j][j]) / 2.0 - this->delta_meam[i][j]; + } + if (iszero(this->alpha_meam[i][j])) + this->alpha_meam[i][j] = (this->alpha_meam[i][i] + this->alpha_meam[j][j]) / 2.0; + if (iszero(this->re_meam[i][j])) + this->re_meam[i][j] = (this->re_meam[i][i] + this->re_meam[j][j]) / 2.0; + } + } + } + + // Cmin[i][k][j] is symmetric in i-j, but not k. For all triplets + // where i>j, set equal to the ineltypes; i++) { + for (j = 0; j < i; j++) { + for (k = 0; k < this->neltypes; k++) { + this->Cmin_meam[i][j][k] = this->Cmin_meam[j][i][k]; + this->Cmax_meam[i][j][k] = this->Cmax_meam[j][i][k]; + } + } + } + + // ebound gives the squared distance such that, for rik2 or rjk2>ebound, + // atom k definitely lies outside the screening function ellipse (so + // there is no need to calculate its effects). Here, compute it for all + // triplets [i][j][k] so that ebound[i][j] is the maximized over k + for (i = 0; i < this->neltypes; i++) { + for (j = 0; j < this->neltypes; j++) { + for (k = 0; k < this->neltypes; k++) { + eb = (this->Cmax_meam[i][j][k] * this->Cmax_meam[i][j][k]) / (4.0 * (this->Cmax_meam[i][j][k] - 1.0)); + this->ebound_meam[i][j] = std::max(this->ebound_meam[i][j], eb); + } + } + } +} + +//----------------------------------------------------------------------- +// compute MEAM pair potential for each pair of element types +// + +void +MEAM::compute_pair_meam(void) +{ + + double r /*ununsed:, temp*/; + int j, a, b, nv2; + double astar, frac, phizbl; + int n, nmax, Z1, Z2; + double arat, rarat, scrn, scrn2; + double phiaa, phibb /*unused:,phitmp*/; + double C, s111, s112, s221, S11, S22; + + // check for previously allocated arrays and free them + if (this->phir != NULL) + memory->destroy(this->phir); + if (this->phirar != NULL) + memory->destroy(this->phirar); + if (this->phirar1 != NULL) + memory->destroy(this->phirar1); + if (this->phirar2 != NULL) + memory->destroy(this->phirar2); + if (this->phirar3 != NULL) + memory->destroy(this->phirar3); + if (this->phirar4 != NULL) + memory->destroy(this->phirar4); + if (this->phirar5 != NULL) + memory->destroy(this->phirar5); + if (this->phirar6 != NULL) + memory->destroy(this->phirar6); + + // allocate memory for array that defines the potential + memory->create(this->phir, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phir"); + + // allocate coeff memory + + memory->create(this->phirar, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar"); + memory->create(this->phirar1, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar1"); + memory->create(this->phirar2, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar2"); + memory->create(this->phirar3, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar3"); + memory->create(this->phirar4, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar4"); + memory->create(this->phirar5, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar5"); + memory->create(this->phirar6, (this->neltypes * (this->neltypes + 1)) / 2, this->nr, "pair:phirar6"); + + // loop over pairs of element types + nv2 = 0; + for (a = 0; a < this->neltypes; a++) { + for (b = a; b < this->neltypes; b++) { + // loop over r values and compute + for (j = 0; j < this->nr; j++) { + r = j * this->dr; + + this->phir[nv2][j] = phi_meam(r, a, b); + + // if using second-nearest neighbor, solve recursive problem + // (see Lee and Baskes, PRB 62(13):8564 eqn.(21)) + if (this->nn2_meam[a][b] == 1) { + Z1 = get_Zij(this->lattce_meam[a][b]); + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], + this->Cmax_meam[a][a][b], arat, scrn); + + // The B1, B2, and L12 cases with NN2 have a trick to them; we + // need to + // compute the contributions from second nearest neighbors, like + // a-a + // pairs, but need to include NN2 contributions to those pairs as + // well. + if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 || + this->lattce_meam[a][b] == L12) { + rarat = r * arat; + + // phi_aa + phiaa = phi_meam(rarat, a, a); + Z1 = get_Zij(this->lattce_meam[a][a]); + Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); + nmax = 10; + if (scrn > 0.0) { + for (n = 1; n <= nmax; n++) { + phiaa = phiaa + pow((-Z2 * scrn / Z1), n) * phi_meam(rarat * pow(arat, n), a, a); + } + } + + // phi_bb + phibb = phi_meam(rarat, b, b); + Z1 = get_Zij(this->lattce_meam[b][b]); + Z2 = get_Zij2(this->lattce_meam[b][b], this->Cmin_meam[b][b][b], + this->Cmax_meam[b][b][b], arat, scrn); + nmax = 10; + if (scrn > 0.0) { + for (n = 1; n <= nmax; n++) { + phibb = phibb + pow((-Z2 * scrn / Z1), n) * phi_meam(rarat * pow(arat, n), b, b); + } + } + + if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2) { + // Add contributions to the B1 or B2 potential + Z1 = get_Zij(this->lattce_meam[a][b]); + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b], + this->Cmax_meam[a][a][b], arat, scrn); + this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn / (2 * Z1) * phiaa; + Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[b][b][a], + this->Cmax_meam[b][b][a], arat, scrn2); + this->phir[nv2][j] = this->phir[nv2][j] - Z2 * scrn2 / (2 * Z1) * phibb; + + } else if (this->lattce_meam[a][b] == L12) { + // The L12 case has one last trick; we have to be careful to + // compute + // the correct screening between 2nd-neighbor pairs. 1-1 + // second-neighbor pairs are screened by 2 type 1 atoms and + // two type + // 2 atoms. 2-2 second-neighbor pairs are screened by 4 type + // 1 + // atoms. + C = 1.0; + get_sijk(C, a, a, a, &s111); + get_sijk(C, a, a, b, &s112); + get_sijk(C, b, b, a, &s221); + S11 = s111 * s111 * s112 * s112; + S22 = pow(s221, 4); + this->phir[nv2][j] = this->phir[nv2][j] - 0.75 * S11 * phiaa - 0.25 * S22 * phibb; + } + + } else { + nmax = 10; + for (n = 1; n <= nmax; n++) { + this->phir[nv2][j] = + this->phir[nv2][j] + pow((-Z2 * scrn / Z1), n) * phi_meam(r * pow(arat, n), a, b); + } + } + } + + // For Zbl potential: + // if astar <= -3 + // potential is zbl potential + // else if -3 < astar < -1 + // potential is linear combination with zbl potential + // endif + if (this->zbl_meam[a][b] == 1) { + astar = this->alpha_meam[a][b] * (r / this->re_meam[a][b] - 1.0); + if (astar <= -3.0) + this->phir[nv2][j] = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); + else if (astar > -3.0 && astar < -1.0) { + frac = fcut(1 - (astar + 1.0) / (-3.0 + 1.0)); + phizbl = zbl(r, this->ielt_meam[a], this->ielt_meam[b]); + this->phir[nv2][j] = frac * this->phir[nv2][j] + (1 - frac) * phizbl; + } + } + } + + // call interpolation + interpolate_meam(nv2); + + nv2 = nv2 + 1; + } + } +} + +//----------------------------------------------------------------------c +// Compute MEAM pair potential for distance r, element types a and b +// +double +MEAM::phi_meam(double r, int a, int b) +{ + /*unused:double a1,a2,a12;*/ + double t11av, t21av, t31av, t12av, t22av, t32av; + double G1, G2, s1[3], s2[3], rho0_1, rho0_2; + double Gam1, Gam2, Z1, Z2; + double rhobar1, rhobar2, F1, F2; + double rho01, rho11, rho21, rho31; + double rho02, rho12, rho22, rho32; + double scalfac, phiaa, phibb; + double Eu; + double arat, scrn /*unused:,scrn2*/; + int Z12, errorflag; + int n, nmax, Z1nn, Z2nn; + lattice_t latta /*unused:,lattb*/; + double rho_bkgd1, rho_bkgd2; + + double phi_m = 0.0; + + // Equation numbers below refer to: + // I. Huang et.al., Modelling simul. Mater. Sci. Eng. 3:615 + + // get number of neighbors in the reference structure + // Nref[i][j] = # of i's neighbors of type j + Z12 = get_Zij(this->lattce_meam[a][b]); + + get_densref(r, a, b, &rho01, &rho11, &rho21, &rho31, &rho02, &rho12, &rho22, &rho32); + + // if densities are too small, numerical problems may result; just return zero + if (rho01 <= 1e-14 && rho02 <= 1e-14) + return 0.0; + + // calculate average weighting factors for the reference structure + if (this->lattce_meam[a][b] == C11) { + if (this->ialloy == 2) { + t11av = this->t1_meam[a]; + t12av = this->t1_meam[b]; + t21av = this->t2_meam[a]; + t22av = this->t2_meam[b]; + t31av = this->t3_meam[a]; + t32av = this->t3_meam[b]; + } else { + scalfac = 1.0 / (rho01 + rho02); + t11av = scalfac * (this->t1_meam[a] * rho01 + this->t1_meam[b] * rho02); + t12av = t11av; + t21av = scalfac * (this->t2_meam[a] * rho01 + this->t2_meam[b] * rho02); + t22av = t21av; + t31av = scalfac * (this->t3_meam[a] * rho01 + this->t3_meam[b] * rho02); + t32av = t31av; + } + } else { + // average weighting factors for the reference structure, eqn. I.8 + get_tavref(&t11av, &t21av, &t31av, &t12av, &t22av, &t32av, this->t1_meam[a], this->t2_meam[a], + this->t3_meam[a], this->t1_meam[b], this->t2_meam[b], this->t3_meam[b], r, a, b, + this->lattce_meam[a][b]); + } + + // for c11b structure, calculate background electron densities + if (this->lattce_meam[a][b] == C11) { + latta = this->lattce_meam[a][a]; + if (latta == DIA) { + rhobar1 = pow(((Z12 / 2) * (rho02 + rho01)), 2) + t11av * pow((rho12 - rho11), 2) + + t21av / 6.0 * pow(rho22 + rho21, 2) + 121.0 / 40.0 * t31av * pow((rho32 - rho31), 2); + rhobar1 = sqrt(rhobar1); + rhobar2 = pow(Z12 * rho01, 2) + 2.0 / 3.0 * t21av * pow(rho21, 2); + rhobar2 = sqrt(rhobar2); + } else { + rhobar2 = pow(((Z12 / 2) * (rho01 + rho02)), 2) + t12av * pow((rho11 - rho12), 2) + + t22av / 6.0 * pow(rho21 + rho22, 2) + 121.0 / 40.0 * t32av * pow((rho31 - rho32), 2); + rhobar2 = sqrt(rhobar2); + rhobar1 = pow(Z12 * rho02, 2) + 2.0 / 3.0 * t22av * pow(rho22, 2); + rhobar1 = sqrt(rhobar1); + } + } else { + // for other structures, use formalism developed in Huang's paper + // + // composition-dependent scaling, equation I.7 + // If using mixing rule for t, apply to reference structure; else + // use precomputed values + if (this->mix_ref_t == 1) { + Z1 = this->Z_meam[a]; + Z2 = this->Z_meam[b]; + if (this->ibar_meam[a] <= 0) + G1 = 1.0; + else { + get_shpfcn(this->lattce_meam[a][a], s1); + Gam1 = (s1[0] * t11av + s1[1] * t21av + s1[2] * t31av) / (Z1 * Z1); + G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); + } + if (this->ibar_meam[b] <= 0) + G2 = 1.0; + else { + get_shpfcn(this->lattce_meam[b][b], s2); + Gam2 = (s2[0] * t12av + s2[1] * t22av + s2[2] * t32av) / (Z2 * Z2); + G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); + } + rho0_1 = this->rho0_meam[a] * Z1 * G1; + rho0_2 = this->rho0_meam[b] * Z2 * G2; + } + Gam1 = (t11av * rho11 + t21av * rho21 + t31av * rho31); + if (rho01 < 1.0e-14) + Gam1 = 0.0; + else + Gam1 = Gam1 / (rho01 * rho01); + + Gam2 = (t12av * rho12 + t22av * rho22 + t32av * rho32); + if (rho02 < 1.0e-14) + Gam2 = 0.0; + else + Gam2 = Gam2 / (rho02 * rho02); + + G1 = G_gam(Gam1, this->ibar_meam[a], errorflag); + G2 = G_gam(Gam2, this->ibar_meam[b], errorflag); + if (this->mix_ref_t == 1) { + rho_bkgd1 = rho0_1; + rho_bkgd2 = rho0_2; + } else { + if (this->bkgd_dyn == 1) { + rho_bkgd1 = this->rho0_meam[a] * this->Z_meam[a]; + rho_bkgd2 = this->rho0_meam[b] * this->Z_meam[b]; + } else { + rho_bkgd1 = this->rho_ref_meam[a]; + rho_bkgd2 = this->rho_ref_meam[b]; + } + } + rhobar1 = rho01 / rho_bkgd1 * G1; + rhobar2 = rho02 / rho_bkgd2 * G2; + } + + // compute embedding functions, eqn I.5 + if (iszero(rhobar1)) + F1 = 0.0; + else { + if (this->emb_lin_neg == 1 && rhobar1 <= 0) + F1 = -this->A_meam[a] * this->Ec_meam[a][a] * rhobar1; + else + F1 = this->A_meam[a] * this->Ec_meam[a][a] * rhobar1 * log(rhobar1); + } + if (iszero(rhobar2)) + F2 = 0.0; + else { + if (this->emb_lin_neg == 1 && rhobar2 <= 0) + F2 = -this->A_meam[b] * this->Ec_meam[b][b] * rhobar2; + else + F2 = this->A_meam[b] * this->Ec_meam[b][b] * rhobar2 * log(rhobar2); + } + + // compute Rose function, I.16 + Eu = erose(r, this->re_meam[a][b], this->alpha_meam[a][b], this->Ec_meam[a][b], this->repuls_meam[a][b], + this->attrac_meam[a][b], this->erose_form); + + // calculate the pair energy + if (this->lattce_meam[a][b] == C11) { + latta = this->lattce_meam[a][a]; + if (latta == DIA) { + phiaa = phi_meam(r, a, a); + phi_m = (3 * Eu - F2 - 2 * F1 - 5 * phiaa) / Z12; + } else { + phibb = phi_meam(r, b, b); + phi_m = (3 * Eu - F1 - 2 * F2 - 5 * phibb) / Z12; + } + } else if (this->lattce_meam[a][b] == L12) { + phiaa = phi_meam(r, a, a); + // account for second neighbor a-a potential here... + Z1nn = get_Zij(this->lattce_meam[a][a]); + Z2nn = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); + nmax = 10; + if (scrn > 0.0) { + for (n = 1; n <= nmax; n++) { + phiaa = phiaa + pow((-Z2nn * scrn / Z1nn), n) * phi_meam(r * pow(arat, n), a, a); + } + } + phi_m = Eu / 3.0 - F1 / 4.0 - F2 / 12.0 - phiaa; + + } else { + // + // potential is computed from Rose function and embedding energy + phi_m = (2 * Eu - F1 - F2) / Z12; + // + } + + // if r = 0, just return 0 + if (iszero(r)) { + phi_m = 0.0; + } + + return phi_m; +} + +//----------------------------------------------------------------------c +// Compute background density for reference structure of each element +void +MEAM::compute_reference_density(void) +{ + int a, Z, Z2, errorflag; + double gam, Gbar, shp[3]; + double rho0, rho0_2nn, arat, scrn; + + // loop over element types + for (a = 0; a < this->neltypes; a++) { + Z = (int)this->Z_meam[a]; + if (this->ibar_meam[a] <= 0) + Gbar = 1.0; + else { + get_shpfcn(this->lattce_meam[a][a], shp); + gam = (this->t1_meam[a] * shp[0] + this->t2_meam[a] * shp[1] + this->t3_meam[a] * shp[2]) / (Z * Z); + Gbar = G_gam(gam, this->ibar_meam[a], errorflag); + } + + // The zeroth order density in the reference structure, with + // equilibrium spacing, is just the number of first neighbors times + // the rho0_meam coefficient... + rho0 = this->rho0_meam[a] * Z; + + // ...unless we have unscreened second neighbors, in which case we + // add on the contribution from those (accounting for partial + // screening) + if (this->nn2_meam[a][a] == 1) { + Z2 = get_Zij2(this->lattce_meam[a][a], this->Cmin_meam[a][a][a], + this->Cmax_meam[a][a][a], arat, scrn); + rho0_2nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * (arat - 1)); + rho0 = rho0 + Z2 * rho0_2nn * scrn; + } + + this->rho_ref_meam[a] = rho0 * Gbar; + } +} + +//------------------------------------------------------------------------------c +// Average weighting factors for the reference structure +void +MEAM::get_tavref(double* t11av, double* t21av, double* t31av, double* t12av, double* t22av, double* t32av, + double t11, double t21, double t31, double t12, double t22, double t32, double r, int a, + int b, lattice_t latt) +{ + double rhoa01, rhoa02, a1, a2, rho01 /*,rho02*/; + + // For ialloy = 2, no averaging is done + if (this->ialloy == 2) { + *t11av = t11; + *t21av = t21; + *t31av = t31; + *t12av = t12; + *t22av = t22; + *t32av = t32; + } else { + if (latt == FCC || latt == BCC || latt == DIA || latt == HCP || latt == B1 || latt == DIM || latt == B2) { + // all neighbors are of the opposite type + *t11av = t12; + *t21av = t22; + *t31av = t32; + *t12av = t11; + *t22av = t21; + *t32av = t31; + } else { + a1 = r / this->re_meam[a][a] - 1.0; + a2 = r / this->re_meam[b][b] - 1.0; + rhoa01 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); + rhoa02 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); + if (latt == L12) { + rho01 = 8 * rhoa01 + 4 * rhoa02; + *t11av = (8 * t11 * rhoa01 + 4 * t12 * rhoa02) / rho01; + *t12av = t11; + *t21av = (8 * t21 * rhoa01 + 4 * t22 * rhoa02) / rho01; + *t22av = t21; + *t31av = (8 * t31 * rhoa01 + 4 * t32 * rhoa02) / rho01; + *t32av = t31; + } else { + // call error('Lattice not defined in get_tavref.') + } + } + } +} + +//------------------------------------------------------------------------------c +void +MEAM::get_sijk(double C, int i, int j, int k, double* sijk) +{ + double x; + x = (C - this->Cmin_meam[i][j][k]) / (this->Cmax_meam[i][j][k] - this->Cmin_meam[i][j][k]); + *sijk = fcut(x); +} + +//------------------------------------------------------------------------------c +// Calculate density functions, assuming reference configuration +void +MEAM::get_densref(double r, int a, int b, double* rho01, double* rho11, double* rho21, double* rho31, + double* rho02, double* rho12, double* rho22, double* rho32) +{ + double a1, a2; + double s[3]; + lattice_t lat; + int Zij2nn; + double rhoa01nn, rhoa02nn; + double rhoa01, rhoa11, rhoa21, rhoa31; + double rhoa02, rhoa12, rhoa22, rhoa32; + double arat, scrn, denom; + double C, s111, s112, s221, S11, S22; + + a1 = r / this->re_meam[a][a] - 1.0; + a2 = r / this->re_meam[b][b] - 1.0; + + rhoa01 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); + rhoa11 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta1_meam[a] * a1); + rhoa21 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta2_meam[a] * a1); + rhoa31 = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta3_meam[a] * a1); + rhoa02 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); + rhoa12 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta1_meam[b] * a2); + rhoa22 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta2_meam[b] * a2); + rhoa32 = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta3_meam[b] * a2); + + lat = this->lattce_meam[a][b]; + + *rho11 = 0.0; + *rho21 = 0.0; + *rho31 = 0.0; + *rho12 = 0.0; + *rho22 = 0.0; + *rho32 = 0.0; + + if (lat == FCC) { + *rho01 = 12.0 * rhoa02; + *rho02 = 12.0 * rhoa01; + } else if (lat == BCC) { + *rho01 = 8.0 * rhoa02; + *rho02 = 8.0 * rhoa01; + } else if (lat == B1) { + *rho01 = 6.0 * rhoa02; + *rho02 = 6.0 * rhoa01; + } else if (lat == DIA) { + *rho01 = 4.0 * rhoa02; + *rho02 = 4.0 * rhoa01; + *rho31 = 32.0 / 9.0 * rhoa32 * rhoa32; + *rho32 = 32.0 / 9.0 * rhoa31 * rhoa31; + } else if (lat == HCP) { + *rho01 = 12 * rhoa02; + *rho02 = 12 * rhoa01; + *rho31 = 1.0 / 3.0 * rhoa32 * rhoa32; + *rho32 = 1.0 / 3.0 * rhoa31 * rhoa31; + } else if (lat == DIM) { + get_shpfcn(DIM, s); + *rho01 = rhoa02; + *rho02 = rhoa01; + *rho11 = s[0] * rhoa12 * rhoa12; + *rho12 = s[0] * rhoa11 * rhoa11; + *rho21 = s[1] * rhoa22 * rhoa22; + *rho22 = s[1] * rhoa21 * rhoa21; + *rho31 = s[2] * rhoa32 * rhoa32; + *rho32 = s[2] * rhoa31 * rhoa31; + } else if (lat == C11) { + *rho01 = rhoa01; + *rho02 = rhoa02; + *rho11 = rhoa11; + *rho12 = rhoa12; + *rho21 = rhoa21; + *rho22 = rhoa22; + *rho31 = rhoa31; + *rho32 = rhoa32; + } else if (lat == L12) { + *rho01 = 8 * rhoa01 + 4 * rhoa02; + *rho02 = 12 * rhoa01; + if (this->ialloy == 1) { + *rho21 = 8. / 3. * pow(rhoa21 * this->t2_meam[a] - rhoa22 * this->t2_meam[b], 2); + denom = 8 * rhoa01 * pow(this->t2_meam[a], 2) + 4 * rhoa02 * pow(this->t2_meam[b], 2); + if (denom > 0.) + *rho21 = *rho21 / denom * *rho01; + } else + *rho21 = 8. / 3. * (rhoa21 - rhoa22) * (rhoa21 - rhoa22); + } else if (lat == B2) { + *rho01 = 8.0 * rhoa02; + *rho02 = 8.0 * rhoa01; + } else { + // call error('Lattice not defined in get_densref.') + } + + if (this->nn2_meam[a][b] == 1) { + + Zij2nn = get_Zij2(lat, this->Cmin_meam[a][a][b], this->Cmax_meam[a][a][b], arat, scrn); + + a1 = arat * r / this->re_meam[a][a] - 1.0; + a2 = arat * r / this->re_meam[b][b] - 1.0; + + rhoa01nn = this->rho0_meam[a] * MathSpecial::fm_exp(-this->beta0_meam[a] * a1); + rhoa02nn = this->rho0_meam[b] * MathSpecial::fm_exp(-this->beta0_meam[b] * a2); + + if (lat == L12) { + // As usual, L12 thinks it's special; we need to be careful computing + // the screening functions + C = 1.0; + get_sijk(C, a, a, a, &s111); + get_sijk(C, a, a, b, &s112); + get_sijk(C, b, b, a, &s221); + S11 = s111 * s111 * s112 * s112; + S22 = pow(s221, 4); + *rho01 = *rho01 + 6 * S11 * rhoa01nn; + *rho02 = *rho02 + 6 * S22 * rhoa02nn; + + } else { + // For other cases, assume that second neighbor is of same type, + // first neighbor may be of different type + + *rho01 = *rho01 + Zij2nn * scrn * rhoa01nn; + + // Assume Zij2nn and arat don't depend on order, but scrn might + Zij2nn = get_Zij2(lat, this->Cmin_meam[b][b][a], this->Cmax_meam[b][b][a], arat, scrn); + *rho02 = *rho02 + Zij2nn * scrn * rhoa02nn; + } + } +} + + +void +MEAM::interpolate_meam(int ind) +{ + int j; + double drar; + + // map to coefficient space + + this->nrar = this->nr; + drar = this->dr; + this->rdrar = 1.0 / drar; + + // phir interp + for (j = 0; j < this->nrar; j++) { + this->phirar[ind][j] = this->phir[ind][j]; + } + this->phirar1[ind][0] = this->phirar[ind][1] - this->phirar[ind][0]; + this->phirar1[ind][1] = 0.5 * (this->phirar[ind][2] - this->phirar[ind][0]); + this->phirar1[ind][this->nrar - 2] = + 0.5 * (this->phirar[ind][this->nrar - 1] - this->phirar[ind][this->nrar - 3]); + this->phirar1[ind][this->nrar - 1] = 0.0; + for (j = 2; j < this->nrar - 2; j++) { + this->phirar1[ind][j] = ((this->phirar[ind][j - 2] - this->phirar[ind][j + 2]) + + 8.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j - 1])) / + 12.; + } + + for (j = 0; j < this->nrar - 1; j++) { + this->phirar2[ind][j] = 3.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]) - + 2.0 * this->phirar1[ind][j] - this->phirar1[ind][j + 1]; + this->phirar3[ind][j] = this->phirar1[ind][j] + this->phirar1[ind][j + 1] - + 2.0 * (this->phirar[ind][j + 1] - this->phirar[ind][j]); + } + this->phirar2[ind][this->nrar - 1] = 0.0; + this->phirar3[ind][this->nrar - 1] = 0.0; + + for (j = 0; j < this->nrar; j++) { + this->phirar4[ind][j] = this->phirar1[ind][j] / drar; + this->phirar5[ind][j] = 2.0 * this->phirar2[ind][j] / drar; + this->phirar6[ind][j] = 3.0 * this->phirar3[ind][j] / drar; + } +} + +//--------------------------------------------------------------------- +// Compute Rose energy function, I.16 +// +double +MEAM::compute_phi(double rij, int elti, int eltj) +{ + double pp; + int ind, kk; + + ind = this->eltind[elti][eltj]; + pp = rij * this->rdrar; + kk = (int)pp; + kk = std::min(kk, this->nrar - 2); + pp = pp - kk; + pp = std::min(pp, 1.0); + double result = + ((this->phirar3[ind][kk] * pp + this->phirar2[ind][kk]) * pp + this->phirar1[ind][kk]) * pp + + this->phirar[ind][kk]; + + return result; +} diff --git a/src/USER-MEAMC/meam_setup_global.cpp b/src/USER-MEAMC/meam_setup_global.cpp new file mode 100644 index 000000000..7062d5ebc --- /dev/null +++ b/src/USER-MEAMC/meam_setup_global.cpp @@ -0,0 +1,70 @@ +#include "meam.h" +#include +using namespace LAMMPS_NS; + +void +MEAM::meam_setup_global(int nelt, lattice_t* lat, double* z, int* ielement, double* atwt, double* alpha, + double* b0, double* b1, double* b2, double* b3, double* alat, double* esub, + double* asub, double* t0, double* t1, double* t2, double* t3, double* rozero, + int* ibar) +{ + + int i; + double tmplat[maxelt]; + + this->neltypes = nelt; + + for (i = 0; i < nelt; i++) { + this->lattce_meam[i][i] = lat[i]; + + this->Z_meam[i] = z[i]; + this->ielt_meam[i] = ielement[i]; + this->alpha_meam[i][i] = alpha[i]; + this->beta0_meam[i] = b0[i]; + this->beta1_meam[i] = b1[i]; + this->beta2_meam[i] = b2[i]; + this->beta3_meam[i] = b3[i]; + tmplat[i] = alat[i]; + this->Ec_meam[i][i] = esub[i]; + this->A_meam[i] = asub[i]; + this->t0_meam[i] = t0[i]; + this->t1_meam[i] = t1[i]; + this->t2_meam[i] = t2[i]; + this->t3_meam[i] = t3[i]; + this->rho0_meam[i] = rozero[i]; + this->ibar_meam[i] = ibar[i]; + + if (this->lattce_meam[i][i] == FCC) + this->re_meam[i][i] = tmplat[i] / sqrt(2.0); + else if (this->lattce_meam[i][i] == BCC) + this->re_meam[i][i] = tmplat[i] * sqrt(3.0) / 2.0; + else if (this->lattce_meam[i][i] == HCP) + this->re_meam[i][i] = tmplat[i]; + else if (this->lattce_meam[i][i] == DIM) + this->re_meam[i][i] = tmplat[i]; + else if (this->lattce_meam[i][i] == DIA) + this->re_meam[i][i] = tmplat[i] * sqrt(3.0) / 4.0; + else { + // error + } + } + + // Set some defaults + this->rc_meam = 4.0; + this->delr_meam = 0.1; + setall2d(this->attrac_meam, 0.0); + setall2d(this->repuls_meam, 0.0); + setall3d(this->Cmax_meam, 2.8); + setall3d(this->Cmin_meam, 2.0); + setall2d(this->ebound_meam, pow(2.8, 2) / (4.0 * (2.8 - 1.0))); + setall2d(this->delta_meam, 0.0); + setall2d(this->nn2_meam, 0); + setall2d(this->zbl_meam, 1); + this->gsmooth_factor = 99.0; + this->augt1 = 1; + this->ialloy = 0; + this->mix_ref_t = 0; + this->emb_lin_neg = 0; + this->bkgd_dyn = 0; + this->erose_form = 0; +} diff --git a/src/USER-MEAMC/meam_setup_param.cpp b/src/USER-MEAMC/meam_setup_param.cpp new file mode 100644 index 000000000..585b5b571 --- /dev/null +++ b/src/USER-MEAMC/meam_setup_param.cpp @@ -0,0 +1,209 @@ +#include "meam.h" +#include +using namespace LAMMPS_NS; + +// +// do a sanity check on index parameters +void +MEAM::meam_checkindex(int num, int lim, int nidx, int* idx /*idx(3)*/, int* ierr) +{ + //: idx[0..2] + *ierr = 0; + if (nidx < num) { + *ierr = 2; + return; + } + + for (int i = 0; i < num; i++) { + if ((idx[i] < 0) || (idx[i] >= lim)) { + *ierr = 3; + return; + } + } +} + +// The "which" argument corresponds to the index of the "keyword" array +// in pair_meam.cpp: +// +// 0 = Ec_meam +// 1 = alpha_meam +// 2 = rho0_meam +// 3 = delta_meam +// 4 = lattce_meam +// 5 = attrac_meam +// 6 = repuls_meam +// 7 = nn2_meam +// 8 = Cmin_meam +// 9 = Cmax_meam +// 10 = rc_meam +// 11 = delr_meam +// 12 = augt1 +// 13 = gsmooth_factor +// 14 = re_meam +// 15 = ialloy +// 16 = mixture_ref_t +// 17 = erose_form +// 18 = zbl_meam +// 19 = emb_lin_neg +// 20 = bkgd_dyn + +void +MEAM::meam_setup_param(int which, double value, int nindex, int* index /*index(3)*/, int* errorflag) +{ + //: index[0..2] + int i1, i2; + lattice_t vlat; + *errorflag = 0; + + switch (which) { + // 0 = Ec_meam + case 0: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->Ec_meam[index[0]][index[1]] = value; + break; + + // 1 = alpha_meam + case 1: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->alpha_meam[index[0]][index[1]] = value; + break; + + // 2 = rho0_meam + case 2: + meam_checkindex(1, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->rho0_meam[index[0]] = value; + break; + + // 3 = delta_meam + case 3: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->delta_meam[index[0]][index[1]] = value; + break; + + // 4 = lattce_meam + case 4: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + vlat = (lattice_t)value; + + this->lattce_meam[index[0]][index[1]] = vlat; + break; + + // 5 = attrac_meam + case 5: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->attrac_meam[index[0]][index[1]] = value; + break; + + // 6 = repuls_meam + case 6: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->repuls_meam[index[0]][index[1]] = value; + break; + + // 7 = nn2_meam + case 7: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + i1 = std::min(index[0], index[1]); + i2 = std::max(index[0], index[1]); + this->nn2_meam[i1][i2] = (int)value; + break; + + // 8 = Cmin_meam + case 8: + meam_checkindex(3, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->Cmin_meam[index[0]][index[1]][index[2]] = value; + break; + + // 9 = Cmax_meam + case 9: + meam_checkindex(3, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->Cmax_meam[index[0]][index[1]][index[2]] = value; + break; + + // 10 = rc_meam + case 10: + this->rc_meam = value; + break; + + // 11 = delr_meam + case 11: + this->delr_meam = value; + break; + + // 12 = augt1 + case 12: + this->augt1 = (int)value; + break; + + // 13 = gsmooth + case 13: + this->gsmooth_factor = value; + break; + + // 14 = re_meam + case 14: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + this->re_meam[index[0]][index[1]] = value; + break; + + // 15 = ialloy + case 15: + this->ialloy = (int)value; + break; + + // 16 = mixture_ref_t + case 16: + this->mix_ref_t = (int)value; + break; + + // 17 = erose_form + case 17: + this->erose_form = (int)value; + break; + + // 18 = zbl_meam + case 18: + meam_checkindex(2, neltypes, nindex, index, errorflag); + if (*errorflag != 0) + return; + i1 = std::min(index[0], index[1]); + i2 = std::max(index[0], index[1]); + this->zbl_meam[i1][i2] = (int)value; + break; + + // 19 = emb_lin_neg + case 19: + this->emb_lin_neg = (int)value; + break; + + // 20 = bkgd_dyn + case 20: + this->bkgd_dyn = (int)value; + break; + + default: + *errorflag = 1; + } +} diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp new file mode 100644 index 000000000..e35c54352 --- /dev/null +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -0,0 +1,782 @@ +/* ---------------------------------------------------------------------- + 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: Greg Wagner (SNL) +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +#include "meam.h" +#include "pair_meamc.h" +#include "atom.h" +#include "force.h" +#include "comm.h" +#include "memory.h" +#include "neighbor.h" +#include "neigh_list.h" +#include "neigh_request.h" +#include "memory.h" +#include "error.h" + +using namespace LAMMPS_NS; + +#define MAXLINE 1024 + +static const int nkeywords = 21; +static const char *keywords[] = { + "Ec","alpha","rho0","delta","lattce", + "attrac","repuls","nn2","Cmin","Cmax","rc","delr", + "augt1","gsmooth_factor","re","ialloy", + "mixture_ref_t","erose_form","zbl", + "emb_lin_neg","bkgd_dyn"}; + +/* ---------------------------------------------------------------------- */ + +PairMEAMC::PairMEAMC(LAMMPS *lmp) : Pair(lmp) +{ + single_enable = 0; + restartinfo = 0; + one_coeff = 1; + manybody_flag = 1; + + allocated = 0; + + nelements = 0; + elements = NULL; + mass = NULL; + meam_inst = new MEAM(memory); + + // set comm size needed by this Pair + + comm_forward = 38; + comm_reverse = 30; +} + +/* ---------------------------------------------------------------------- + free all arrays + check if allocated, since class can be destructed when incomplete +------------------------------------------------------------------------- */ + +PairMEAMC::~PairMEAMC() +{ + delete meam_inst; + + for (int i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + delete [] mass; + + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + delete [] map; + } +} + +/* ---------------------------------------------------------------------- */ + +void PairMEAMC::compute(int eflag, int vflag) +{ + int i,ii,n,inum_half,errorflag; + int *ilist_half,*numneigh_half,**firstneigh_half; + int *numneigh_full,**firstneigh_full; + + if (eflag || vflag) ev_setup(eflag,vflag); + else evflag = vflag_fdotr = eflag_global = vflag_global = + eflag_atom = vflag_atom = 0; + + // neighbor list info + + inum_half = listhalf->inum; + ilist_half = listhalf->ilist; + numneigh_half = listhalf->numneigh; + firstneigh_half = listhalf->firstneigh; + numneigh_full = listfull->numneigh; + firstneigh_full = listfull->firstneigh; + + // strip neighbor lists of any special bond flags before using with MEAM + // necessary before doing neigh_f2c and neigh_c2f conversions each step + + if (neighbor->ago == 0) { + neigh_strip(inum_half,ilist_half,numneigh_half,firstneigh_half); + neigh_strip(inum_half,ilist_half,numneigh_full,firstneigh_full); + } + + // check size of scrfcn based on half neighbor list + + int nlocal = atom->nlocal; + int nall = nlocal + atom->nghost; + + n = 0; + for (ii = 0; ii < inum_half; ii++) n += numneigh_half[ilist_half[ii]]; + + meam_inst->meam_dens_setup(atom->nmax, nall, n); + + double **x = atom->x; + double **f = atom->f; + int *type = atom->type; + int ntype = atom->ntypes; + + // 3 stages of MEAM calculation + // loop over my atoms followed by communication + + int offset = 0; + errorflag = 0; + + for (ii = 0; ii < inum_half; ii++) { + i = ilist_half[ii]; + meam_inst->meam_dens_init(i,ntype,type,map,x, + numneigh_half[i],firstneigh_half[i], + numneigh_full[i],firstneigh_full[i], + offset); + offset += numneigh_half[i]; + } + + comm->reverse_comm_pair(this); + + meam_inst->meam_dens_final(nlocal,eflag_either,eflag_global,eflag_atom, + &eng_vdwl,eatom,ntype,type,map,errorflag); + if (errorflag) { + char str[128]; + sprintf(str,"MEAM library error %d",errorflag); + error->one(FLERR,str); + } + + comm->forward_comm_pair(this); + + offset = 0; + + // vptr is first value in vatom if it will be used by meam_force() + // else vatom may not exist, so pass dummy ptr + + double **vptr; + if (vflag_atom) vptr = vatom; + else vptr = NULL; + + for (ii = 0; ii < inum_half; ii++) { + i = ilist_half[ii]; + meam_inst->meam_force(i,eflag_either,eflag_global,eflag_atom, + vflag_atom,&eng_vdwl,eatom,ntype,type,map,x, + numneigh_half[i],firstneigh_half[i], + numneigh_full[i],firstneigh_full[i], + offset,f,vptr); + offset += numneigh_half[i]; + } + + if (vflag_fdotr) virial_fdotr_compute(); +} + +/* ---------------------------------------------------------------------- */ + +void PairMEAMC::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 PairMEAMC::settings(int narg, char **arg) +{ + if (narg != 0) error->all(FLERR,"Illegal pair_style command"); +} + +/* ---------------------------------------------------------------------- + set coeffs for one or more type pairs +------------------------------------------------------------------------- */ + +void PairMEAMC::coeff(int narg, char **arg) +{ + int i,j,m,n; + + if (!allocated) allocate(); + + if (narg < 6) 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 MEAM element names between 2 filenames + // nelements = # of MEAM elements + // elements = list of unique element names + + if (nelements) { + for (i = 0; i < nelements; i++) delete [] elements[i]; + delete [] elements; + delete [] mass; + } + nelements = narg - 4 - atom->ntypes; + if (nelements < 1) error->all(FLERR,"Incorrect args for pair coefficients"); + elements = new char*[nelements]; + mass = new double[nelements]; + + for (i = 0; i < nelements; i++) { + n = strlen(arg[i+3]) + 1; + elements[i] = new char[n]; + strcpy(elements[i],arg[i+3]); + } + + // read MEAM library and parameter files + // pass all parameters to MEAM package + // tell MEAM package that setup is done + + read_files(arg[2],arg[2+nelements+1]); + meam_inst->meam_setup_done(&cutmax); + + // read args that map atom types to MEAM elements + // map[i] = which element the Ith atom type is, -1 if not mapped + + for (i = 4 + nelements; i < narg; i++) { + m = i - (4+nelements) + 1; + for (j = 0; j < nelements; j++) + if (strcmp(arg[i],elements[j]) == 0) break; + if (j < nelements) map[m] = j; + else if (strcmp(arg[i],"NULL") == 0) map[m] = -1; + else error->all(FLERR,"Incorrect args for pair coefficients"); + } + + // 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 + // set mass for i,i in atom class + + 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; + if (i == j) atom->set_mass(FLERR,i,mass[map[i]]); + count++; + } + + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); +} + +/* ---------------------------------------------------------------------- + init specific to this pair style +------------------------------------------------------------------------- */ + +void PairMEAMC::init_style() +{ + if (force->newton_pair == 0) + error->all(FLERR,"Pair style MEAM requires newton pair on"); + + // need full and half neighbor list + + int irequest_full = neighbor->request(this,instance_me); + neighbor->requests[irequest_full]->id = 1; + neighbor->requests[irequest_full]->half = 0; + neighbor->requests[irequest_full]->full = 1; + int irequest_half = neighbor->request(this,instance_me); + neighbor->requests[irequest_half]->id = 2; +} + +/* ---------------------------------------------------------------------- + neighbor callback to inform pair style of neighbor list to use + half or full +------------------------------------------------------------------------- */ + +void PairMEAMC::init_list(int id, NeighList *ptr) +{ + if (id == 1) listfull = ptr; + else if (id == 2) listhalf = ptr; +} + +/* ---------------------------------------------------------------------- + init for one type pair i,j and corresponding j,i +------------------------------------------------------------------------- */ + +double PairMEAMC::init_one(int i, int j) +{ + return cutmax; +} + +/* ---------------------------------------------------------------------- */ + +void PairMEAMC::read_files(char *globalfile, char *userfile) +{ + // open global meamf file on proc 0 + + FILE *fp; + if (comm->me == 0) { + fp = force->open_potential(globalfile); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open MEAM potential file %s",globalfile); + error->one(FLERR,str); + } + } + + // allocate parameter arrays + + int params_per_line = 19; + + lattice_t *lat = new lattice_t[nelements]; + int *ielement = new int[nelements]; + int *ibar = new int[nelements]; + double *z = new double[nelements]; + double *atwt = new double[nelements]; + double *alpha = new double[nelements]; + double *b0 = new double[nelements]; + double *b1 = new double[nelements]; + double *b2 = new double[nelements]; + double *b3 = new double[nelements]; + double *alat = new double[nelements]; + double *esub = new double[nelements]; + double *asub = new double[nelements]; + double *t0 = new double[nelements]; + double *t1 = new double[nelements]; + double *t2 = new double[nelements]; + double *t3 = new double[nelements]; + double *rozero = new double[nelements]; + + bool *found = new bool[nelements]; + for (int i = 0; i < nelements; i++) found[i] = false; + + // read each set of params from global MEAM file + // one set of params can span multiple lines + // store params if element name is in element list + // if element name appears multiple times, only store 1st entry + + int i,n,nwords; + char **words = new char*[params_per_line+1]; + char line[MAXLINE],*ptr; + int eof = 0; + + int nset = 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 MEAM potential file"); + + // words = ptrs to all words in line + // strip single and double quotes from words + + nwords = 0; + words[nwords++] = strtok(line,"' \t\n\r\f"); + while ((words[nwords++] = strtok(NULL,"' \t\n\r\f"))) continue; + + // skip if element name isn't in element list + + for (i = 0; i < nelements; i++) + if (strcmp(words[0],elements[i]) == 0) break; + if (i >= nelements) continue; + + // skip if element already appeared + + if (found[i] == true) continue; + found[i] = true; + + // map lat string to an integer + + if (strcmp(words[1],"fcc") == 0) lat[i] = FCC; + else if (strcmp(words[1],"bcc") == 0) lat[i] = BCC; + else if (strcmp(words[1],"hcp") == 0) lat[i] = HCP; + else if (strcmp(words[1],"dim") == 0) lat[i] = DIM; + else if (strcmp(words[1],"dia") == 0) lat[i] = DIA; + else error->all(FLERR,"Unrecognized lattice type in MEAM file 1"); + + // store parameters + + z[i] = atof(words[2]); + ielement[i] = atoi(words[3]); + atwt[i] = atof(words[4]); + alpha[i] = atof(words[5]); + b0[i] = atof(words[6]); + b1[i] = atof(words[7]); + b2[i] = atof(words[8]); + b3[i] = atof(words[9]); + alat[i] = atof(words[10]); + esub[i] = atof(words[11]); + asub[i] = atof(words[12]); + t0[i] = atof(words[13]); + t1[i] = atof(words[14]); + t2[i] = atof(words[15]); + t3[i] = atof(words[16]); + rozero[i] = atof(words[17]); + ibar[i] = atoi(words[18]); + + nset++; + } + + // error if didn't find all elements in file + + if (nset != nelements) + error->all(FLERR,"Did not find all elements in MEAM library file"); + + // pass element parameters to MEAM package + + meam_inst->meam_setup_global(nelements,lat,z,ielement,atwt,alpha,b0,b1,b2,b3, + alat,esub,asub,t0,t1,t2,t3,rozero,ibar); + + // set element masses + + for (i = 0; i < nelements; i++) mass[i] = atwt[i]; + + // clean-up memory + + delete [] words; + + delete [] lat; + delete [] ielement; + delete [] ibar; + delete [] z; + delete [] atwt; + delete [] alpha; + delete [] b0; + delete [] b1; + delete [] b2; + delete [] b3; + delete [] alat; + delete [] esub; + delete [] asub; + delete [] t0; + delete [] t1; + delete [] t2; + delete [] t3; + delete [] rozero; + delete [] found; + + // done if user param file is NULL + + if (strcmp(userfile,"NULL") == 0) return; + + // open user param file on proc 0 + + if (comm->me == 0) { + fp = force->open_potential(userfile); + if (fp == NULL) { + char str[128]; + sprintf(str,"Cannot open MEAM potential file %s",userfile); + error->one(FLERR,str); + } + } + + // read settings + // pass them one at a time to MEAM package + // match strings to list of corresponding ints + + int which; + double value; + int nindex,index[3]; + int maxparams = 6; + char **params = new char*[maxparams]; + int nparams; + + 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'; + nparams = atom->count_words(line); + if (nparams == 0) continue; + + // words = ptrs to all words in line + + nparams = 0; + params[nparams++] = strtok(line,"=(), '\t\n\r\f"); + while (nparams < maxparams && + (params[nparams++] = strtok(NULL,"=(), '\t\n\r\f"))) + continue; + nparams--; + + for (which = 0; which < nkeywords; which++) + if (strcmp(params[0],keywords[which]) == 0) break; + if (which == nkeywords) { + char str[128]; + sprintf(str,"Keyword %s in MEAM parameter file not recognized", + params[0]); + error->all(FLERR,str); + } + nindex = nparams - 2; + for (i = 0; i < nindex; i++) index[i] = atoi(params[i+1]) - 1; + + // map lattce_meam value to an integer + + if (which == 4) { + if (strcmp(params[nparams-1],"fcc") == 0) value = FCC; + else if (strcmp(params[nparams-1],"bcc") == 0) value = BCC; + else if (strcmp(params[nparams-1],"hcp") == 0) value = HCP; + else if (strcmp(params[nparams-1],"dim") == 0) value = DIM; + else if (strcmp(params[nparams-1],"dia") == 0) value = DIA; + else if (strcmp(params[nparams-1],"b1") == 0) value = B1; + else if (strcmp(params[nparams-1],"c11") == 0) value = C11; + else if (strcmp(params[nparams-1],"l12") == 0) value = L12; + else if (strcmp(params[nparams-1],"b2") == 0) value = B2; + else error->all(FLERR,"Unrecognized lattice type in MEAM file 2"); + } + else value = atof(params[nparams-1]); + + // pass single setting to MEAM package + + int errorflag = 0; + meam_inst->meam_setup_param(which,value,nindex,index,&errorflag); + if (errorflag) { + char str[128]; + sprintf(str,"MEAM library error %d",errorflag); + error->all(FLERR,str); + } + } + + delete [] params; +} + +/* ---------------------------------------------------------------------- */ + +int PairMEAMC::pack_forward_comm(int n, int *list, double *buf, + int pbc_flag, int *pbc) +{ + int i,j,k,m; + + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + buf[m++] = meam_inst->rho0[j]; + buf[m++] = meam_inst->rho1[j]; + buf[m++] = meam_inst->rho2[j]; + buf[m++] = meam_inst->rho3[j]; + buf[m++] = meam_inst->frhop[j]; + buf[m++] = meam_inst->gamma[j]; + buf[m++] = meam_inst->dgamma1[j]; + buf[m++] = meam_inst->dgamma2[j]; + buf[m++] = meam_inst->dgamma3[j]; + buf[m++] = meam_inst->arho2b[j]; + buf[m++] = meam_inst->arho1[j][0]; + buf[m++] = meam_inst->arho1[j][1]; + buf[m++] = meam_inst->arho1[j][2]; + buf[m++] = meam_inst->arho2[j][0]; + buf[m++] = meam_inst->arho2[j][1]; + buf[m++] = meam_inst->arho2[j][2]; + buf[m++] = meam_inst->arho2[j][3]; + buf[m++] = meam_inst->arho2[j][4]; + buf[m++] = meam_inst->arho2[j][5]; + for (k = 0; k < 10; k++) buf[m++] = meam_inst->arho3[j][k]; + buf[m++] = meam_inst->arho3b[j][0]; + buf[m++] = meam_inst->arho3b[j][1]; + buf[m++] = meam_inst->arho3b[j][2]; + buf[m++] = meam_inst->t_ave[j][0]; + buf[m++] = meam_inst->t_ave[j][1]; + buf[m++] = meam_inst->t_ave[j][2]; + buf[m++] = meam_inst->tsq_ave[j][0]; + buf[m++] = meam_inst->tsq_ave[j][1]; + buf[m++] = meam_inst->tsq_ave[j][2]; + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairMEAMC::unpack_forward_comm(int n, int first, double *buf) +{ + int i,k,m,last; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + meam_inst->rho0[i] = buf[m++]; + meam_inst->rho1[i] = buf[m++]; + meam_inst->rho2[i] = buf[m++]; + meam_inst->rho3[i] = buf[m++]; + meam_inst->frhop[i] = buf[m++]; + meam_inst->gamma[i] = buf[m++]; + meam_inst->dgamma1[i] = buf[m++]; + meam_inst->dgamma2[i] = buf[m++]; + meam_inst->dgamma3[i] = buf[m++]; + meam_inst->arho2b[i] = buf[m++]; + meam_inst->arho1[i][0] = buf[m++]; + meam_inst->arho1[i][1] = buf[m++]; + meam_inst->arho1[i][2] = buf[m++]; + meam_inst->arho2[i][0] = buf[m++]; + meam_inst->arho2[i][1] = buf[m++]; + meam_inst->arho2[i][2] = buf[m++]; + meam_inst->arho2[i][3] = buf[m++]; + meam_inst->arho2[i][4] = buf[m++]; + meam_inst->arho2[i][5] = buf[m++]; + for (k = 0; k < 10; k++) meam_inst->arho3[i][k] = buf[m++]; + meam_inst->arho3b[i][0] = buf[m++]; + meam_inst->arho3b[i][1] = buf[m++]; + meam_inst->arho3b[i][2] = buf[m++]; + meam_inst->t_ave[i][0] = buf[m++]; + meam_inst->t_ave[i][1] = buf[m++]; + meam_inst->t_ave[i][2] = buf[m++]; + meam_inst->tsq_ave[i][0] = buf[m++]; + meam_inst->tsq_ave[i][1] = buf[m++]; + meam_inst->tsq_ave[i][2] = buf[m++]; + } +} + +/* ---------------------------------------------------------------------- */ + +int PairMEAMC::pack_reverse_comm(int n, int first, double *buf) +{ + int i,k,m,last; + + m = 0; + last = first + n; + for (i = first; i < last; i++) { + buf[m++] = meam_inst->rho0[i]; + buf[m++] = meam_inst->arho2b[i]; + buf[m++] = meam_inst->arho1[i][0]; + buf[m++] = meam_inst->arho1[i][1]; + buf[m++] = meam_inst->arho1[i][2]; + buf[m++] = meam_inst->arho2[i][0]; + buf[m++] = meam_inst->arho2[i][1]; + buf[m++] = meam_inst->arho2[i][2]; + buf[m++] = meam_inst->arho2[i][3]; + buf[m++] = meam_inst->arho2[i][4]; + buf[m++] = meam_inst->arho2[i][5]; + for (k = 0; k < 10; k++) buf[m++] = meam_inst->arho3[i][k]; + buf[m++] = meam_inst->arho3b[i][0]; + buf[m++] = meam_inst->arho3b[i][1]; + buf[m++] = meam_inst->arho3b[i][2]; + buf[m++] = meam_inst->t_ave[i][0]; + buf[m++] = meam_inst->t_ave[i][1]; + buf[m++] = meam_inst->t_ave[i][2]; + buf[m++] = meam_inst->tsq_ave[i][0]; + buf[m++] = meam_inst->tsq_ave[i][1]; + buf[m++] = meam_inst->tsq_ave[i][2]; + } + + return m; +} + +/* ---------------------------------------------------------------------- */ + +void PairMEAMC::unpack_reverse_comm(int n, int *list, double *buf) +{ + int i,j,k,m; + + m = 0; + for (i = 0; i < n; i++) { + j = list[i]; + meam_inst->rho0[j] += buf[m++]; + meam_inst->arho2b[j] += buf[m++]; + meam_inst->arho1[j][0] += buf[m++]; + meam_inst->arho1[j][1] += buf[m++]; + meam_inst->arho1[j][2] += buf[m++]; + meam_inst->arho2[j][0] += buf[m++]; + meam_inst->arho2[j][1] += buf[m++]; + meam_inst->arho2[j][2] += buf[m++]; + meam_inst->arho2[j][3] += buf[m++]; + meam_inst->arho2[j][4] += buf[m++]; + meam_inst->arho2[j][5] += buf[m++]; + for (k = 0; k < 10; k++) meam_inst->arho3[j][k] += buf[m++]; + meam_inst->arho3b[j][0] += buf[m++]; + meam_inst->arho3b[j][1] += buf[m++]; + meam_inst->arho3b[j][2] += buf[m++]; + meam_inst->t_ave[j][0] += buf[m++]; + meam_inst->t_ave[j][1] += buf[m++]; + meam_inst->t_ave[j][2] += buf[m++]; + meam_inst->tsq_ave[j][0] += buf[m++]; + meam_inst->tsq_ave[j][1] += buf[m++]; + meam_inst->tsq_ave[j][2] += buf[m++]; + } +} + +/* ---------------------------------------------------------------------- + memory usage of local atom-based arrays +------------------------------------------------------------------------- */ + +double PairMEAMC::memory_usage() +{ + double bytes = 11 * meam_inst->nmax * sizeof(double); + bytes += (3 + 6 + 10 + 3 + 3 + 3) * meam_inst->nmax * sizeof(double); + bytes += 3 * meam_inst->maxneigh * sizeof(double); + return bytes; +} + +/* ---------------------------------------------------------------------- + strip special bond flags from neighbor list entries + are not used with MEAM + need to do here so Fortran lib doesn't see them + done once per reneighbor so that neigh_f2c and neigh_c2f don't see them +------------------------------------------------------------------------- */ + +void PairMEAMC::neigh_strip(int inum, int *ilist, + int *numneigh, int **firstneigh) +{ + int i,j,ii,jnum; + int *jlist; + + for (ii = 0; ii < inum; ii++) { + i = ilist[ii]; + jlist = firstneigh[i]; + jnum = numneigh[i]; + for (j = 0; j < jnum; j++) jlist[j] &= NEIGHMASK; + } +} diff --git a/src/USER-MEAMC/pair_meamc.h b/src/USER-MEAMC/pair_meamc.h new file mode 100644 index 000000000..476a70dd0 --- /dev/null +++ b/src/USER-MEAMC/pair_meamc.h @@ -0,0 +1,112 @@ +/* -*- c++ -*- ---------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PAIR_CLASS + +PairStyle(meam/c,PairMEAMC) + +#else + +#ifndef LMP_PAIR_MEAMC_H +#define LMP_PAIR_MEAMC_H + +#include "pair.h" + +namespace LAMMPS_NS { +class MEAM; + +class PairMEAMC : public Pair { + public: + PairMEAMC(class LAMMPS *); + ~PairMEAMC(); + void compute(int, int); + void settings(int, char **); + void coeff(int, char **); + void init_style(); + void init_list(int, class NeighList *); + double init_one(int, int); + + int pack_forward_comm(int, int *, double *, int, int *); + void unpack_forward_comm(int, int, double *); + int pack_reverse_comm(int, int, double *); + void unpack_reverse_comm(int, int *, double *); + double memory_usage(); + + private: + class MEAM *meam_inst; + double cutmax; // max cutoff for all elements + int nelements; // # of unique elements + char **elements; // names of unique elements + double *mass; // mass of each element + + int *map; // mapping from atom types (1-indexed) to elements (1-indexed) + + void allocate(); + void read_files(char *, char *); + void neigh_strip(int, int *, int *, int **); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: MEAM library error %d + +A call to the MEAM Fortran library returned an error. + +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 MEAM requires newton pair on + +See the newton command. This is a restriction to use the MEAM +potential. + +E: Cannot open MEAM potential file %s + +The specified MEAM potential file cannot be opened. Check that the +path and name are correct. + +E: Incorrect format in MEAM potential file + +Incorrect number of words per line in the potential file. + +E: Unrecognized lattice type in MEAM file 1 + +The lattice type in an entry of the MEAM library file is not +valid. + +E: Did not find all elements in MEAM library file + +The requested elements were not found in the MEAM file. + +E: Keyword %s in MEAM parameter file not recognized + +Self-explanatory. + +E: Unrecognized lattice type in MEAM file 2 + +The lattice type in an entry of the MEAM parameter file is not +valid. + +*/ diff --git a/src/USER-OMP/pair_agni_omp.cpp b/src/USER-OMP/pair_agni_omp.cpp index 20bb3987b..72e833171 100644 --- a/src/USER-OMP/pair_agni_omp.cpp +++ b/src/USER-OMP/pair_agni_omp.cpp @@ -1,299 +1,178 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include #include #include #include "pair_agni_omp.h" #include "atom.h" #include "comm.h" #include "force.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "math_special.h" #include "math_const.h" #include "suffix.h" using namespace LAMMPS_NS; using namespace MathSpecial; -/* - Copyright (c) 2012,2013 Axel Kohlmeyer - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* faster versions of 2**x, e**x, and 10**x in single and double precision. - * - * Based on the Cephes math library 2.8 - */ - -/* internal definitions for the fastermath library */ - -/* IEEE 754 double precision floating point data manipulation */ -typedef union -{ - double f; - uint64_t u; - struct {int32_t i0,i1;}; -} udi_t; -#define FM_DOUBLE_BIAS 1023 -#define FM_DOUBLE_EMASK 2146435072 -#define FM_DOUBLE_MBITS 20 -#define FM_DOUBLE_MMASK 1048575 -#define FM_DOUBLE_EZERO 1072693248 - -/* generate 2**num in floating point by bitshifting */ -#define FM_DOUBLE_INIT_EXP(var,num) \ - var.i0 = 0; \ - var.i1 = (((int) num) + FM_DOUBLE_BIAS) << 20 - -/* double precision constants */ -#define FM_DOUBLE_LOG2OFE 1.4426950408889634074 -#define FM_DOUBLE_LOGEOF2 6.9314718055994530942e-1 -#define FM_DOUBLE_LOG2OF10 3.32192809488736234789 -#define FM_DOUBLE_LOG10OF2 3.0102999566398119521e-1 -#define FM_DOUBLE_LOG10OFE 4.3429448190325182765e-1 -#define FM_DOUBLE_SQRT2 1.41421356237309504880 -#define FM_DOUBLE_SQRTH 0.70710678118654752440 - -/* optimizer friendly implementation of exp2(x). - * - * strategy: - * - * split argument into an integer part and a fraction: - * ipart = floor(x+0.5); - * fpart = x - ipart; - * - * compute exp2(ipart) from setting the ieee754 exponent - * compute exp2(fpart) using a pade' approximation for x in [-0.5;0.5[ - * - * the result becomes: exp2(x) = exp2(ipart) * exp2(fpart) - */ - -static const double fm_exp2_q[] = { -/* 1.00000000000000000000e0, */ - 2.33184211722314911771e2, - 4.36821166879210612817e3 -}; -static const double fm_exp2_p[] = { - 2.30933477057345225087e-2, - 2.02020656693165307700e1, - 1.51390680115615096133e3 -}; - -static double fm_exp2(double x) -{ - double ipart, fpart, px, qx; - udi_t epart; - - ipart = floor(x+0.5); - fpart = x - ipart; - FM_DOUBLE_INIT_EXP(epart,ipart); - - x = fpart*fpart; - - px = fm_exp2_p[0]; - px = px*x + fm_exp2_p[1]; - qx = x + fm_exp2_q[0]; - px = px*x + fm_exp2_p[2]; - qx = qx*x + fm_exp2_q[1]; - - px = px * fpart; - - x = 1.0 + 2.0*(px/(qx-px)); - return epart.f*x; -} - -static double fm_exp(double x) -{ -#if defined(__BYTE_ORDER__) -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ - return fm_exp2(FM_DOUBLE_LOG2OFE * (x)); -#endif -#endif - return exp(x); -} - /* ---------------------------------------------------------------------- */ PairAGNIOMP::PairAGNIOMP(LAMMPS *lmp) : PairAGNI(lmp), ThrOMP(lmp, THR_PAIR) { suffix_flag |= Suffix::OMP; respa_enable = 0; } /* ---------------------------------------------------------------------- */ void PairAGNIOMP::compute(int eflag, int vflag) { if (eflag || vflag) { ev_setup(eflag,vflag); } else evflag = vflag_fdotr = 0; const int nall = atom->nlocal + atom->nghost; const int nthreads = comm->nthreads; const int inum = list->inum; #if defined(_OPENMP) #pragma omp parallel default(none) shared(eflag,vflag) #endif { int ifrom, ito, tid; loop_setup_thr(ifrom, ito, tid, inum, nthreads); ThrData *thr = fix->get_thr(tid); thr->timer(Timer::START); ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr); if (evflag) eval<1>(ifrom, ito, thr); else eval<0>(ifrom, ito, thr); thr->timer(Timer::PAIR); reduce_thr(this, eflag, vflag, thr); } // end of omp parallel region } template void PairAGNIOMP::eval(int iifrom, int iito, ThrData * const thr) { int i,j,k,ii,jj,itype,jnum; double xtmp,ytmp,ztmp,delx,dely,delz; double rsq; int *ilist,*jlist,*numneigh,**firstneigh; const dbl3_t * _noalias const x = (dbl3_t *) atom->x[0]; dbl3_t * _noalias const f = (dbl3_t *) thr->get_f()[0]; const int * _noalias const type = atom->type; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; double fxtmp,fytmp,fztmp; double *Vx, *Vy, *Vz; // loop over full neighbor list of my atoms for (ii = iifrom; ii < iito; ++ii) { i = ilist[ii]; itype = map[type[i]]; xtmp = x[i].x; ytmp = x[i].y; ztmp = x[i].z; fxtmp = fytmp = fztmp = 0.0; const Param &iparam = params[elem2param[itype]]; Vx = new double[iparam.numeta]; Vy = new double[iparam.numeta]; Vz = new double[iparam.numeta]; memset(Vx,0,iparam.numeta*sizeof(double)); memset(Vy,0,iparam.numeta*sizeof(double)); memset(Vz,0,iparam.numeta*sizeof(double)); jlist = firstneigh[i]; jnum = numneigh[i]; for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; j &= NEIGHMASK; delx = xtmp - x[j].x; dely = ytmp - x[j].y; delz = ztmp - x[j].z; rsq = delx*delx + dely*dely + delz*delz; if ((rsq > 0.0) && (rsq < iparam.cutsq)) { const double r = sqrt(rsq); const double cF = 0.5*(cos((MathConst::MY_PI*r)/iparam.cut)+1.0); const double wX = cF*delx/r; const double wY = cF*dely/r; const double wZ = cF*delz/r; for (k = 0; k < iparam.numeta; ++k) { const double e = fm_exp(-(iparam.eta[k]*rsq)); Vx[k] += wX*e; Vy[k] += wY*e; Vz[k] += wZ*e; } } } for (j = 0; j < iparam.numtrain; ++j) { double kx = 0.0; double ky = 0.0; double kz = 0.0; for(int k = 0; k < iparam.numeta; ++k) { const double xu = iparam.xU[k][j]; kx += square(Vx[k] - xu); ky += square(Vy[k] - xu); kz += square(Vz[k] - xu); } const double e = -0.5/(square(iparam.sigma)); fxtmp += iparam.alpha[j]*fm_exp(kx*e); fytmp += iparam.alpha[j]*fm_exp(ky*e); fztmp += iparam.alpha[j]*fm_exp(kz*e); } fxtmp += iparam.b; fytmp += iparam.b; fztmp += iparam.b; f[i].x += fxtmp; f[i].y += fytmp; f[i].z += fztmp; if (EVFLAG) ev_tally_xyz_full_thr(this,i,0.0,0.0, fxtmp,fytmp,fztmp, delx,dely,delz,thr); delete [] Vx; delete [] Vy; delete [] Vz; } } /* ---------------------------------------------------------------------- */ double PairAGNIOMP::memory_usage() { double bytes = memory_usage_thr(); bytes += PairAGNI::memory_usage(); return bytes; } diff --git a/src/math_special.cpp b/src/math_special.cpp index 39487dd38..6777123ac 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -1,533 +1,547 @@ #include #include #include "math_special.h" using namespace LAMMPS_NS; /* Library libcerf: * Compute complex error functions, based on a new implementation of * Faddeeva's w_of_z. Also provide Dawson and Voigt functions. * * File erfcx.c: * Compute erfcx(x) = exp(x^2) erfc(x) function, for real x, * using a novel algorithm that is much faster than DERFC of SLATEC. * This function is used in the computation of Faddeeva, Dawson, and * other complex error functions. * * Copyright: * (C) 2012 Massachusetts Institute of Technology * (C) 2013 Forschungszentrum Jülich GmbH * * Licence: * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Authors: * Steven G. Johnson, Massachusetts Institute of Technology, 2012, core author * Joachim Wuttke, Forschungszentrum Jülich, 2013, package maintainer * * Website: * http://apps.jcns.fz-juelich.de/libcerf * * Revision history: * ../CHANGELOG * * Manual page: * man 3 erfcx */ /******************************************************************************/ /* Lookup-table for Chebyshev polynomials for smaller |x| */ /******************************************************************************/ double MathSpecial::erfcx_y100(const double y100) { // Steven G. Johnson, October 2012. // Given y100=100*y, where y = 4/(4+x) for x >= 0, compute erfc(x). // Uses a look-up table of 100 different Chebyshev polynomials // for y intervals [0,0.01], [0.01,0.02], ...., [0.99,1], generated // with the help of Maple and a little shell script. This allows // the Chebyshev polynomials to be of significantly lower degree (about 1/4) // compared to fitting the whole [0,1] interval with a single polynomial. switch ((int) y100) { case 0: { double t = 2*y100 - 1; return 0.70878032454106438663e-3 + (0.71234091047026302958e-3 + (0.35779077297597742384e-5 + (0.17403143962587937815e-7 + (0.81710660047307788845e-10 + (0.36885022360434957634e-12 + 0.15917038551111111111e-14 * t) * t) * t) * t) * t) * t; } case 1: { double t = 2*y100 - 3; return 0.21479143208285144230e-2 + (0.72686402367379996033e-3 + (0.36843175430938995552e-5 + (0.18071841272149201685e-7 + (0.85496449296040325555e-10 + (0.38852037518534291510e-12 + 0.16868473576888888889e-14 * t) * t) * t) * t) * t) * t; } case 2: { double t = 2*y100 - 5; return 0.36165255935630175090e-2 + (0.74182092323555510862e-3 + (0.37948319957528242260e-5 + (0.18771627021793087350e-7 + (0.89484715122415089123e-10 + (0.40935858517772440862e-12 + 0.17872061464888888889e-14 * t) * t) * t) * t) * t) * t; } case 3: { double t = 2*y100 - 7; return 0.51154983860031979264e-2 + (0.75722840734791660540e-3 + (0.39096425726735703941e-5 + (0.19504168704300468210e-7 + (0.93687503063178993915e-10 + (0.43143925959079664747e-12 + 0.18939926435555555556e-14 * t) * t) * t) * t) * t) * t; } case 4: { double t = 2*y100 - 9; return 0.66457513172673049824e-2 + (0.77310406054447454920e-3 + (0.40289510589399439385e-5 + (0.20271233238288381092e-7 + (0.98117631321709100264e-10 + (0.45484207406017752971e-12 + 0.20076352213333333333e-14 * t) * t) * t) * t) * t) * t; } case 5: { double t = 2*y100 - 11; return 0.82082389970241207883e-2 + (0.78946629611881710721e-3 + (0.41529701552622656574e-5 + (0.21074693344544655714e-7 + (0.10278874108587317989e-9 + (0.47965201390613339638e-12 + 0.21285907413333333333e-14 * t) * t) * t) * t) * t) * t; } case 6: { double t = 2*y100 - 13; return 0.98039537275352193165e-2 + (0.80633440108342840956e-3 + (0.42819241329736982942e-5 + (0.21916534346907168612e-7 + (0.10771535136565470914e-9 + (0.50595972623692822410e-12 + 0.22573462684444444444e-14 * t) * t) * t) * t) * t) * t; } case 7: { double t = 2*y100 - 15; return 0.11433927298290302370e-1 + (0.82372858383196561209e-3 + (0.44160495311765438816e-5 + (0.22798861426211986056e-7 + (0.11291291745879239736e-9 + (0.53386189365816880454e-12 + 0.23944209546666666667e-14 * t) * t) * t) * t) * t) * t; } case 8: { double t = 2*y100 - 17; return 0.13099232878814653979e-1 + (0.84167002467906968214e-3 + (0.45555958988457506002e-5 + (0.23723907357214175198e-7 + (0.11839789326602695603e-9 + (0.56346163067550237877e-12 + 0.25403679644444444444e-14 * t) * t) * t) * t) * t) * t; } case 9: { double t = 2*y100 - 19; return 0.14800987015587535621e-1 + (0.86018092946345943214e-3 + (0.47008265848816866105e-5 + (0.24694040760197315333e-7 + (0.12418779768752299093e-9 + (0.59486890370320261949e-12 + 0.26957764568888888889e-14 * t) * t) * t) * t) * t) * t; } case 10: { double t = 2*y100 - 21; return 0.16540351739394069380e-1 + (0.87928458641241463952e-3 + (0.48520195793001753903e-5 + (0.25711774900881709176e-7 + (0.13030128534230822419e-9 + (0.62820097586874779402e-12 + 0.28612737351111111111e-14 * t) * t) * t) * t) * t) * t; } case 11: { double t = 2*y100 - 23; return 0.18318536789842392647e-1 + (0.89900542647891721692e-3 + (0.50094684089553365810e-5 + (0.26779777074218070482e-7 + (0.13675822186304615566e-9 + (0.66358287745352705725e-12 + 0.30375273884444444444e-14 * t) * t) * t) * t) * t) * t; } case 12: { double t = 2*y100 - 25; return 0.20136801964214276775e-1 + (0.91936908737673676012e-3 + (0.51734830914104276820e-5 + (0.27900878609710432673e-7 + (0.14357976402809042257e-9 + (0.70114790311043728387e-12 + 0.32252476000000000000e-14 * t) * t) * t) * t) * t) * t; } case 13: { double t = 2*y100 - 27; return 0.21996459598282740954e-1 + (0.94040248155366777784e-3 + (0.53443911508041164739e-5 + (0.29078085538049374673e-7 + (0.15078844500329731137e-9 + (0.74103813647499204269e-12 + 0.34251892320000000000e-14 * t) * t) * t) * t) * t) * t; } case 14: { double t = 2*y100 - 29; return 0.23898877187226319502e-1 + (0.96213386835900177540e-3 + (0.55225386998049012752e-5 + (0.30314589961047687059e-7 + (0.15840826497296335264e-9 + (0.78340500472414454395e-12 + 0.36381553564444444445e-14 * t) * t) * t) * t) * t) * t; } case 15: { double t = 2*y100 - 31; return 0.25845480155298518485e-1 + (0.98459293067820123389e-3 + (0.57082915920051843672e-5 + (0.31613782169164830118e-7 + (0.16646478745529630813e-9 + (0.82840985928785407942e-12 + 0.38649975768888888890e-14 * t) * t) * t) * t) * t) * t; } case 16: { double t = 2*y100 - 33; return 0.27837754783474696598e-1 + (0.10078108563256892757e-2 + (0.59020366493792212221e-5 + (0.32979263553246520417e-7 + (0.17498524159268458073e-9 + (0.87622459124842525110e-12 + 0.41066206488888888890e-14 * t) * t) * t) * t) * t) * t; } case 17: { double t = 2*y100 - 35; return 0.29877251304899307550e-1 + (0.10318204245057349310e-2 + (0.61041829697162055093e-5 + (0.34414860359542720579e-7 + (0.18399863072934089607e-9 + (0.92703227366365046533e-12 + 0.43639844053333333334e-14 * t) * t) * t) * t) * t) * t; } case 18: { double t = 2*y100 - 37; return 0.31965587178596443475e-1 + (0.10566560976716574401e-2 + (0.63151633192414586770e-5 + (0.35924638339521924242e-7 + (0.19353584758781174038e-9 + (0.98102783859889264382e-12 + 0.46381060817777777779e-14 * t) * t) * t) * t) * t) * t; } case 19: { double t = 2*y100 - 39; return 0.34104450552588334840e-1 + (0.10823541191350532574e-2 + (0.65354356159553934436e-5 + (0.37512918348533521149e-7 + (0.20362979635817883229e-9 + (0.10384187833037282363e-11 + 0.49300625262222222221e-14 * t) * t) * t) * t) * t) * t; } case 20: { double t = 2*y100 - 41; return 0.36295603928292425716e-1 + (0.11089526167995268200e-2 + (0.67654845095518363577e-5 + (0.39184292949913591646e-7 + (0.21431552202133775150e-9 + (0.10994259106646731797e-11 + 0.52409949102222222221e-14 * t) * t) * t) * t) * t) * t; } case 21: { double t = 2*y100 - 43; return 0.38540888038840509795e-1 + (0.11364917134175420009e-2 + (0.70058230641246312003e-5 + (0.40943644083718586939e-7 + (0.22563034723692881631e-9 + (0.11642841011361992885e-11 + 0.55721092871111111110e-14 * t) * t) * t) * t) * t) * t; } case 22: { double t = 2*y100 - 45; return 0.40842225954785960651e-1 + (0.11650136437945673891e-2 + (0.72569945502343006619e-5 + (0.42796161861855042273e-7 + (0.23761401711005024162e-9 + (0.12332431172381557035e-11 + 0.59246802364444444445e-14 * t) * t) * t) * t) * t) * t; } case 23: { double t = 2*y100 - 47; return 0.43201627431540222422e-1 + (0.11945628793917272199e-2 + (0.75195743532849206263e-5 + (0.44747364553960993492e-7 + (0.25030885216472953674e-9 + (0.13065684400300476484e-11 + 0.63000532853333333334e-14 * t) * t) * t) * t) * t) * t; } case 24: { double t = 2*y100 - 49; return 0.45621193513810471438e-1 + (0.12251862608067529503e-2 + (0.77941720055551920319e-5 + (0.46803119830954460212e-7 + (0.26375990983978426273e-9 + (0.13845421370977119765e-11 + 0.66996477404444444445e-14 * t) * t) * t) * t) * t) * t; } case 25: { double t = 2*y100 - 51; return 0.48103121413299865517e-1 + (0.12569331386432195113e-2 + (0.80814333496367673980e-5 + (0.48969667335682018324e-7 + (0.27801515481905748484e-9 + (0.14674637611609884208e-11 + 0.71249589351111111110e-14 * t) * t) * t) * t) * t) * t; } case 26: { double t = 2*y100 - 53; return 0.50649709676983338501e-1 + (0.12898555233099055810e-2 + (0.83820428414568799654e-5 + (0.51253642652551838659e-7 + (0.29312563849675507232e-9 + (0.15556512782814827846e-11 + 0.75775607822222222221e-14 * t) * t) * t) * t) * t) * t; } case 27: { double t = 2*y100 - 55; return 0.53263363664388864181e-1 + (0.13240082443256975769e-2 + (0.86967260015007658418e-5 + (0.53662102750396795566e-7 + (0.30914568786634796807e-9 + (0.16494420240828493176e-11 + 0.80591079644444444445e-14 * t) * t) * t) * t) * t) * t; } case 28: { double t = 2*y100 - 57; return 0.55946601353500013794e-1 + (0.13594491197408190706e-2 + (0.90262520233016380987e-5 + (0.56202552975056695376e-7 + (0.32613310410503135996e-9 + (0.17491936862246367398e-11 + 0.85713381688888888890e-14 * t) * t) * t) * t) * t) * t; } case 29: { double t = 2*y100 - 59; return 0.58702059496154081813e-1 + (0.13962391363223647892e-2 + (0.93714365487312784270e-5 + (0.58882975670265286526e-7 + (0.34414937110591753387e-9 + (0.18552853109751857859e-11 + 0.91160736711111111110e-14 * t) * t) * t) * t) * t) * t; } case 30: { double t = 2*y100 - 61; return 0.61532500145144778048e-1 + (0.14344426411912015247e-2 + (0.97331446201016809696e-5 + (0.61711860507347175097e-7 + (0.36325987418295300221e-9 + (0.19681183310134518232e-11 + 0.96952238400000000000e-14 * t) * t) * t) * t) * t) * t; } case 31: { double t = 2*y100 - 63; return 0.64440817576653297993e-1 + (0.14741275456383131151e-2 + (0.10112293819576437838e-4 + (0.64698236605933246196e-7 + (0.38353412915303665586e-9 + (0.20881176114385120186e-11 + 0.10310784480000000000e-13 * t) * t) * t) * t) * t) * t; } case 32: { double t = 2*y100 - 65; return 0.67430045633130393282e-1 + (0.15153655418916540370e-2 + (0.10509857606888328667e-4 + (0.67851706529363332855e-7 + (0.40504602194811140006e-9 + (0.22157325110542534469e-11 + 0.10964842115555555556e-13 * t) * t) * t) * t) * t) * t; } case 33: { double t = 2*y100 - 67; return 0.70503365513338850709e-1 + (0.15582323336495709827e-2 + (0.10926868866865231089e-4 + (0.71182482239613507542e-7 + (0.42787405890153386710e-9 + (0.23514379522274416437e-11 + 0.11659571751111111111e-13 * t) * t) * t) * t) * t) * t; } case 34: { double t = 2*y100 - 69; return 0.73664114037944596353e-1 + (0.16028078812438820413e-2 + (0.11364423678778207991e-4 + (0.74701423097423182009e-7 + (0.45210162777476488324e-9 + (0.24957355004088569134e-11 + 0.12397238257777777778e-13 * t) * t) * t) * t) * t) * t; } case 35: { double t = 2*y100 - 71; return 0.76915792420819562379e-1 + (0.16491766623447889354e-2 + (0.11823685320041302169e-4 + (0.78420075993781544386e-7 + (0.47781726956916478925e-9 + (0.26491544403815724749e-11 + 0.13180196462222222222e-13 * t) * t) * t) * t) * t) * t; } case 36: { double t = 2*y100 - 73; return 0.80262075578094612819e-1 + (0.16974279491709504117e-2 + (0.12305888517309891674e-4 + (0.82350717698979042290e-7 + (0.50511496109857113929e-9 + (0.28122528497626897696e-11 + 0.14010889635555555556e-13 * t) * t) * t) * t) * t) * t; } case 37: { double t = 2*y100 - 75; return 0.83706822008980357446e-1 + (0.17476561032212656962e-2 + (0.12812343958540763368e-4 + (0.86506399515036435592e-7 + (0.53409440823869467453e-9 + (0.29856186620887555043e-11 + 0.14891851591111111111e-13 * t) * t) * t) * t) * t) * t; } case 38: { double t = 2*y100 - 77; return 0.87254084284461718231e-1 + (0.17999608886001962327e-2 + (0.13344443080089492218e-4 + (0.90900994316429008631e-7 + (0.56486134972616465316e-9 + (0.31698707080033956934e-11 + 0.15825697795555555556e-13 * t) * t) * t) * t) * t) * t; } case 39: { double t = 2*y100 - 79; return 0.90908120182172748487e-1 + (0.18544478050657699758e-2 + (0.13903663143426120077e-4 + (0.95549246062549906177e-7 + (0.59752787125242054315e-9 + (0.33656597366099099413e-11 + 0.16815130613333333333e-13 * t) * t) * t) * t) * t) * t; } case 40: { double t = 2*y100 - 81; return 0.94673404508075481121e-1 + (0.19112284419887303347e-2 + (0.14491572616545004930e-4 + (0.10046682186333613697e-6 + (0.63221272959791000515e-9 + (0.35736693975589130818e-11 + 0.17862931591111111111e-13 * t) * t) * t) * t) * t) * t; } case 41: { double t = 2*y100 - 83; return 0.98554641648004456555e-1 + (0.19704208544725622126e-2 + (0.15109836875625443935e-4 + (0.10567036667675984067e-6 + (0.66904168640019354565e-9 + (0.37946171850824333014e-11 + 0.18971959040000000000e-13 * t) * t) * t) * t) * t) * t; } case 42: { double t = 2*y100 - 85; return 0.10255677889470089531e0 + (0.20321499629472857418e-2 + (0.15760224242962179564e-4 + (0.11117756071353507391e-6 + (0.70814785110097658502e-9 + (0.40292553276632563925e-11 + 0.20145143075555555556e-13 * t) * t) * t) * t) * t) * t; } case 43: { double t = 2*y100 - 87; return 0.10668502059865093318e0 + (0.20965479776148731610e-2 + (0.16444612377624983565e-4 + (0.11700717962026152749e-6 + (0.74967203250938418991e-9 + (0.42783716186085922176e-11 + 0.21385479360000000000e-13 * t) * t) * t) * t) * t) * t; } case 44: { double t = 2*y100 - 89; return 0.11094484319386444474e0 + (0.21637548491908170841e-2 + (0.17164995035719657111e-4 + (0.12317915750735938089e-6 + (0.79376309831499633734e-9 + (0.45427901763106353914e-11 + 0.22696025653333333333e-13 * t) * t) * t) * t) * t) * t; } case 45: { double t = 2*y100 - 91; return 0.11534201115268804714e0 + (0.22339187474546420375e-2 + (0.17923489217504226813e-4 + (0.12971465288245997681e-6 + (0.84057834180389073587e-9 + (0.48233721206418027227e-11 + 0.24079890062222222222e-13 * t) * t) * t) * t) * t) * t; } case 46: { double t = 2*y100 - 93; return 0.11988259392684094740e0 + (0.23071965691918689601e-2 + (0.18722342718958935446e-4 + (0.13663611754337957520e-6 + (0.89028385488493287005e-9 + (0.51210161569225846701e-11 + 0.25540227111111111111e-13 * t) * t) * t) * t) * t) * t; } case 47: { double t = 2*y100 - 95; return 0.12457298393509812907e0 + (0.23837544771809575380e-2 + (0.19563942105711612475e-4 + (0.14396736847739470782e-6 + (0.94305490646459247016e-9 + (0.54366590583134218096e-11 + 0.27080225920000000000e-13 * t) * t) * t) * t) * t) * t; } case 48: { double t = 2*y100 - 97; return 0.12941991566142438816e0 + (0.24637684719508859484e-2 + (0.20450821127475879816e-4 + (0.15173366280523906622e-6 + (0.99907632506389027739e-9 + (0.57712760311351625221e-11 + 0.28703099555555555556e-13 * t) * t) * t) * t) * t) * t; } case 49: { double t = 2*y100 - 99; return 0.13443048593088696613e0 + (0.25474249981080823877e-2 + (0.21385669591362915223e-4 + (0.15996177579900443030e-6 + (0.10585428844575134013e-8 + (0.61258809536787882989e-11 + 0.30412080142222222222e-13 * t) * t) * t) * t) * t) * t; } case 50: { double t = 2*y100 - 101; return 0.13961217543434561353e0 + (0.26349215871051761416e-2 + (0.22371342712572567744e-4 + (0.16868008199296822247e-6 + (0.11216596910444996246e-8 + (0.65015264753090890662e-11 + 0.32210394506666666666e-13 * t) * t) * t) * t) * t) * t; } case 51: { double t = 2*y100 - 103; return 0.14497287157673800690e0 + (0.27264675383982439814e-2 + (0.23410870961050950197e-4 + (0.17791863939526376477e-6 + (0.11886425714330958106e-8 + (0.68993039665054288034e-11 + 0.34101266222222222221e-13 * t) * t) * t) * t) * t) * t; } case 52: { double t = 2*y100 - 105; return 0.15052089272774618151e0 + (0.28222846410136238008e-2 + (0.24507470422713397006e-4 + (0.18770927679626136909e-6 + (0.12597184587583370712e-8 + (0.73203433049229821618e-11 + 0.36087889048888888890e-13 * t) * t) * t) * t) * t) * t; } case 53: { double t = 2*y100 - 107; return 0.15626501395774612325e0 + (0.29226079376196624949e-2 + (0.25664553693768450545e-4 + (0.19808568415654461964e-6 + (0.13351257759815557897e-8 + (0.77658124891046760667e-11 + 0.38173420035555555555e-13 * t) * t) * t) * t) * t) * t; } case 54: { double t = 2*y100 - 109; return 0.16221449434620737567e0 + (0.30276865332726475672e-2 + (0.26885741326534564336e-4 + (0.20908350604346384143e-6 + (0.14151148144240728728e-8 + (0.82369170665974313027e-11 + 0.40360957457777777779e-13 * t) * t) * t) * t) * t) * t; } case 55: { double t = 2*y100 - 111; return 0.16837910595412130659e0 + (0.31377844510793082301e-2 + (0.28174873844911175026e-4 + (0.22074043807045782387e-6 + (0.14999481055996090039e-8 + (0.87348993661930809254e-11 + 0.42653528977777777779e-13 * t) * t) * t) * t) * t) * t; } case 56: { double t = 2*y100 - 113; return 0.17476916455659369953e0 + (0.32531815370903068316e-2 + (0.29536024347344364074e-4 + (0.23309632627767074202e-6 + (0.15899007843582444846e-8 + (0.92610375235427359475e-11 + 0.45054073102222222221e-13 * t) * t) * t) * t) * t) * t; } case 57: { double t = 2*y100 - 115; return 0.18139556223643701364e0 + (0.33741744168096996041e-2 + (0.30973511714709500836e-4 + (0.24619326937592290996e-6 + (0.16852609412267750744e-8 + (0.98166442942854895573e-11 + 0.47565418097777777779e-13 * t) * t) * t) * t) * t) * t; } case 58: { double t = 2*y100 - 117; return 0.18826980194443664549e0 + (0.35010775057740317997e-2 + (0.32491914440014267480e-4 + (0.26007572375886319028e-6 + (0.17863299617388376116e-8 + (0.10403065638343878679e-10 + 0.50190265831111111110e-13 * t) * t) * t) * t) * t) * t; } case 59: { double t = 2*y100 - 119; return 0.19540403413693967350e0 + (0.36342240767211326315e-2 + (0.34096085096200907289e-4 + (0.27479061117017637474e-6 + (0.18934228504790032826e-8 + (0.11021679075323598664e-10 + 0.52931171733333333334e-13 * t) * t) * t) * t) * t) * t; } case 60: { double t = 2*y100 - 121; return 0.20281109560651886959e0 + (0.37739673859323597060e-2 + (0.35791165457592409054e-4 + (0.29038742889416172404e-6 + (0.20068685374849001770e-8 + (0.11673891799578381999e-10 + 0.55790523093333333334e-13 * t) * t) * t) * t) * t) * t; } case 61: { double t = 2*y100 - 123; return 0.21050455062669334978e0 + (0.39206818613925652425e-2 + (0.37582602289680101704e-4 + (0.30691836231886877385e-6 + (0.21270101645763677824e-8 + (0.12361138551062899455e-10 + 0.58770520160000000000e-13 * t) * t) * t) * t) * t) * t; } case 62: { double t = 2*y100 - 125; return 0.21849873453703332479e0 + (0.40747643554689586041e-2 + (0.39476163820986711501e-4 + (0.32443839970139918836e-6 + (0.22542053491518680200e-8 + (0.13084879235290858490e-10 + 0.61873153262222222221e-13 * t) * t) * t) * t) * t) * t; } case 63: { double t = 2*y100 - 127; return 0.22680879990043229327e0 + (0.42366354648628516935e-2 + (0.41477956909656896779e-4 + (0.34300544894502810002e-6 + (0.23888264229264067658e-8 + (0.13846596292818514601e-10 + 0.65100183751111111110e-13 * t) * t) * t) * t) * t) * t; } case 64: { double t = 2*y100 - 129; return 0.23545076536988703937e0 + (0.44067409206365170888e-2 + (0.43594444916224700881e-4 + (0.36268045617760415178e-6 + (0.25312606430853202748e-8 + (0.14647791812837903061e-10 + 0.68453122631111111110e-13 * t) * t) * t) * t) * t) * t; } case 65: { double t = 2*y100 - 131; return 0.24444156740777432838e0 + (0.45855530511605787178e-2 + (0.45832466292683085475e-4 + (0.38352752590033030472e-6 + (0.26819103733055603460e-8 + (0.15489984390884756993e-10 + 0.71933206364444444445e-13 * t) * t) * t) * t) * t) * t; } case 66: { double t = 2*y100 - 133; return 0.25379911500634264643e0 + (0.47735723208650032167e-2 + (0.48199253896534185372e-4 + (0.40561404245564732314e-6 + (0.28411932320871165585e-8 + (0.16374705736458320149e-10 + 0.75541379822222222221e-13 * t) * t) * t) * t) * t) * t; } case 67: { double t = 2*y100 - 135; return 0.26354234756393613032e0 + (0.49713289477083781266e-2 + (0.50702455036930367504e-4 + (0.42901079254268185722e-6 + (0.30095422058900481753e-8 + (0.17303497025347342498e-10 + 0.79278273368888888890e-13 * t) * t) * t) * t) * t) * t; } case 68: { double t = 2*y100 - 137; return 0.27369129607732343398e0 + (0.51793846023052643767e-2 + (0.53350152258326602629e-4 + (0.45379208848865015485e-6 + (0.31874057245814381257e-8 + (0.18277905010245111046e-10 + 0.83144182364444444445e-13 * t) * t) * t) * t) * t) * t; } case 69: { double t = 2*y100 - 139; return 0.28426714781640316172e0 + (0.53983341916695141966e-2 + (0.56150884865255810638e-4 + (0.48003589196494734238e-6 + (0.33752476967570796349e-8 + (0.19299477888083469086e-10 + 0.87139049137777777779e-13 * t) * t) * t) * t) * t) * t; } case 70: { double t = 2*y100 - 141; return 0.29529231465348519920e0 + (0.56288077305420795663e-2 + (0.59113671189913307427e-4 + (0.50782393781744840482e-6 + (0.35735475025851713168e-8 + (0.20369760937017070382e-10 + 0.91262442613333333334e-13 * t) * t) * t) * t) * t) * t; } case 71: { double t = 2*y100 - 143; return 0.30679050522528838613e0 + (0.58714723032745403331e-2 + (0.62248031602197686791e-4 + (0.53724185766200945789e-6 + (0.37827999418960232678e-8 + (0.21490291930444538307e-10 + 0.95513539182222222221e-13 * t) * t) * t) * t) * t) * t; } case 72: { double t = 2*y100 - 145; return 0.31878680111173319425e0 + (0.61270341192339103514e-2 + (0.65564012259707640976e-4 + (0.56837930287837738996e-6 + (0.40035151353392378882e-8 + (0.22662596341239294792e-10 + 0.99891109760000000000e-13 * t) * t) * t) * t) * t) * t; } case 73: { double t = 2*y100 - 147; return 0.33130773722152622027e0 + (0.63962406646798080903e-2 + (0.69072209592942396666e-4 + (0.60133006661885941812e-6 + (0.42362183765883466691e-8 + (0.23888182347073698382e-10 + 0.10439349811555555556e-12 * t) * t) * t) * t) * t) * t; } case 74: { double t = 2*y100 - 149; return 0.34438138658041336523e0 + (0.66798829540414007258e-2 + (0.72783795518603561144e-4 + (0.63619220443228800680e-6 + (0.44814499336514453364e-8 + (0.25168535651285475274e-10 + 0.10901861383111111111e-12 * t) * t) * t) * t) * t) * t; } case 75: { double t = 2*y100 - 151; return 0.35803744972380175583e0 + (0.69787978834882685031e-2 + (0.76710543371454822497e-4 + (0.67306815308917386747e-6 + (0.47397647975845228205e-8 + (0.26505114141143050509e-10 + 0.11376390933333333333e-12 * t) * t) * t) * t) * t) * t; } case 76: { double t = 2*y100 - 153; return 0.37230734890119724188e0 + (0.72938706896461381003e-2 + (0.80864854542670714092e-4 + (0.71206484718062688779e-6 + (0.50117323769745883805e-8 + (0.27899342394100074165e-10 + 0.11862637614222222222e-12 * t) * t) * t) * t) * t) * t; } case 77: { double t = 2*y100 - 155; return 0.38722432730555448223e0 + (0.76260375162549802745e-2 + (0.85259785810004603848e-4 + (0.75329383305171327677e-6 + (0.52979361368388119355e-8 + (0.29352606054164086709e-10 + 0.12360253370666666667e-12 * t) * t) * t) * t) * t) * t; } case 78: { double t = 2*y100 - 157; return 0.40282355354616940667e0 + (0.79762880915029728079e-2 + (0.89909077342438246452e-4 + (0.79687137961956194579e-6 + (0.55989731807360403195e-8 + (0.30866246101464869050e-10 + 0.12868841946666666667e-12 * t) * t) * t) * t) * t) * t; } case 79: { double t = 2*y100 - 159; return 0.41914223158913787649e0 + (0.83456685186950463538e-2 + (0.94827181359250161335e-4 + (0.84291858561783141014e-6 + (0.59154537751083485684e-8 + (0.32441553034347469291e-10 + 0.13387957943111111111e-12 * t) * t) * t) * t) * t) * t; } case 80: { double t = 2*y100 - 161; return 0.43621971639463786896e0 + (0.87352841828289495773e-2 + (0.10002929142066799966e-3 + (0.89156148280219880024e-6 + (0.62480008150788597147e-8 + (0.34079760983458878910e-10 + 0.13917107176888888889e-12 * t) * t) * t) * t) * t) * t; } case 81: { double t = 2*y100 - 163; return 0.45409763548534330981e0 + (0.91463027755548240654e-2 + (0.10553137232446167258e-3 + (0.94293113464638623798e-6 + (0.65972492312219959885e-8 + (0.35782041795476563662e-10 + 0.14455745872000000000e-12 * t) * t) * t) * t) * t) * t; } case 82: { double t = 2*y100 - 165; return 0.47282001668512331468e0 + (0.95799574408860463394e-2 + (0.11135019058000067469e-3 + (0.99716373005509038080e-6 + (0.69638453369956970347e-8 + (0.37549499088161345850e-10 + 0.15003280712888888889e-12 * t) * t) * t) * t) * t) * t; } case 83: { double t = 2*y100 - 167; return 0.49243342227179841649e0 + (0.10037550043909497071e-1 + (0.11750334542845234952e-3 + (0.10544006716188967172e-5 + (0.73484461168242224872e-8 + (0.39383162326435752965e-10 + 0.15559069118222222222e-12 * t) * t) * t) * t) * t) * t; } case 84: { double t = 2*y100 - 169; return 0.51298708979209258326e0 + (0.10520454564612427224e-1 + (0.12400930037494996655e-3 + (0.11147886579371265246e-5 + (0.77517184550568711454e-8 + (0.41283980931872622611e-10 + 0.16122419680000000000e-12 * t) * t) * t) * t) * t) * t; } case 85: { double t = 2*y100 - 171; return 0.53453307979101369843e0 + (0.11030120618800726938e-1 + (0.13088741519572269581e-3 + (0.11784797595374515432e-5 + (0.81743383063044825400e-8 + (0.43252818449517081051e-10 + 0.16692592640000000000e-12 * t) * t) * t) * t) * t) * t; } case 86: { double t = 2*y100 - 173; return 0.55712643071169299478e0 + (0.11568077107929735233e-1 + (0.13815797838036651289e-3 + (0.12456314879260904558e-5 + (0.86169898078969313597e-8 + (0.45290446811539652525e-10 + 0.17268801084444444444e-12 * t) * t) * t) * t) * t) * t; } case 87: { double t = 2*y100 - 175; return 0.58082532122519320968e0 + (0.12135935999503877077e-1 + (0.14584223996665838559e-3 + (0.13164068573095710742e-5 + (0.90803643355106020163e-8 + (0.47397540713124619155e-10 + 0.17850211608888888889e-12 * t) * t) * t) * t) * t) * t; } case 88: { double t = 2*y100 - 177; return 0.60569124025293375554e0 + (0.12735396239525550361e-1 + (0.15396244472258863344e-3 + (0.13909744385382818253e-5 + (0.95651595032306228245e-8 + (0.49574672127669041550e-10 + 0.18435945564444444444e-12 * t) * t) * t) * t) * t) * t; } case 89: { double t = 2*y100 - 179; return 0.63178916494715716894e0 + (0.13368247798287030927e-1 + (0.16254186562762076141e-3 + (0.14695084048334056083e-5 + (0.10072078109604152350e-7 + (0.51822304995680707483e-10 + 0.19025081422222222222e-12 * t) * t) * t) * t) * t) * t; } case 90: { double t = 2*y100 - 181; return 0.65918774689725319200e0 + (0.14036375850601992063e-1 + (0.17160483760259706354e-3 + (0.15521885688723188371e-5 + (0.10601827031535280590e-7 + (0.54140790105837520499e-10 + 0.19616655146666666667e-12 * t) * t) * t) * t) * t) * t; } case 91: { double t = 2*y100 - 183; return 0.68795950683174433822e0 + (0.14741765091365869084e-1 + (0.18117679143520433835e-3 + (0.16392004108230585213e-5 + (0.11155116068018043001e-7 + (0.56530360194925690374e-10 + 0.20209663662222222222e-12 * t) * t) * t) * t) * t) * t; } case 92: { double t = 2*y100 - 185; return 0.71818103808729967036e0 + (0.15486504187117112279e-1 + (0.19128428784550923217e-3 + (0.17307350969359975848e-5 + (0.11732656736113607751e-7 + (0.58991125287563833603e-10 + 0.20803065333333333333e-12 * t) * t) * t) * t) * t) * t; } case 93: { double t = 2*y100 - 187; return 0.74993321911726254661e0 + (0.16272790364044783382e-1 + (0.20195505163377912645e-3 + (0.18269894883203346953e-5 + (0.12335161021630225535e-7 + (0.61523068312169087227e-10 + 0.21395783431111111111e-12 * t) * t) * t) * t) * t) * t; } case 94: { double t = 2*y100 - 189; return 0.78330143531283492729e0 + (0.17102934132652429240e-1 + (0.21321800585063327041e-3 + (0.19281661395543913713e-5 + (0.12963340087354341574e-7 + (0.64126040998066348872e-10 + 0.21986708942222222222e-12 * t) * t) * t) * t) * t) * t; } case 95: { double t = 2*y100 - 191; return 0.81837581041023811832e0 + (0.17979364149044223802e-1 + (0.22510330592753129006e-3 + (0.20344732868018175389e-5 + (0.13617902941839949718e-7 + (0.66799760083972474642e-10 + 0.22574701262222222222e-12 * t) * t) * t) * t) * t) * t; } case 96: { double t = 2*y100 - 193; return 0.85525144775685126237e0 + (0.18904632212547561026e-1 + (0.23764237370371255638e-3 + (0.21461248251306387979e-5 + (0.14299555071870523786e-7 + (0.69543803864694171934e-10 + 0.23158593688888888889e-12 * t) * t) * t) * t) * t) * t; } case 97: { double t = 2*y100 - 195; return 0.89402868170849933734e0 + (0.19881418399127202569e-1 + (0.25086793128395995798e-3 + (0.22633402747585233180e-5 + (0.15008997042116532283e-7 + (0.72357609075043941261e-10 + 0.23737194737777777778e-12 * t) * t) * t) * t) * t) * t; } case 98: { double t = 2*y100 - 197; return 0.93481333942870796363e0 + (0.20912536329780368893e-1 + (0.26481403465998477969e-3 + (0.23863447359754921676e-5 + (0.15746923065472184451e-7 + (0.75240468141720143653e-10 + 0.24309291271111111111e-12 * t) * t) * t) * t) * t) * t; } case 99: { double t = 2*y100 - 199; return 0.97771701335885035464e0 + (0.22000938572830479551e-1 + (0.27951610702682383001e-3 + (0.25153688325245314530e-5 + (0.16514019547822821453e-7 + (0.78191526829368231251e-10 + 0.24873652355555555556e-12 * t) * t) * t) * t) * t) * t; } } /* we only get here if y = 1, i.e. |x| < 4*eps, in which case * erfcx is within 1e-15 of 1.. */ return 1.0; } /* erfcx_y100 */ /* optimizer friendly implementation of exp2(x). * * strategy: * * split argument into an integer part and a fraction: * ipart = floor(x+0.5); * fpart = x - ipart; * * compute exp2(ipart) from setting the ieee754 exponent * compute exp2(fpart) using a pade' approximation for x in [-0.5;0.5[ * * the result becomes: exp2(x) = exp2(ipart) * exp2(fpart) */ /* IEEE 754 double precision floating point data manipulation */ typedef union { double f; uint64_t u; struct {int32_t i0,i1;} s; } udi_t; static const double fm_exp2_q[] = { /* 1.00000000000000000000e0, */ 2.33184211722314911771e2, 4.36821166879210612817e3 }; static const double fm_exp2_p[] = { 2.30933477057345225087e-2, 2.02020656693165307700e1, 1.51390680115615096133e3 }; +/* double precision constants */ +#define FM_DOUBLE_LOG2OFE 1.4426950408889634074 + double MathSpecial::exp2_x86(double x) { double ipart, fpart, px, qx; udi_t epart; ipart = floor(x+0.5); fpart = x - ipart; epart.s.i0 = 0; epart.s.i1 = (((int) ipart) + 1023) << 20; x = fpart*fpart; px = fm_exp2_p[0]; px = px*x + fm_exp2_p[1]; qx = x + fm_exp2_q[0]; px = px*x + fm_exp2_p[2]; qx = qx*x + fm_exp2_q[1]; px = px * fpart; x = 1.0 + 2.0*(px/(qx-px)); return epart.f*x; } + +double MathSpecial::fm_exp(double x) +{ +#if defined(__BYTE_ORDER__) +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ + return exp2_x86(FM_DOUBLE_LOG2OFE * x); +#endif +#endif + return ::exp(x); +} + diff --git a/src/math_special.h b/src/math_special.h index e4b4998d5..8cd328f5f 100644 --- a/src/math_special.h +++ b/src/math_special.h @@ -1,94 +1,97 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef LMP_MATH_SPECIAL_H #define LMP_MATH_SPECIAL_H #include namespace LAMMPS_NS { namespace MathSpecial { // support function for scaled error function complement extern double erfcx_y100(const double y100); // fast 2**x function without argument checks for little endian CPUs extern double exp2_x86(double x); +// fast e**x function for little endian CPUs, falls back to libc on other platforms + extern double fm_exp(double x); + // scaled error function complement exp(x*x)*erfc(x) for coul/long styles static inline double my_erfcx(const double x) { if (x >= 0.0) return erfcx_y100(400.0/(4.0+x)); else return 2.0*exp(x*x) - erfcx_y100(400.0/(4.0-x)); } // exp(-x*x) for coul/long styles static inline double expmsq(double x) { x *= x; x *= 1.4426950408889634074; // log_2(e) #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ return (x < 1023.0) ? exp2_x86(-x) : 0.0; #else return (x < 1023.0) ? exp2(-x) : 0.0; #endif } // x**2, use instead of pow(x,2.0) static inline double square(const double &x) { return x*x; } // x**3, use instead of pow(x,3.0) static inline double cube(const double &x) { return x*x*x; } // return -1.0 for odd n, 1.0 for even n, like pow(-1.0,n) static inline double powsign(const int n) { return (n & 1) ? -1.0 : 1.0; } // optimized version of pow(x,n) with n being integer // up to 10x faster than pow(x,y) static inline double powint(const double &x, const int n) { double yy,ww; if (x == 0.0) return 0.0; int nn = (n > 0) ? n : -n; ww = x; for (yy = 1.0; nn != 0; nn >>= 1, ww *=ww) if (nn & 1) yy *= ww; return (n > 0) ? yy : 1.0/yy; } // optimized version of (sin(x)/x)**n with n being a _positive_ integer static inline double powsinxx(const double &x, int n) { double yy,ww; if (x == 0.0) return 1.0; ww = sin(x)/x; for (yy = 1.0; n != 0; n >>= 1, ww *=ww) if (n & 1) yy *= ww; return yy; } } } #endif