diff --git a/doc/src/Build_manual.rst b/doc/src/Build_manual.rst index 73f2875a5d..2fc29f584b 100644 --- a/doc/src/Build_manual.rst +++ b/doc/src/Build_manual.rst @@ -224,7 +224,7 @@ and thus all special Sphinx features (cross-references, advanced tables, embedding of Python docstrings or doxygen documentation, and so on) will not render correctly. Most embedded math should render correctly. This is a **very fast** way to check the syntax and layout of a documentation -file translated to HTML while writing it. +file translated to HTML while writing or updating it. To translate **all** manual pages, you can type ``make fasthtml`` at the command line. The translated HTML files are then in the ``fasthtml`` @@ -236,7 +236,7 @@ directly translate only individual pages: e.g. to translate only the After writing the documentation is completed, you will still need to verify with ``make html`` and ``make pdf`` that it translates -correctly. +correctly in both formats. Tests for consistency, completeness, and other known issues ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/src/Errors_details.rst b/doc/src/Errors_details.rst index 5aa24d74c8..9ca69c5068 100644 --- a/doc/src/Errors_details.rst +++ b/doc/src/Errors_details.rst @@ -1,12 +1,14 @@ -Error and warning details -========================= +Errors and warnings details +=========================== -Many errors or warnings are self-explanatory and thus straightforward to -resolve. However, there are also cases, where there is no single cause -and explanation, where LAMMPS can only detect symptoms of an error but -not the exact cause, or where the explanation needs to be more detailed -than what can be fit into a message printed by the program. The -following are discussions of such cases. +Many errors and warnings that LAMMPS outputs are self-explanatory and +thus straightforward to resolve. However, there are also cases where +there is no single cause or simple explanation that can be provided in a +short message printed by LAMMPS. Therefore, more detailed discussions +of such scenarios are provided here; first on a more general level and +then for specific errors. In the latter cases, LAMMPS will output a +short message and then provide a URL that links to a specific section on +this page. .. contents:: @@ -75,13 +77,13 @@ simulation settings. For time critical code paths, LAMMPS will assume the user has chosen the settings carefully and will not make any checks to avoid to avoid performance penalties. -A crucial step in resolving a segmentation fault is to identify the exact -location in the code where it happens. Please see `Errors_debug` for -a couple of examples showing how to do this on a Linux machine. With -this information -- a simple way to reproduce the segmentation fault and -the exact :doc:`LAMMPS version ` and platform you are -running on -- you can contact the LAMMPS developers or post in the LAMMPS -forum to get assistance. +A crucial step in resolving a segmentation fault is to identify the +exact location in the code where it happens. Please see `Errors_debug` +for a couple of examples showing how to do this on a Linux machine. +With this information -- a simple way to reproduce the segmentation +fault and the exact :doc:`LAMMPS version ` and platform +you are running on -- you can contact the LAMMPS developers or post in +the LAMMPS forum to get assistance. .. _hint05: @@ -91,55 +93,57 @@ Fast moving atoms Fast moving atoms may be "lost" or "missing" when their velocity becomes so large that they can cross a sub-domain within one timestep. This often happens when atoms are too close, but atoms may also "move" too -fast from sub-domain to sub-domain if the box changes rapidly. E.g. when -setting a large an initial box with :doc:`shrink-wrap boundary +fast from sub-domain to sub-domain if the box changes rapidly. +E.g. when setting a large an initial box with :doc:`shrink-wrap boundary conditions ` that collapses on the first step (in this case the solution is often using 'm' instead of 's' as a boundary condition). To reduce the impact of "close contacts", one can remove those atoms or molecules with something like :doc:`delete_atoms overlap 0.1 all all -`. With periodic boundaries, a close contact pair of atoms -may be on opposite sides of the simulation box. Another option would be -to first run a minimization (aka quench) before starting the MD. Reducing -the time step can also help. Many times, one just needs to "ease" the -system into a balanced state and can then switch to more aggressive settings. +`. With periodic boundaries, a close contact pair of +atoms may be on opposite sides of the simulation box. Another option +would be to first run a minimization (aka quench) before starting +the MD. Reducing the time step can also help. Many times, one just +needs to "ease" the system into a balanced state and can then switch to +more aggressive settings. The speed of atoms during an MD run depends on the steepness of the potential function and their mass. Since the positions and velocities of atoms are computed with finite timesteps, the timestep needs to be -small enough for stable numeric integration of the trajectory. If the timestep -is too large during initialization (or other instances of extreme dynamics), -using :doc:`fix nve/limit ` or :doc:`fix dt/reset ` -temporarily can help to avoid too large updates or adapt the timestep according -to the displacements. +small enough for stable numeric integration of the trajectory. If the +timestep is too large during initialization (or other instances of +extreme dynamics), using :doc:`fix nve/limit ` or +:doc:`fix dt/reset ` temporarily can help to avoid too +large updates or adapt the timestep according to the displacements. .. _hint06: Ignoring lost atoms ^^^^^^^^^^^^^^^^^^^ -It is tempting to use the :doc:`thermo_modify lost ignore ` -to avoid LAMMPS aborting with an error on lost atoms. This setting should, -however, *only* be used when atoms *should* leave the system. In general, -ignoring a problem does not solve it. +It is tempting to use the :doc:`thermo_modify lost ignore +` to avoid LAMMPS aborting with an error on lost atoms. +This setting should, however, *only* be used when atoms *should* leave +the system. In general, ignoring a problem does not solve it. .. _hint07: Pressure, forces, positions becoming NaN or Inf ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Some potentials can overflow or have a division by zero with close contacts -or bad geometries (for the given force styles in use) leading to forces -that can no longer be represented as numbers. Those will show as "NaN" or -"Inf". On most machines, the program will continue, but there is no way -to recover from it and those NaN or Inf values will propagate. So-called -:doc:`"soft-core" potentials ` or the :doc:`"soft" repulsive-only -pair style ` are less prone for this behavior (depending on the -settings in use) and can be used at the beginning of a simulation. Also, -single precision numbers can overflow much faster, so for the GPU or INTEL -package it may be beneficial to run with double precision initially before -switching to mixed or single precision for faster execution when the system -has relaxed. +Some potentials can overflow or have a division by zero with close +contacts or bad geometries (for the given force styles in use) leading +to forces that can no longer be represented as numbers. Those will show +as "NaN" or "Inf". On most machines, the program will continue, but +there is no way to recover from it and those NaN or Inf values will +propagate. So-called :doc:`"soft-core" potentials ` or +the :doc:`"soft" repulsive-only pair style ` are less prone +for this behavior (depending on the settings in use) and can be used at +the beginning of a simulation. Also, single precision numbers can +overflow much faster, so for the GPU or INTEL package it may be +beneficial to run with double precision initially before switching to +mixed or single precision for faster execution when the system has +relaxed. .. _hint08: @@ -149,17 +153,17 @@ Communication cutoff The communication cutoff determines the "overlap" between sub-domains and atoms in these regions are referred to in LAMMPS as "ghost atoms". This region has to be large enough to contain all atoms of a bond, -angle, dihedral, or improper with just one atom in the actual sub-domain. -Typically, this cutoff is set to the largest cutoff from the :doc:`pair -style(s) ` plus the :doc:`neighbor list skin distance -` and will typically be sufficient for all bonded +angle, dihedral, or improper with just one atom in the actual +sub-domain. Typically, this cutoff is set to the largest cutoff from +the :doc:`pair style(s) ` plus the :doc:`neighbor list skin +distance ` and will typically be sufficient for all bonded interactions. But if the pair style cutoff is small, this may not be enough. LAMMPS will print a warning in this case using some heuristic -based on the equilibrium bond length, but that still may not be sufficient -for cases where the force constants are small and thus bonds may be -stretched very far. The communication cutoff can be adjusted with -:doc:`comm_modify cutoff \ `, but setting this too -large will waste CPU time and memory. +based on the equilibrium bond length, but that still may not be +sufficient for cases where the force constants are small and thus bonds +may be stretched very far. The communication cutoff can be adjusted +with :doc:`comm_modify cutoff \ `, but setting this +too large will waste CPU time and memory. .. _hint09: @@ -204,12 +208,12 @@ In some cases -- especially when running in parallel with MPI -- LAMMPS may stop without displaying an error. But the fact that nothing was displayed does not mean there was not an error message. Instead it is highly likely that the message was written to a buffer and LAMMPS was -aborted before the buffer was output. Usually, output buffers are output -for every line of output, but sometimes this is delayed until 4096 or -8192 bytes of output have been accumulated. This buffering for screen -and logfile output can be disabled by using the :ref:`-nb or -nonbuf -` command-line flag. This is most often needed when debugging -crashing multi-replica calculations. +aborted before the buffer was output. Usually, output buffers are +output for every line of output, but sometimes this is delayed until +4096 or 8192 bytes of output have been accumulated. This buffering for +screen and logfile output can be disabled by using the :ref:`-nb +or -nonbuf ` command-line flag. This is most often needed when +debugging crashing multi-replica calculations. .. _hint12: @@ -228,7 +232,7 @@ defined. Very few commands can be used before and after, like Most LAMMPS commands must be used after the simulation box is created. Consequently, LAMMPS will stop with an error, if a command is used in -the wrong place. This is not always obvious. So index or string style +the wrong place. This is not always obvious. So index or string style :doc:`variables ` can be expanded anywhere in the input, but equal style (or similar) variables can only be expanded before the box is defined if they do not reference anything that cannot be defined @@ -251,13 +255,14 @@ The header section informs LAMMPS how many entries or lines are expected in the various sections (like Atoms, Masses, Pair Coeffs, *etc.*\ ) of the data file. If there is a mismatch, LAMMPS will either keep reading beyond the end of a section or stop reading before the section has -ended. In that case the next line will not contain a recognized keyword. +ended. In that case the next line will not contain a recognized +keyword. -Such a mismatch can also happen when the first line of the data -is *not* a comment as required by the format, but a line with a valid -header keyword. That would result in LAMMPS expecting, for instance, -0 atoms because the "atoms" header line is the first line and thus -treated as a comment. +Such a mismatch can also happen when the first line of the data is *not* +a comment as required by the format, but a line with a valid header +keyword. That would result in LAMMPS expecting, for instance, 0 atoms +because the "atoms" header line is the first line and thus treated as a +comment. Another possibility to trigger this error is to have a keyword in the data file that corresponds to a fix (e.g. :doc:`fix cmap `) @@ -273,15 +278,15 @@ Incorrect format in ... section of data file This error happens when LAMMPS reads the contents of a section of a :doc:`data file ` and the number of parameters in the line -differs from what is expected. This most commonly happens when the -atom style is different from what is expected for a specific data file -since changing the atom style usually changes the format of the line. +differs from what is expected. This most commonly happens when the atom +style is different from what is expected for a specific data file since +changing the atom style usually changes the format of the line. This error can also occur when the number of entries indicated in the header of a data file (e.g. the number of atoms) is larger than the number of lines provided (e.g. in the corresponding Atoms section) -causing LAMMPS to continue reading into the next section which has -a completely different format. +causing LAMMPS to continue reading into the next section which has a +completely different format. .. _err0003: @@ -289,100 +294,114 @@ Illegal variable command: expected X arguments but found Y ---------------------------------------------------------- This error indicates that a variable command has the wrong number of -arguments. A common reason for this is that the variable expression -has whitespace, but is not enclosed in single or double quotes. +arguments. A common reason for this is that the variable expression has +whitespace, but is not enclosed in single or double quotes. To explain, the LAMMPS input parser reads and processes lines. The resulting line is broken down into "words". Those are usually -individual commands, labels, names, and values separated by whitespace (a -space or tab character). For "words" that may contain whitespace, they -have to be enclosed in single (') or double (") quotes. The parser will -then remove the outermost pair of quotes and pass that string as +individual commands, labels, names, and values separated by whitespace +(a space or tab character). For "words" that may contain whitespace, +they have to be enclosed in single (') or double (") quotes. The parser +will then remove the outermost pair of quotes and pass that string as "word" to the variable command. Thus missing quotes or accidental extra whitespace will trigger this -error because the unquoted whitespace will result in the text being broken -into more "words", i.e. the variable expression being split. +error because the unquoted whitespace will result in the text being +broken into more "words", i.e. the variable expression being split. .. _err0004: Out of range atoms - cannot compute ... --------------------------------------- -The PPPM (and also PPPMDisp and MSM) methods need to assemble a grid -of electron density data derived from the (partial) charges assigned to -the atoms. These charges are smeared out across multiple grid points -(see :doc:`kspace_modify order `). When running in -parallel with MPI, LAMMPS uses a :doc:`domain decomposition scheme +The PPPM (and also PPPMDisp and MSM) methods need to assemble a grid of +electron density data derived from the (partial) charges assigned to the +atoms. These charges are smeared out across multiple grid points (see +:doc:`kspace_modify order `). When running in parallel +with MPI, LAMMPS uses a :doc:`domain decomposition scheme ` where each processor manages a subset of atoms and -thus also a grid representing the density. The processor's grid covers the -actual volume of the sub-domain and some extra space corresponding to the -:doc:`neighbor list skin `. These are then :doc:`combined and -redistributed ` for parallel processing of the -long-range component of the Coulomb interaction. +thus also a grid representing the density. The processor's grid covers +the actual volume of the sub-domain and some extra space corresponding +to the :doc:`neighbor list skin `. These are then +:doc:`combined and redistributed ` for parallel +processing of the long-range component of the Coulomb interaction. The ``Out of range atoms`` error can happen when atoms move too fast, the neighbor list skin is too small, or the neighbor lists are not updated frequently enough. The smeared charges cannot then be fully assigned to the density grid for all atoms. LAMMPS checks for this condition and stops with an error. Most of the time, this is an -indication of a system with very high forces, often at the beginning -of a simulation or when boundary conditions are changed. The -error becomes more likely with more MPI processes. +indication of a system with very high forces, often at the beginning of +a simulation or when boundary conditions are changed. The error becomes +more likely with more MPI processes. There are multiple options to explore for avoiding the error. The best choice depends strongly on the individual system, and often a combination of changes is required. For example, more conservative MD parameter settings can be used (larger neighbor skin, shorter time step, more frequent neighbor list updates). Sometimes, it helps to revisit -the system generation and avoid close contacts when building it. Otherwise -one can use the :doc:`delete_atoms overlap` command to delete -those close contact atoms or run a minimization before the MD. It can also -help to temporarily use a cutoff-Coulomb pair style and no kspace style -until the system has somewhat equilibrated and then switch to the -long-range solver. +the system generation and avoid close contacts when building it. +Otherwise one can use the :doc:`delete_atoms overlap` +command to delete those close contact atoms or run a minimization before +the MD. It can also help to temporarily use a cutoff-Coulomb pair style +and no kspace style until the system has somewhat equilibrated and then +switch to the long-range solver. .. _err0005: -Bond (or angle, dihedral, or improper) atoms missing ----------------------------------------------------- +Bond (or angle, dihedral, improper, cmap, or shake) atoms missing +----------------------------------------------------------------- -The second atom needed to compute a particular bond (or the third or fourth -atom for angle, dihedral, or improper) is missing on the indicated timestep -and processor. Typically, this is because the two bonded atoms have become -too far apart relative to the communication cutoff distance for ghost atoms. -By default, the communication cutoff is set by the pair cutoff. However, to -accommodate larger distances between topologically connected atoms, it can -be manually adjusted using :doc:`comm_modify ` at the cost of -increased communication and more ghost atoms. However, missing bond atoms -may also indicate that there are unstable dynamics which caused the atoms -to blow apart. In this scenario, increasing the communication distance will -not solve the underlying issue. Rather, see :ref:`Fast moving atoms ` -and :ref:`Neighbor list settings ` in the general troubleshooting +The second atom needed to compute a particular bond (or the third or +fourth atom for angle, dihedral, or improper) is missing on the +indicated timestep and processor. Typically, this is because the two +bonded atoms have become too far apart relative to the communication +cutoff distance for ghost atoms. By default, the communication cutoff +is set by the pair cutoff. However, to accommodate larger distances +between topologically connected atoms, it can be manually adjusted using +:doc:`comm_modify ` at the cost of increased communication +and more ghost atoms. However, missing bond atoms may also indicate +that there are unstable dynamics which caused the atoms to blow apart. +In this scenario, increasing the communication distance will not solve +the underlying issue. Rather, see :ref:`Fast moving atoms ` and +:ref:`Neighbor list settings ` in the general troubleshooting section above for ideas to fix unstable dynamics. -If atoms are intended to be lost during a simulation (e.g. due to open boundary -conditions or :doc:`fix evaporate `) such that two bonded atoms -may be lost at different times from each other, this error can be converted to a -warning or turned off using the *lost/bond* keyword in the :doc:`thermo_modify -` command. +If atoms are intended to be lost during a simulation (e.g. due to open +boundary conditions or :doc:`fix evaporate `) such that +two bonded atoms may be lost at different times from each other, this +error can be converted to a warning or turned off using the *lost/bond* +keyword in the :doc:`thermo_modify ` command. .. _err0006: -Non-numeric atom coords - simulation unstable ---------------------------------------------- -This error usually occurs due to issues with system geometry or the potential in -use. See :ref:`Pressure, forces, positions becoming NaN or Inf ` above in the -general troubleshooting section. +Non-numeric atom coords or pressure or box dimensions - simulation unstable +--------------------------------------------------------------------------- -.. _err0007: +This error usually occurs due to overly aggressive simulation settings +or issues with the system geometry or the potential. See +:ref:`Pressure, forces, positions becoming NaN or Inf ` above in +the general troubleshooting section. This error is more likely to +happen during equilibration, so it can help to do a minimization before +or even add a second or third minimization after running a few +equilibration MD steps. It also is more likely when directly using a +Nose-Hoover (or other) barostat, and thus it may be advisable to run +with only a thermostat for a bit until the potential energy has +stabilized. -Non-numeric pressure - simulation unstable ------------------------------------------- -This error usually occurs due to issues with system geometry or the potential in -use. See :ref:`Pressure, forces, positions becoming NaN or Inf ` above in the -general troubleshooting section. +.. _err007: +Fix used in ... not computed at compatible time +----------------------------------------------- + +Many fix styles are invoked only every *nevery* timesteps, which means +their data is only valid on those steps. When data from a fix is used +as input for a compute, a dump, another fix, or thermo output, it must +read that data at timesteps when the fix in question was invoked, i.e. +on timesteps that are multiples of its *nevery* setting. If this is not +the case, LAMMPS will stop with an error. To remedy this, it may be +required to change the output frequency or the *nevery* setting of the +fix. .. _err0008: @@ -390,48 +409,73 @@ Lost atoms ... -------------- A simulation stopping with an error due to lost atoms can have multiple -causes. In the majority of cases, lost atoms are unexpected and a result -of extremely high velocities causing instabilities in the system, and -those velocities can result from a variety of issues. For ideas on how -to track down issues with unexpected lost atoms, see :ref:`Fast moving -atoms ` and :ref:`Neighbor list settings ` in the -general troubleshooting section above. In specific situations however, -losing atoms is expected material behavior (e.g. with sputtering and -surface evaporation simulations) and an unwanted crash can be resolved -by changing the :doc:`thermo_modify lost ` keyword from -the default 'error' to 'warn' or 'ignore' (though heed the advice in -:ref:`Ignoring lost atoms ` above!). +causes. By default, LAMMPS checks for whether the total number of atoms +is consistent with the sum of atoms "owned" by MPI processors every time +that thermodynamic output is written. In the majority of cases, lost +atoms are unexpected and a result of extremely high velocities causing +instabilities in the system. Such velocities can result from a variety +of issues. For ideas on how to track down issues with unexpected lost +atoms, see :ref:`Fast moving atoms ` and :ref:`Neighbor list +settings ` in the general troubleshooting section above. In +specific situations however, losing atoms is expected material behavior +(e.g. with sputtering and surface evaporation simulations), and an +unwanted crash can be avoided by changing the :doc:`thermo_modify lost +` keyword from the default 'error' to 'warn' or 'ignore' +(though heed the advice in :ref:`Ignoring lost atoms ` above!). .. _err0009: Too many neighbor bins ---------------------- -The simulation box has become too large relative to the size of a -neighbor bin and LAMMPS is unable to store the needed number of -bins. This typically implies the simulation box has expanded too far. -This can happen when some atoms move rapidly apart with shrink-wrap boundaries -or when a fix (like fix deform or a barostat) excessively grows the simulation -box. +The simulation box is or has become too large relative to the size of a +neighbor bin (which in turn depends on the largest pair-wise cutoff by +default) such that LAMMPS is unable to store the needed number of bins. +This typically implies the simulation box has expanded too far. That +can occur when some atoms move rapidly apart with shrink-wrap boundaries +or when a fix (like fix deform or a barostat) excessively grows the +simulation box. This can also happen if the largest pair-wise cutoff is +small. In this case, the error can be avoided by using the +:doc:`neigh_modify command ` to set the bin width to a +suitably large value. .. _err0010: -Unrecognized pair style ... is part of ... package which is not enabled in this LAMMPS binary ---------------------------------------------------------------------------------------------- +Unrecognized ... style ... is part of ... package which is not enabled in this LAMMPS binary +-------------------------------------------------------------------------------------------- -The LAMMPS executable (binary) being used was not compiled with a package -containing the specified pair style. This indicates that the executable needs to -be re-built after enabling the correct package in the relevant Makefile or CMake -build directory. See :doc:`Section 3. Build LAMMPS ` for more details. -One can check if the expected package and pair style is present in the -executable by running it with the ``-help`` (or ``-h``) flag on the command -line. One common oversight, especially for beginner LAMMPS users, is to enable -the package, but to forget to run commands to rebuild (e.g., to run the final -``make`` or ``cmake`` command). +The LAMMPS executable (binary) being used was not compiled with a +package containing the specified style. This indicates that the +executable needs to be re-built after enabling the correct package in +the relevant Makefile or CMake build directory. See +:doc:`Section 3. Build LAMMPS ` for more details. One can check +if the expected package and pair style is present in the executable by +running it with the ``-help`` (or ``-h``) flag on the command line. One +common oversight, especially for beginner LAMMPS users, is enabling the +package but forgetting to run commands to rebuild (e.g., to run the +final ``make`` or ``cmake`` command). -If this error is occurring with an executable that the user does not control -(e.g., through a module on HPC clusters), the user will need to get in contact -with the relevant person or people who can update the executable. +If this error occurs with an executable that the user does not control +(e.g., through a module on HPC clusters), the user will need to get in +contact with the relevant person or people who can update the +executable. + +.. _err011: + +Energy or stress was not tallied by pair style +---------------------------------------------- + +This warning can be printed by computes from the :ref:`TALLY package +`. Those use a callback mechanism that only work for regular +pair-wise additive pair styles like :doc:`Lennard-Jones `, +:doc:`Morse `, :doc:`Born-Meyer-Huggins `, and +similar. Such required callbacks have not been implemented for +many-body potentials so one would have to implement them to add +compatiability with these computes (which may be difficult to do in a +generic fashion). Whether this warning indicates that contributions to +the computed properties are missing depends on the groups used. At any +rate, careful testing of the results is advised when this warning +appears. .. _err0012: @@ -455,9 +499,10 @@ Substitution for illegal variable A variable in an input script or a variable expression was not found in the list of valid variables. The most common reason for this is a typo -somewhere in the input file such that the expression uses an invalid variable -name. The second most common reason is omitting the curly braces for a -direct variable with a name that is not a single letter. For example: +somewhere in the input file such that the expression uses an invalid +variable name. The second most common reason is omitting the curly +braces for a direct variable with a name that is not a single letter. +For example: .. code-block:: LAMMPS @@ -469,14 +514,13 @@ direct variable with a name that is not a single letter. For example: Another potential source of this error may be invalid command line variables (-var or -v argument) used when launching LAMMPS from an interactive shell or shell scripts. An uncommon source for this error -is using the :doc:`next command ` to advance through a list of values -provided by an index style variable. If there is no remaining element in -the list, LAMMPS will delete the variable and any following expansion or -reference attempt will trigger the error. +is using the :doc:`next command ` to advance through a list of +values provided by an index style variable. If there is no remaining +element in the list, LAMMPS will delete the variable and any following +expansion or reference attempt will trigger the error. -Users with harder-to-track variable errors might also find reading -:doc:`Section 5.2. Parsing rules for input scripts` -helpful. +Users with harder-to-track variable errors might also find reading the +:doc:`Parsing rules for input scripts ` helpful. .. _err0014: @@ -489,9 +533,9 @@ of the LAMMPS code where it updates the domain decomposition and before it builds the neighbor lists. It checks that both atoms of a bond are within the communication cutoff of a subdomain. It is usually caused by atoms moving too fast (see the :ref:`paragraph on fast moving atoms -`), or by the :doc:`communication cutoff being too -small `, or by waiting too long between :doc:`sub-domain -and neighbor list updates `. +`), or by the :doc:`communication cutoff being too small +`, or by waiting too long between :doc:`sub-domain and +neighbor list updates `. .. _err0015: @@ -499,41 +543,43 @@ Cannot use neighbor bins - box size \<\< cutoff ----------------------------------------------- LAMMPS is unable to build neighbor bins since the size of the box is -much smaller than an interaction cutoff in at least one of its dimensions. -Typically, this error is triggered when the simulation box has one very -thin dimension. If a cubic neighbor bin had to fit exactly within -the thin dimension, then an inordinate amount of bins would be created to -fill space. This error can be avoided using the generally slower -:doc:`nsq neighbor style ` or by increasing the size of the -smallest box lengths. +much smaller than an interaction cutoff in at least one of its +dimensions. Typically, this error is triggered when the simulation box +has one very thin dimension. If a cubic neighbor bin had to fit exactly +within the thin dimension, then an inordinate amount of bins would be +created to fill space. This error can be avoided using the generally +slower :doc:`nsq neighbor style ` or by increasing the size of +the smallest box lengths. .. _err0016: Did not assign all atoms correctly ---------------------------------- -This error happens most commonly when :doc:`reading a data file ` -under :doc:`non-periodic boundary conditions`. Only atoms with -positions **inside** the simulation box will be read and thus any atoms -outside the box will be skipped and the total atom count will not match, -which triggers the error. This does not happen with periodic boundary -conditions where atoms outside the principal box will be "wrapped" into -the principal box and their image flags set accordingly. +This error happens most commonly when :doc:`reading a data file +` under :doc:`non-periodic boundary conditions`. +Only atoms with positions **inside** the simulation box will be read and +thus any atoms outside the box will be skipped and the total atom count +will not match, which triggers the error. This does not happen with +periodic boundary conditions where atoms outside the principal box will +be "wrapped" into the principal box and their image flags set +accordingly. -Similar errors can happen with the :doc:`replicate command` or -the :doc:`read_restart command`. In these cases the cause -may be a problematic geometry, an insufficient communication cutoff, or -a bug in the LAMMPS source code. In these cases it is advisable to set -up :ref:`small test case ` for testing and debugging. This will -be required in case you need to get help from a LAMMPS developer. +Similar errors can happen with the :doc:`replicate command` +or the :doc:`read_restart command`. In these cases the +cause may be a problematic geometry, an insufficient communication +cutoff, or a bug in the LAMMPS source code. In these cases it is +advisable to set up :ref:`small test case ` for testing and +debugging. This will be required in case you need to get help from a +LAMMPS developer. .. _err0017: Domain too large for neighbor bins ---------------------------------- -The domain has become extremely large so that neighbor bins cannot -be used. Too many neighbor bins would need to be created to fill space. +The domain has become extremely large so that neighbor bins cannot be +used. Too many neighbor bins would need to be created to fill space. Most likely, one or more atoms have been blown a great distance out of the simulation box or a fix (like fix deform or a barostat) has excessively grown the simulation box. @@ -549,13 +595,13 @@ of bonds and hydrogen bonds can change due to chemical reactions. The default approach, however, assumes that these changes are not very large, so it allocates buffers for the current system setup plus a safety margin. This can be adjusted with the :doc:`safezone, mincap, -and minhbonds settings of the pair style `, but only to some -extent. When equilibrating a new system, or simulating a sparse system -in parallel, this can be difficult to control and become wasteful. A -simple workaround is often to break a simulation down in multiple -chunks. A better approach, however, is to compile and use the KOKKOS -package version of ReaxFF (you do not need a GPU for that, but can also -compile it in serial or OpenMP mode), which uses a more robust +and minhbonds settings of the pair style `, but only to +some extent. When equilibrating a new system, or simulating a sparse +system in parallel, this can be difficult to control and become +wasteful. A simple workaround is often to break a simulation down in +multiple chunks. A better approach, however, is to compile and use the +KOKKOS package version of ReaxFF (you do not need a GPU for that, but +can also compile it in serial or OpenMP mode), which uses a more robust memory allocation approach. .. _err0019: @@ -567,17 +613,17 @@ This error most commonly happens when setting force field coefficients with either the :doc:`pair_coeff `, the :doc:`bond_coeff `, the :doc:`angle_coeff `, the :doc:`dihedral_coeff `, or the :doc:`improper_coeff -` command. These commands accept type labels, -explicit numbers, and wildcards for ranges of numbers. If the numeric -value of any of these is outside the valid range (defined by the number -of corresponding types), LAMMPS will stop with this error. A few other -commands and styles also allow ranges of numbers and check -using the same method and thus print the same kind of error. +` command. These commands accept type labels, explicit +numbers, and wildcards for ranges of numbers. If the numeric value of +any of these is outside the valid range (defined by the number of +corresponding types), LAMMPS will stop with this error. A few other +commands and styles also allow ranges of numbers and check using the +same method and thus print the same kind of error. -The cause is almost always a typo in the input or a logic error -when defining the values or ranges. So one needs to carefully -review the input. Along with the error, LAMMPS will print the -valid range as a hint. +The cause is almost always a typo in the input or a logic error when +defining the values or ranges. So one needs to carefully review the +input. Along with the error, LAMMPS will print the valid range as a +hint. .. _err0020: @@ -589,7 +635,7 @@ per-atom vector or array provided by a compute or fix or atom-style or vector-style variable or data from a specific atom, an index in square brackets ("[ ]") (or two indices) must be provided to determine which element to access and it must be in a valid range or else LAMMPS would -access invalid data or crash with a segmentation fault. In the two most +access invalid data or crash with a segmentation fault. In the two most common cases, where this data is accessed, :doc:`variable expressions ` and :doc:`thermodynamic output `, LAMMPS will check for valid indices and stop with an error otherwise. @@ -607,34 +653,37 @@ properties at every step. Incorrect args for pair coefficients (also bond/angle/dihedral/improper coefficients) ------------------------------------------------------------------------------------- -The parameters in the :doc:`pair_coeff ` command for a specified -:doc:`pair_style ` have a missing or erroneous argument. The same -applies when seeing this error for :doc:`bond_coeff `, -:doc:`angle_coeff `, :doc:`dihedral_coeff `, or -:doc:`improper_coeff ` and their respective style commands when -using the MOLECULE or EXTRA-MOLECULE packages. The cases below describe -some ways to approach pair coefficient errors, but the same strategies -apply to bonded systems as well. +The parameters in the :doc:`pair_coeff ` command for a +specified :doc:`pair_style ` have a missing or erroneous +argument. The same applies when seeing this error for :doc:`bond_coeff +`, :doc:`angle_coeff `, :doc:`dihedral_coeff +`, or :doc:`improper_coeff ` and their +respective style commands when using the MOLECULE or EXTRA-MOLECULE +packages. The cases below describe some ways to approach pair +coefficient errors, but the same strategies apply to bonded systems as +well. -Outside of normal typos, this error can have several sources. In all cases, the -first step is to compare the command arguments to the expected format found in -the corresponding :doc:`pair_style ` page. This can reveal cases -where, for example, a pair style was changed, but the pair coefficients were not -updated. This can happen especially with pair style variants such as -:doc:`pair_style eam ` vs. :doc:`pair_style eam/alloy ` -that look very similar but accept different parameters (the latter 'eam/alloy' -variant takes element type names while 'eam' does not). +Outside of normal typos, this error can have several sources. In all +cases, the first step is to compare the command arguments to the +expected format found in the corresponding :doc:`pair_style +` page. This can reveal cases where, for example, a pair +style was changed, but the pair coefficients were not updated. This can +happen especially with pair style variants such as :doc:`pair_style eam +` vs. :doc:`pair_style eam/alloy ` that look very +similar but accept different parameters (the latter 'eam/alloy' variant +takes element type names while 'eam' does not). -Another common source of coefficient errors is when using multiple pair styles -with commands such as :doc:`pair_style hybrid `. Using hybrid pair -styles requires adding an extra "label" argument in the coefficient commands -that designates which pair style the command line refers to. Moreover, if -the same pair style is used multiple times, this label must be followed by -an additional numeric argument. Also, different pair styles may require -different arguments. +Another common source of coefficient errors is when using multiple pair +styles with commands such as :doc:`pair_style hybrid `. +Using hybrid pair styles requires adding an extra "label" argument in +the coefficient commands that designates which pair style the command +line refers to. Moreover, if the same pair style is used multiple +times, this label must be followed by an additional numeric argument. +Also, different pair styles may require different arguments. -This error message might also require a close look at other LAMMPS input files -that are read in by the input script, such as data files or restart files. +This error message might also require a close look at other LAMMPS input +files that are read in by the input script, such as data files or +restart files. .. _err0022: @@ -647,20 +696,20 @@ LAMMPS does *not* calculate these quantities when the forces are calculated on every timestep or iteration. Global quantities are only calculated when they are needed for :doc:`thermo ` output (at the beginning, end, and at regular intervals specified by the -:doc:`thermo ` command). Similarly, per-atom quantities are only -calculated if they are needed to write per-atom energy or virial to a -dump file. This system works fine for simple input scripts. However, +:doc:`thermo ` command). Similarly, per-atom quantities are +only calculated if they are needed to write per-atom energy or virial to +a dump file. This system works fine for simple input scripts. However, the many user-specified `variable`, `fix`, and `compute` commands that LAMMPS provides make it difficult to anticipate when a quantity will be -requested. In some use cases, LAMMPS will figure out that a quantity is +requested. In some use cases, LAMMPS will figure out that a quantity is needed and arrange for it to be calculated on that timestep e.g. if it is requested by :doc:`fix ave/time ` or similar commands. If that fails, it can be detected by a mismatch between the current timestep and when a quantity was last calculated, in which case an error message of this type is generated. -The most common cause of this type of error is requesting a quantity before -the start of the simulation. +The most common cause of this type of error is requesting a quantity +before the start of the simulation. .. code-block:: LAMMPS @@ -669,13 +718,13 @@ the start of the simulation. print "Potential energy = $e" # this will generate the error run 1000 # start of simulation -This situation can be avoided by adding in a "run 0" command, as explained in -more detail in the "Variable Accuracy" section of the +This situation can be avoided by adding in a "run 0" command, as +explained in more detail in the "Variable Accuracy" section of the :doc:`variable ` doc page. -Another cause is requesting a quantity on a timestep that is not -a thermo or dump output timestep. This can often be -remedied by increasing the frequency of thermo or dump output. +Another cause is requesting a quantity on a timestep that is not a +thermo or dump output timestep. This can often be remedied by +increasing the frequency of thermo or dump output. .. _err0023: @@ -684,19 +733,19 @@ Molecule auto special bond generation overflow In order to correctly apply the :doc:`special_bonds ` settings (also known as "exclusions"), LAMMPS needs to maintain for each -atom a list of atoms that are connected to this atom, either directly with -a bond or indirectly through bonding with an intermediate atom(s). The purpose -is to either remove or tag those pairs of atoms in the neighbor list. This -information is stored with individual -atoms and thus the maximum number of such "special" neighbors is set -when the simulation box is created. When reading (relative) geometry -and topology of a 'molecule' from a :doc:`molecule file `, -LAMMPS will build the list of such "special" neighbors for the molecule atom +atom a list of atoms that are connected to this atom, either directly +with a bond or indirectly through bonding with an intermediate atom(s). +The purpose is to either remove or tag those pairs of atoms in the +neighbor list. This information is stored with individual atoms and +thus the maximum number of such "special" neighbors is set when the +simulation box is created. When reading (relative) geometry and +topology of a 'molecule' from a :doc:`molecule file `, LAMMPS +will build the list of such "special" neighbors for the molecule atom (if not given in the molecule file explicitly). The error is triggered -when the resulting list is too long for the space reserved when -creating the simulation box. The solution is to increase the -corresponding setting. Overestimating this value will only consume -more memory, and is thus a safe choice. +when the resulting list is too long for the space reserved when creating +the simulation box. The solution is to increase the corresponding +setting. Overestimating this value will only consume more memory, and +is thus a safe choice. .. _err0024: @@ -704,14 +753,14 @@ Molecule topology/atom exceeds system topology/atom --------------------------------------------------- LAMMPS uses :doc:`domain decomposition ` to -distribute data (i.e. atoms) across the MPI processes in parallel -runs. This includes topology data about bonds, angles, -dihedrals, impropers and :doc:`"special" neighbors `. -This information is stored with either one or all atoms involved in such -a topology entry (which of the two option applies depends on the -:doc:`newton ` setting for bonds). When reading a data file, -LAMMPS analyzes the requirements for this file and then the values are -"locked in" and cannot be extended. +distribute data (i.e. atoms) across the MPI processes in parallel runs. +This includes topology data about bonds, angles, dihedrals, impropers +and :doc:`"special" neighbors `. This information is +stored with either one or all atoms involved in such a topology entry +(which of the two option applies depends on the :doc:`newton ` +setting for bonds). When reading a data file, LAMMPS analyzes the +requirements for this file and then the values are "locked in" and +cannot be extended. So loading a molecule file that requires more of the topology per atom storage or adding a data file with such needs will lead to an error. To @@ -727,10 +776,10 @@ Molecule topology type exceeds system topology type --------------------------------------------------- The total number of atom, bond, angle, dihedral, and improper types is -"locked in" when LAMMPS creates the simulation box. This can happen +"locked in" when LAMMPS creates the simulation box. This can happen through either the :doc:`create_box `, the :doc:`read_data `, or the :doc:`read_restart ` command. After -this it is not possible to refer to an additional type. So loading a +this it is not possible to refer to an additional type. So loading a molecule file that uses additional types or adding a data file that would require additional types will lead to an error. To avoid the error, one or more of the `extra/XXX/types` keywords are required to @@ -761,9 +810,10 @@ with periodic boundaries or larger than the box with non-periodic boundaries. It means that the positions and image flags have become inconsistent. LAMMPS will still compute bonded interactions based on the closest periodic images of the atoms and thus in most cases the -results will be correct. Nevertheless, it is good practice to update -the system so that the message does not appear. It will help with -future manipulations of the system. +results will be correct. However they can cause problems when such +atoms are used with the fix rigid or replicate commands. Thus, it is +good practice to update the system so that the message does not appear. +It will help with future manipulations of the system. There is one case where this warning *must* appear: when you have a chain of connected bonds that pass through the entire box and connect @@ -778,17 +828,18 @@ beginning of the chain. No fixes with time integration, atoms won't move ------------------------------------------------ -This warning will be issued if LAMMPS encounters a :doc:`run ` command that -does not have a preceding :doc:`fix ` command that updates atom/object -positions and velocities per step. In other words, there are no fixes detected -that perform velocity-Verlet time integration, such as :doc:`fix nve `. -Note that this alert does not mean that there are no active fixes. LAMMPS has a -very wide variety of fixes, many of which do not move objects but also operate -through steps, such as printing outputs (e.g. :doc:`fix print `), -performing calculations (e.g. :doc:`fix ave/time `), or changing -other system parameters (e.g. :doc:`fix dt/reset `). It is up to -the user to determine whether the lack of a time-integrating fix is intentional -or not. +This warning will be issued if LAMMPS encounters a :doc:`run ` +command that does not have a preceding :doc:`fix ` command that +updates atom/object positions and velocities per step. In other words, +there are no fixes detected that perform velocity-Verlet time +integration, such as :doc:`fix nve `. Note that this alert +does not mean that there are no active fixes. LAMMPS has a very wide +variety of fixes, many of which do not move objects but also operate +through steps, such as printing outputs (e.g. :doc:`fix print +`), performing calculations (e.g. :doc:`fix ave/time +`), or changing other system parameters (e.g. :doc:`fix +dt/reset `). It is up to the user to determine whether +the lack of a time-integrating fix is intentional or not. .. _err0029: @@ -796,36 +847,39 @@ or not. System is not charge neutral, net charge = ... ---------------------------------------------- -the sum of charges in the system is not zero. When a system is not -charge-neutral, methods that evolve/manipulate per-atom charges, evaluate -Coulomb interactions, evaluate Coulomb forces, or evaluate/manipulate other -properties relying on per-atom charges may raise this warning. A non-zero -net charge most commonly arises after setting per-atom charges :doc:`set ` -such that the sum is non-zero or by reading in a system through :doc:`read_data -` where the per-atom charges do not sum to zero. However, a loss of -charge neutrality may occur in other less common ways, like when charge +the sum of charges in the system is not zero. When a system is not +charge-neutral, methods that evolve/manipulate per-atom charges, +evaluate Coulomb interactions, evaluate Coulomb forces, or +evaluate/manipulate other properties relying on per-atom charges may +raise this warning. A non-zero net charge most commonly arises after +setting per-atom charges :doc:`set ` such that the sum is non-zero +or by reading in a system through :doc:`read_data ` where the +per-atom charges do not sum to zero. However, a loss of charge +neutrality may occur in other less common ways, like when charge equilibration methods (e.g., :doc:`fix qeq `) fail. -A similar warning/error may be raised when using certain charge equilibration -methods: :doc:`fix qeq `, :doc:`fix qeq/comb `, :doc:`fix -qeq/reaxff `, and :doc:`fix qtpie/reaxff `. In -such cases, this warning/error will be raised for the fix :doc:`group ` -when the group has a non-zero net charge. +A similar warning/error may be raised when using certain charge +equilibration methods: :doc:`fix qeq `, :doc:`fix qeq/comb +`, :doc:`fix qeq/reaxff `, and :doc:`fix +qtpie/reaxff `. In such cases, this warning/error +will be raised for the fix :doc:`group ` when the group has a +non-zero net charge. -When the system is expected to be charge-neutral, this warning often arises due -to an error in the lammps input (e.g., an incorrect :doc:`set ` command, -error in the data file read by :doc:`read_data `, incorrectly -grouping atoms with charge, etc.). If the system is NOT expected to be -charge-neutral, the user should make sure that the method(s) used are -appropriate for systems with a non-zero net charge. Some commonly used fixes for -charge equilibration :doc:`fix qeq `, pair styles that include charge -interactions :doc:`pair_style coul/XXX `, and kspace methods -:doc:`kspace_style ` can, in theory, support systems with non-zero -net charge. However, non-zero net charge can lead to spurious artifacts. The -severity of these artifacts depends on the magnitude of total charge, system -size, and methods used. Before running simulations or calculations for systems -with non-zero net charge, users should test for artifacts and convergence of -properties. +When the system is expected to be charge-neutral, this warning often +arises due to an error in the lammps input (e.g., an incorrect :doc:`set +` command, error in the data file read by :doc:`read_data +`, incorrectly grouping atoms with charge, etc.). If the +system is NOT expected to be charge-neutral, the user should make sure +that the method(s) used are appropriate for systems with a non-zero net +charge. Some commonly used fixes for charge equilibration :doc:`fix qeq +`, pair styles that include charge interactions +:doc:`pair_style coul/XXX `, and kspace methods +:doc:`kspace_style ` can, in theory, support systems with +non-zero net charge. However, non-zero net charge can lead to spurious +artifacts. The severity of these artifacts depends on the magnitude of +total charge, system size, and methods used. Before running simulations +or calculations for systems with non-zero net charge, users should test +for artifacts and convergence of properties. .. _err0030: @@ -859,3 +913,41 @@ keyword, LAMMPS stops with the 'Invalid thermo keyword' error. But it is also possible, that there is just a typo in the name of a valid variable function. Thus it is recommended to check the failing variable expression very carefully. + +.. _err0032: + +One or more atoms are time integrated more than once +---------------------------------------------------- + +This is probably an error since you typically do not want to advance the +positions or velocities of an atom more than once per timestep. This +typically happens when there are multiple fix commands that advance atom +positions with overlapping groups. Also, for some fix styles it is not +immediately obvious that they include time integration. Please check +the documentation carefully. + +.. _err0033: + +XXX command before simulation box is defined +-------------------------------------------- + +This error occurs when trying to excute a LAMMPS command that requires +information about the system dimensions, or the number atom, bond, +angle, dihedral, or improper types, or the number of atoms or similar +data that is only available *after* the simulation box has been created. +See the paragraph on :ref:`errors before or after the simulation box is +created ` for additional information. + +.. _err0034: + +XXX command after simulation box is defined +-------------------------------------------- + +This error occurs when trying to excute a LAMMPS command that changes a +global setting *after* it is locked in when the simulation box is +created (for instance defining the :doc:`atom style `, +:doc:`dimension `, :doc:`newton `, or :doc:`units +` setting). These settings may only be changed *before* the +simulation box has been created. See the paragraph on :ref:`errors +before or after the simulation box is created ` for additional +information. diff --git a/doc/src/Errors_messages.rst b/doc/src/Errors_messages.rst index 7be94f6fb3..d1318ceffe 100644 --- a/doc/src/Errors_messages.rst +++ b/doc/src/Errors_messages.rst @@ -1,11 +1,15 @@ Error messages ============== -This is an alphabetic list of the ERROR messages LAMMPS prints out and -the reason why. If the explanation here is not sufficient, the -documentation for the offending command may help. Error messages also -list the source file and line number where the error was generated. -For example, a message like this: +This is an alphabetic list of some of the ERROR messages LAMMPS prints +out and the reason why. If the explanation here is not sufficient, the +documentation for the offending command may help. This is a historic +list and no longer updated. Instead the LAMMPS developers are trying +to provide more details right with the error message or link to a +paragraph with :doc:`detailed explanations `. + +Error messages also list the source file and line number where the error +was generated. For example, a message like this: .. parsed-literal:: @@ -14,20 +18,10 @@ For example, a message like this: means that line #78 in the file src/velocity.cpp generated the error. Looking in the source code may help you figure out what went wrong. -Doc page with :doc:`WARNING messages ` +Please also see the page with :doc:`Warning messages `. ---------- -*1-3 bond count is inconsistent* - An inconsistency was detected when computing the number of 1-3 - neighbors for each atom. This likely means something is wrong with - the bond topologies you have defined. - -*1-4 bond count is inconsistent* - An inconsistency was detected when computing the number of 1-4 - neighbors for each atom. This likely means something is wrong with - the bond topologies you have defined. - *Accelerator sharing is not currently supported on system* Multiple MPI processes cannot share the accelerator on your system. For NVIDIA GPUs, see the nvidia-smi command to change this @@ -37,15 +31,6 @@ Doc page with :doc:`WARNING messages ` All angle coefficients must be set in the data file or by the angle_coeff command before running a simulation. -*All atom IDs = 0 but atom_modify id = yes* - Self-explanatory. - -*All atoms of a swapped type must have same charge.* - Self-explanatory. - -*All atoms of a swapped type must have the same charge.* - Self-explanatory. - *All bond coeffs are not set* All bond coefficients must be set in the data file or by the bond_coeff command before running a simulation. @@ -79,12 +64,6 @@ Doc page with :doc:`WARNING messages ` the x,y,z fields, else LAMMPS cannot reconstruct the unscaled coordinates. -*All universe/uloop variables must have same # of values* - Self-explanatory. - -*All variables in next command must be same style* - Self-explanatory. - *Angle atom missing in delete_bonds* The delete_bonds command cannot find one or more atoms in a particular angle on a particular processor. The pairwise cutoff is too short or @@ -95,18 +74,6 @@ Doc page with :doc:`WARNING messages ` a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid angle. -*Angle atoms %d %d %d missing on proc %d at step %ld* - One or more of three atoms needed to compute a particular angle are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the angle has blown apart and an atom is - too far away. - -*Angle atoms missing on proc %d at step %ld* - One or more of three atoms needed to compute a particular angle are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the angle has blown apart and an atom is - too far away. - *Angle coeff for hybrid has invalid style* Angle style hybrid uses another angle style as one of its coefficients. The angle style used in the angle_coeff command or read @@ -124,18 +91,6 @@ Doc page with :doc:`WARNING messages ` *Angle potential must be defined for SHAKE* When shaking angles, an angle_style potential must be used. -*Angle style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Angle style hybrid cannot have none as an argument* - Self-explanatory. - -*Angle style hybrid cannot use same angle style twice* - Self-explanatory. - -*Angle table must range from 0 to 180 degrees* - Self-explanatory. - *Angle table parameters did not set N* List of angle table parameters must include N setting. @@ -171,27 +126,6 @@ Doc page with :doc:`WARNING messages ` *Arcsin of invalid value in variable formula* Argument of arcsin() must be between -1 and 1. -*Assigning body parameters to non-body atom* - Self-explanatory. - -*Assigning ellipsoid parameters to non-ellipsoid atom* - Self-explanatory. - -*Assigning line parameters to non-line atom* - Self-explanatory. - -*Assigning quat to non-body atom* - Self-explanatory. - -*Assigning tri parameters to non-tri atom* - Self-explanatory. - -*At least one atom of each swapped type must be present to define charges.* - Self-explanatory. - -*Atom IDs must be consecutive for velocity create loop all* - Self-explanatory. - *Atom IDs must be used for molecular systems* Atom IDs are used to identify and find partner atoms in bonds. @@ -215,21 +149,12 @@ Doc page with :doc:`WARNING messages ` This is an internal LAMMPS error. Please report it to the developers. -*Atom style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Atom style hybrid cannot use same atom style twice* - Self-explanatory. - *Atom style template molecule must have atom types* The defined molecule(s) does not specify atom types. *Atom style was redefined after using fix property/atom* This is not allowed. -*Atom type must be zero in fix gcmc mol command* - Self-explanatory. - *Atom vector in equal-style variable formula* Atom vectors generate one value per atom which is not allowed in an equal-style variable. @@ -246,28 +171,13 @@ Doc page with :doc:`WARNING messages ` The atom_modify map command cannot be used after a read_data, read_restart, or create_box command. -*Atom_modify sort and first options cannot be used together* - Self-explanatory. - *Atom_style command after simulation box is defined* The atom_style command cannot be used after a read_data, read_restart, or create_box command. -*Atom_style line can only be used in 2d simulations* - Self-explanatory. - -*Atom_style tri can only be used in 3d simulations* - Self-explanatory. - *Atomfile variable could not read values* Check the file assigned to the variable. -*Atomfile variable in equal-style variable formula* - Self-explanatory. - -*Atomfile-style variable in equal-style variable formula* - Self-explanatory. - *Attempt to pop empty stack in fix box/relax* Internal LAMMPS error. Please report it to the developers. @@ -277,9 +187,6 @@ Doc page with :doc:`WARNING messages ` *Attempting to rescale a 0.0 temperature* Cannot rescale a temperature that is already 0.0. -*Attempting to insert more particles than available lattice points* - Self-explanatory. - *Bad FENE bond* Two atoms in a FENE bond have become so far apart that the bond cannot be computed. @@ -386,26 +293,11 @@ Doc page with :doc:`WARNING messages ` bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. -*Bond atom missing in image check* - The second atom in a particular bond is missing on this processor. - Typically this is because the pairwise cutoff is set too short or the - bond has blown apart and an atom is too far away. - *Bond atom missing in set command* The set command cannot find one or more atoms in a particular bond on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid bond. -*Bond atoms %d %d missing on proc %d at step %ld* - The second atom needed to compute a particular bond is missing on this - processor. Typically this is because the pairwise cutoff is set too - short or the bond has blown apart and an atom is too far away. - -*Bond atoms missing on proc %d at step %ld* - The second atom needed to compute a particular bond is missing on this - processor. Typically this is because the pairwise cutoff is set too - short or the bond has blown apart and an atom is too far away. - *Bond coeff for hybrid has invalid style* Bond style hybrid uses another bond style as one of its coefficients. The bond style used in the bond_coeff command or read from a restart @@ -423,15 +315,6 @@ Doc page with :doc:`WARNING messages ` *Bond potential must be defined for SHAKE* Cannot use fix shake unless bond potential is defined. -*Bond style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Bond style hybrid cannot have none as an argument* - Self-explanatory. - -*Bond style hybrid cannot use same bond style twice* - Self-explanatory. - *Bond style quartic cannot be used with 3,4-body interactions* No angle, dihedral, or improper styles can be defined when using bond style quartic. @@ -476,12 +359,6 @@ Doc page with :doc:`WARNING messages ` *Bonds defined but no bond types* The data file header lists bonds but no bond types. -*Both restart files must use % or neither* - Self-explanatory. - -*Both restart files must use MPI-IO or neither* - Self-explanatory. - *Both sides of boundary must be periodic* Cannot specify a boundary as periodic only on the lo or hi side. Must be periodic on both sides. @@ -510,21 +387,6 @@ Doc page with :doc:`WARNING messages ` Only triclinic boxes can be used with off-diagonal pressure components. See the region prism command for details. -*Can only use -plog with multiple partitions* - Self-explanatory. See page discussion of command-line switches. - -*Can only use -pscreen with multiple partitions* - Self-explanatory. See page discussion of command-line switches. - -*Can only use Kokkos supported regions with Kokkos package* - Self-explanatory. - -*Can only use NEB with 1-processor replicas* - This is current restriction for NEB as implemented in LAMMPS. - -*Can only use TAD with 1-processor replicas for NEB* - This is current restriction for NEB as implemented in LAMMPS. - *Cannot (yet) do analytic differentiation with pppm/gpu* This is a current restriction of this command. @@ -561,18 +423,6 @@ Doc page with :doc:`WARNING messages ` *Cannot (yet) use kspace_style pppm/stagger with triclinic systems* This feature is not yet supported. -*Cannot (yet) use molecular templates with Kokkos* - Self-explanatory. - -*Cannot (yet) use respa with Kokkos* - Self-explanatory. - -*Cannot (yet) use rigid bodies with fix deform and Kokkos* - Self-explanatory. - -*Cannot (yet) use rigid bodies with fix nh and Kokkos* - Self-explanatory. - *Cannot (yet) use single precision with MSM (remove -DFFT_SINGLE from Makefile and re-compile)* Single precision cannot be used with MSM. @@ -583,9 +433,6 @@ Doc page with :doc:`WARNING messages ` The simulation box must be defined with edges aligned with the Cartesian axes. -*Cannot balance in z dimension for 2d simulation* - Self-explanatory. - *Cannot change box ortho/triclinic with certain fixes defined* This is because those fixes store the shape of the box. You need to use unfix to discard the fix, change the box, then redefine a new @@ -599,12 +446,6 @@ Doc page with :doc:`WARNING messages ` *Cannot change box tilt factors for orthogonal box* Cannot use tilt factors unless the simulation box is non-orthogonal. -*Cannot change box to orthogonal when tilt is non-zero* - Self-explanatory. - -*Cannot change box z boundary to non-periodic for a 2d simulation* - Self-explanatory. - *Cannot change dump_modify every for dump dcd* The frequency of writing dump dcd snapshots cannot be changed. @@ -619,20 +460,11 @@ Doc page with :doc:`WARNING messages ` This is because fix pour pre-computes the time delay for particles to fall out of the insertion volume due to gravity. -*Cannot change to comm_style brick from tiled layout* - Self-explanatory. - *Cannot change_box after reading restart file with per-atom info* This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which will assign the restart file info to actual atoms. -*Cannot change_box in xz or yz for 2d simulation* - Self-explanatory. - -*Cannot change_box in z dimension for 2d simulation* - Self-explanatory. - *Cannot clear group all* This operation is not allowed. @@ -668,27 +500,6 @@ Doc page with :doc:`WARNING messages ` *Cannot currently use pair reax with pair hybrid* This is not yet supported. -*Cannot currently use pppm/gpu with fix balance.* - Self-explanatory. - -*Cannot delete group all* - Self-explanatory. - -*Cannot delete group currently used by a compute* - Self-explanatory. - -*Cannot delete group currently used by a dump* - Self-explanatory. - -*Cannot delete group currently used by a fix* - Self-explanatory. - -*Cannot delete group currently used by atom_modify first* - Self-explanatory. - -*Cannot delete_atoms bond yes for non-molecular systems* - Self-explanatory. - *Cannot displace_atoms after reading restart file with per-atom info* This is because the restart file info cannot be migrated with the atoms. You can get around this by performing a 0-timestep run which @@ -702,9 +513,6 @@ Doc page with :doc:`WARNING messages ` This is a restriction due to the way atoms are organized in a list to enable the atom_modify first command. -*Cannot dump sort on atom IDs with no atom IDs defined* - Self-explanatory. - *Cannot dump sort when multiple dump files are written* In this mode, each processor dumps its atoms to a file, so no sorting is allowed. @@ -717,30 +525,15 @@ Doc page with :doc:`WARNING messages ` This is a restriction due to the way atoms are organized in a list to enable the atom_modify first command. -*Cannot find create_bonds group ID* - Self-explanatory. - *Cannot find delete_bonds group ID* Group ID used in the delete_bonds command does not exist. -*Cannot find specified group ID for core particles* - Self-explanatory. - -*Cannot find specified group ID for shell particles* - Self-explanatory. - *Cannot have both pair_modify shift and tail set to yes* These 2 options are contradictory. *Cannot intersect groups using a dynamic group* This operation is not allowed. -*Cannot mix molecular and molecule template atom styles* - Self-explanatory. - -*Cannot open -reorder file* - Self-explanatory. - *Cannot open ADP potential file %s* The specified ADP potential file cannot be opened. Check that the path and name are correct. @@ -801,16 +594,10 @@ Doc page with :doc:`WARNING messages ` The specified Vashishta potential file cannot be opened. Check that the path and name are correct. -*Cannot open balance output file* - Self-explanatory. - *Cannot open coul/streitz potential file %s* The specified coul/streitz potential file cannot be opened. Check that the path and name are correct. -*Cannot open custom file* - Self-explanatory. - *Cannot open data file %s* The specified file cannot be opened. Check that the path and name are correct. @@ -819,9 +606,6 @@ Doc page with :doc:`WARNING messages ` Using a "\*" in the name of the restart file will open the current directory to search for matching file names. -*Cannot open dump file* - Self-explanatory. - *Cannot open dump file %s* The output file for the dump command cannot be opened. Check that the path and name are correct. @@ -851,9 +635,6 @@ Doc page with :doc:`WARNING messages ` The specified file cannot be opened. Check that the path and name are correct. -*Cannot open fix balance output file* - Self-explanatory. - *Cannot open fix poems file %s* The specified file cannot be opened. Check that the path and name are correct. @@ -897,9 +678,6 @@ Doc page with :doc:`WARNING messages ` LAMMPS was compiled without support for reading and writing gzipped files through a pipeline to the gzip program with -DLAMMPS_GZIP. -*Cannot open input script %s* - Self-explanatory. - *Cannot open log.cite file* This file is created when you use some LAMMPS features, to indicate what paper you should cite on behalf of those who implemented @@ -934,15 +712,6 @@ Doc page with :doc:`WARNING messages ` The specified polymorphic potential file cannot be opened. Check that the path and name are correct. -*Cannot open print file %s* - Self-explanatory. - -*Cannot open processors output file* - Self-explanatory. - -*Cannot open restart file %s* - Self-explanatory. - *Cannot open restart file for reading - MPI error: %s* This error was generated by MPI when reading/writing an MPI-IO restart file. @@ -956,9 +725,6 @@ Doc page with :doc:`WARNING messages ` opened. Check that the directory you are running in allows for files to be created. -*Cannot open temporary file for world counter.* - Self-explanatory. - *Cannot open universe log file* For a multi-partition run, the master log file cannot be opened. Check that the directory you are running in allows for files to be @@ -973,9 +739,6 @@ Doc page with :doc:`WARNING messages ` This error was generated by MPI when reading/writing an MPI-IO restart file. -*Cannot read_data without add keyword after simulation box is defined* - Self-explanatory. - *Cannot read_restart after simulation box is defined* The read_restart command cannot be used after a read_data, read_restart, or create_box command. @@ -1017,40 +780,10 @@ Doc page with :doc:`WARNING messages ` all together (pair), or in pieces (inner/middle/outer). You can't do both. -*Cannot set cutoff/multi before simulation box is defined* - Self-explanatory. - -*Cannot set dpd/theta for this atom style* - Self-explanatory. - -*Cannot set dump_modify flush for dump xtc* - Self-explanatory. - *Cannot set mass for this atom style* This atom style does not support mass settings for each atom type. Instead they are defined on a per-atom basis in the data file. -*Cannot set meso/cv for this atom style* - Self-explanatory. - -*Cannot set meso/e for this atom style* - Self-explanatory. - -*Cannot set meso/rho for this atom style* - Self-explanatory. - -*Cannot set non-zero image flag for non-periodic dimension* - Self-explanatory. - -*Cannot set non-zero z velocity for 2d simulation* - Self-explanatory. - -*Cannot set quaternion for atom that has none* - Self-explanatory. - -*Cannot set quaternion with xy components for 2d system* - Self-explanatory. - *Cannot set respa hybrid and any of pair/inner/middle/outer* In the rRESPA integrator, you must compute pairwise potentials either all together (pair), with different cutoff regions (inner/middle/outer), @@ -1064,39 +797,18 @@ Doc page with :doc:`WARNING messages ` This error was generated by MPI when reading/writing an MPI-IO restart file. -*Cannot set smd/contact/radius for this atom style* - Self-explanatory. - -*Cannot set smd/mass/density for this atom style* - Self-explanatory. - *Cannot set temperature for fix rigid/nph* The temp keyword cannot be specified. -*Cannot set theta for atom that is not a line* - Self-explanatory. - *Cannot set this attribute for this atom style* The attribute being set does not exist for the defined atom style. -*Cannot set variable z velocity for 2d simulation* - Self-explanatory. - -*Cannot skew triclinic box in z for 2d simulation* - Self-explanatory. - *Cannot subtract groups using a dynamic group* This operation is not allowed. *Cannot union groups using a dynamic group* This operation is not allowed. -*Cannot use -kokkos on without KOKKOS installed* - Self-explanatory. - -*Cannot use -reorder after -partition* - Self-explanatory. See page discussion of command-line switches. - *Cannot use Ewald with 2d simulation* The kspace style ewald cannot be used in 2d simulations. You can use 2d Ewald in a 3d simulation; see the kspace_modify command. @@ -1109,15 +821,9 @@ Doc page with :doc:`WARNING messages ` *Cannot use EwaldDisp with 2d simulation* This is a current restriction of this command. -*Cannot use Kokkos pair style with rRESPA inner/middle* - Self-explanatory. - *Cannot use NEB unless atom map exists* Use the atom_modify command to create an atom map. -*Cannot use NEB with a single replica* - Self-explanatory. - *Cannot use NEB with atom_modify sort enabled* This is current restriction for NEB implemented in LAMMPS. @@ -1166,109 +872,40 @@ Doc page with :doc:`WARNING messages ` The boundary style of the face where atoms are added can not be of type p (periodic). -*Cannot use atomfile-style variable unless atom map exists* - Self-explanatory. See the atom_modify command to create a map. - -*Cannot use both com and bias with compute temp/chunk* - Self-explanatory. - -*Cannot use chosen neighbor list style with buck/coul/cut/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with buck/coul/long/kk* - Self-explanatory. - *Cannot use chosen neighbor list style with buck/kk* That style is not supported by Kokkos. *Cannot use chosen neighbor list style with coul/cut/kk* That style is not supported by Kokkos. -*Cannot use chosen neighbor list style with coul/debye/kk* - Self-explanatory. - *Cannot use chosen neighbor list style with coul/dsf/kk* That style is not supported by Kokkos. *Cannot use chosen neighbor list style with coul/wolf/kk* That style is not supported by Kokkos. -*Cannot use chosen neighbor list style with lj/charmm/coul/charmm/implicit/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/charmm/coul/charmm/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/charmm/coul/long/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/class2/coul/cut/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/class2/coul/long/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/class2/kk* - Self-explanatory. - *Cannot use chosen neighbor list style with lj/cut/coul/cut/kk* That style is not supported by Kokkos. -*Cannot use chosen neighbor list style with lj/cut/coul/debye/kk* - Self-explanatory. - *Cannot use chosen neighbor list style with lj/cut/coul/long/kk* That style is not supported by Kokkos. *Cannot use chosen neighbor list style with lj/cut/kk* That style is not supported by Kokkos. -*Cannot use chosen neighbor list style with lj/expand/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/gromacs/coul/gromacs/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with lj/gromacs/kk* - Self-explanatory. - *Cannot use chosen neighbor list style with lj/spica/kk* That style is not supported by Kokkos. *Cannot use chosen neighbor list style with pair eam/kk* That style is not supported by Kokkos. -*Cannot use chosen neighbor list style with pair eam/kk/alloy* - Self-explanatory. - -*Cannot use chosen neighbor list style with pair eam/kk/fs* - Self-explanatory. - -*Cannot use chosen neighbor list style with pair sw/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with tersoff/kk* - Self-explanatory. - -*Cannot use chosen neighbor list style with tersoff/zbl/kk* - Self-explanatory. - -*Cannot use compute chunk/atom bin z for 2d model* - Self-explanatory. - *Cannot use compute cluster/atom unless atoms have IDs* Atom IDs are used to identify clusters. -*Cannot use create_atoms rotate unless single style* - Self-explanatory. - *Cannot use create_bonds unless atoms have IDs* This command requires a mapping from global atom IDs to local atoms, but the atoms that have been defined have no IDs. -*Cannot use create_bonds with non-molecular system* - Self-explanatory. - *Cannot use cwiggle in variable formula between runs* This is a function of elapsed time. @@ -1283,12 +920,6 @@ Doc page with :doc:`WARNING messages ` *Cannot use delete_bonds with non-molecular system* Your choice of atom style does not have bonds. -*Cannot use dump_modify fileper without % in dump file name* - Self-explanatory. - -*Cannot use dump_modify nfile without % in dump file name* - Self-explanatory. - *Cannot use dynamic group with fix adapt atom* This is not yet supported. @@ -1340,28 +971,13 @@ Doc page with :doc:`WARNING messages ` *Cannot use fix deform trate on a box with zero tilt* The trate style alters the current strain. -*Cannot use fix deposit rigid and not molecule* - Self-explanatory. - *Cannot use fix deposit rigid and shake* These two attributes are conflicting. -*Cannot use fix deposit shake and not molecule* - Self-explanatory. - -*Cannot use fix enforce2d with 3d simulation* - Self-explanatory. - *Cannot use fix gcmc in a 2d simulation* Fix gcmc is set up to run in 3d only. No 2d simulations with fix gcmc are allowed. -*Cannot use fix gcmc shake and not molecule* - Self-explanatory. - -*Cannot use fix msst without per-type mass defined* - Self-explanatory. - *Cannot use fix npt and fix deform on same component of stress tensor* This would be changing the same box dimension twice. @@ -1374,15 +990,6 @@ Doc page with :doc:`WARNING messages ` When specifying a diagonal pressure component, the dimension must be periodic. -*Cannot use fix nvt/npt/nph with both xy dynamics and xy scaling* - Self-explanatory. - -*Cannot use fix nvt/npt/nph with both xz dynamics and xz scaling* - Self-explanatory. - -*Cannot use fix nvt/npt/nph with both yz dynamics and yz scaling* - Self-explanatory. - *Cannot use fix nvt/npt/nph with xy scaling when y is non-periodic dimension* The second dimension in the barostatted tilt factor must be periodic. @@ -1392,15 +999,9 @@ Doc page with :doc:`WARNING messages ` *Cannot use fix nvt/npt/nph with yz scaling when z is non-periodic dimension* The second dimension in the barostatted tilt factor must be periodic. -*Cannot use fix pour rigid and not molecule* - Self-explanatory. - *Cannot use fix pour rigid and shake* These two attributes are conflicting. -*Cannot use fix pour shake and not molecule* - Self-explanatory. - *Cannot use fix pour with triclinic box* This option is not yet supported. @@ -1408,15 +1009,6 @@ Doc page with :doc:`WARNING messages ` These commands both change the box size/shape, so you cannot use both together. -*Cannot use fix press/berendsen on a non-periodic dimension* - Self-explanatory. - -*Cannot use fix press/berendsen with triclinic box* - Self-explanatory. - -*Cannot use fix reax/bonds without pair_style reax* - Self-explanatory. - *Cannot use fix rigid npt/nph and fix deform on same component of stress tensor* This would be changing the same box dimension twice. @@ -1437,202 +1029,20 @@ Doc page with :doc:`WARNING messages ` *Cannot use fix ttm with triclinic box* This is a current restriction of this fix due to the grid it creates. -*Cannot use fix tune/kspace without a kspace style* - Self-explanatory. - *Cannot use fix tune/kspace without a pair style* This fix (tune/kspace) can only be used when a pair style has been specified. -*Cannot use fix wall in periodic dimension* - Self-explanatory. - -*Cannot use fix wall zlo/zhi for a 2d simulation* - Self-explanatory. - -*Cannot use fix wall/reflect in periodic dimension* - Self-explanatory. - -*Cannot use fix wall/reflect zlo/zhi for a 2d simulation* - Self-explanatory. - -*Cannot use fix wall/srd in periodic dimension* - Self-explanatory. - *Cannot use fix wall/srd more than once* Nor is their a need to since multiple walls can be specified in one command. -*Cannot use fix wall/srd without fix srd* - Self-explanatory. - -*Cannot use fix wall/srd zlo/zhi for a 2d simulation* - Self-explanatory. - -*Cannot use fix_deposit unless atoms have IDs* - Self-explanatory. - -*Cannot use fix_pour unless atoms have IDs* - Self-explanatory. - -*Cannot use include command within an if command* - Self-explanatory. - *Cannot use lines with fix srd unless overlap is set* This is because line segments are connected to each other. -*Cannot use multiple fix wall commands with pair brownian* - Self-explanatory. - -*Cannot use multiple fix wall commands with pair lubricate* - Self-explanatory. - -*Cannot use multiple fix wall commands with pair lubricate/poly* - Self-explanatory. - -*Cannot use multiple fix wall commands with pair lubricateU* - Self-explanatory. - *Cannot use neigh_modify exclude with GPU neighbor builds* This is a current limitation of the GPU implementation in LAMMPS. -*Cannot use neighbor bins - box size << cutoff* - Too many neighbor bins will be created. This typically happens when - the simulation box is very small in some dimension, compared to the - neighbor cutoff. Use the "nsq" style instead of "bin" style. - -*Cannot use newton pair with beck/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with born/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with born/coul/wolf/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with born/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with buck/coul/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with buck/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with buck/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with colloid/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with coul/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with coul/debye/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with coul/dsf/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with dipole/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with dipole/sf/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with dpd/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with dpd/tstat/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with eam/alloy/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with eam/fs/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with eam/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with gauss/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with gayberne/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/charmm/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/class2/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/class2/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cubic/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/coul/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/coul/debye/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/coul/dsf/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/coul/msm/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/expand/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/gromacs/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/spica/coul/long/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj/spica/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with lj96/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with mie/cut/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with morse/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with resquared/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with soft/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with table/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with yukawa/colloid/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with yukawa/gpu pair style* - Self-explanatory. - -*Cannot use newton pair with zbl/gpu pair style* - Self-explanatory. - *Cannot use non-zero forces in an energy minimization* Fix setforce cannot be used in this manner. Use fix addforce instead. @@ -1660,9 +1070,6 @@ Doc page with :doc:`WARNING messages ` boundaries unless you use the kspace_modify command to define a 2d slab with a non-periodic z dimension. -*Cannot use order greater than 8 with pppm/gpu.* - Self-explanatory. - *Cannot use package gpu neigh yes with triclinic box* This is a current restriction in LAMMPS. @@ -1675,18 +1082,6 @@ Doc page with :doc:`WARNING messages ` *Cannot use ramp in variable formula between runs* This is because the ramp() function is time dependent. -*Cannot use read_data add before simulation box is defined* - Self-explanatory. - -*Cannot use read_data extra with add flag* - Self-explanatory. - -*Cannot use read_data offset without add flag* - Self-explanatory. - -*Cannot use read_data shift without add flag* - Self-explanatory. - *Cannot use region INF or EDGE when box does not exist* Regions that extend to the box boundaries can only be used after the create_box command has been used. @@ -1694,18 +1089,12 @@ Doc page with :doc:`WARNING messages ` *Cannot use set atom with no atom IDs defined* Atom IDs are not defined, so they cannot be used to identify an atom. -*Cannot use set mol with no molecule IDs defined* - Self-explanatory. - *Cannot use swiggle in variable formula between runs* This is a function of elapsed time. *Cannot use tris with fix srd unless overlap is set* This is because triangles are connected to each other. -*Cannot use variable energy with constant efield in fix efield* - LAMMPS computes the energy itself when the E-field is constant. - *Cannot use variable energy with constant force in fix addforce* This is because for constant force, LAMMPS can compute the change in energy directly. @@ -1720,22 +1109,10 @@ Doc page with :doc:`WARNING messages ` *Cannot use vdisplace in variable formula between runs* This is a function of elapsed time. -*Cannot use velocity bias command without temp keyword* - Self-explanatory. - *Cannot use velocity create loop all unless atoms have IDs* Atoms in the simulation to do not have IDs, so this style of velocity creation cannot be performed. -*Cannot use wall in periodic dimension* - Self-explanatory. - -*Cannot use write_restart fileper without % in restart file name* - Self-explanatory. - -*Cannot use write_restart nfile without % in restart file name* - Self-explanatory. - *Cannot wiggle and shear fix wall/gran* Cannot specify both options at the same time. @@ -1746,12 +1123,6 @@ Doc page with :doc:`WARNING messages ` *Cannot yet use KSpace solver with grid with comm style tiled* This is current restriction in LAMMPS. -*Cannot yet use comm_style tiled with multi-mode comm* - Self-explanatory. - -*Cannot yet use comm_style tiled with triclinic box* - Self-explanatory. - *Cannot yet use compute tally with Kokkos* This feature is not yet supported. @@ -1774,50 +1145,11 @@ Doc page with :doc:`WARNING messages ` *Cannot zero gld force for zero atoms* There are no atoms currently in the group. -*Cannot zero momentum of no atoms* - Self-explanatory. - -*Change_box command before simulation box is defined* - Self-explanatory. - *Change_box volume used incorrectly* The "dim volume" option must be used immediately following one or two settings for "dim1 ..." (and optionally "dim2 ...") and must be for a different dimension, i.e. dim != dim1 and dim != dim2. -*Chunk/atom compute does not exist for compute angmom/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute com/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute gyration/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute inertia/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute msd/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute omega/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute property/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute temp/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute torque/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for compute vcm/chunk* - Self-explanatory. - -*Chunk/atom compute does not exist for fix ave/chunk* - Self-explanatory. - *Comm tiled invalid index in box drop brick* Internal error check in comm_style tiled which should not occur. Contact the developers. @@ -1826,12 +1158,6 @@ Doc page with :doc:`WARNING messages ` Internal error check in comm_style tiled which should not occur. Contact the developers. -*Comm_modify group != atom_modify first group* - Self-explanatory. - -*Communication cutoff for comm_style tiled cannot exceed periodic box length* - Self-explanatory. - *Communication cutoff too small for SNAP micro load balancing* This can happen if you change the neighbor skin after your pair_style command or if your box dimensions grow during a run. You can set the @@ -1840,69 +1166,12 @@ Doc page with :doc:`WARNING messages ` *Compute %s does not allow use of dynamic group* Dynamic groups have not yet been enabled for this compute. -*Compute for fix pafi does not calculate a local array* - Self-explanatory. - -*Compute for fix pafi must have 9 fields per atom* - Self-explanatory. - -*Compute ID for compute chunk /atom does not exist* - Self-explanatory. - -*Compute ID for compute chunk/atom does not exist* - Self-explanatory. - -*Compute gyration ID does not exist for compute gyration/shape* - Self-explanatory. Provide a valid compute ID. - -*Compute gyration/shape compute ID does not point to a gyration compute* - Self-explanatory. Provide and ID of a compute gyration command. - -*Compute ID for compute reduce does not exist* - Self-explanatory. - -*Compute ID for compute slice does not exist* - Self-explanatory. - -*Compute ID for fix ave/atom does not exist* - Self-explanatory. - -*Compute ID for fix ave/chunk does not exist* - Self-explanatory. - -*Compute ID for fix ave/correlate does not exist* - Self-explanatory. - -*Compute ID for fix ave/histo does not exist* - Self-explanatory. - -*Compute ID for fix ave/time does not exist* - Self-explanatory. - -*Compute ID for fix numdiff does not exist* - Self-explanatory. - -*Compute ID for fix numdiff/virial does not exist* - Self-explanatory. - -*Compute ID for fix store/state does not exist* - Self-explanatory. - -*Compute ID for fix vector does not exist* - Self-explanatory. - -*Compute ID must be alphanumeric or underscore characters* - Self-explanatory. - *Compute angle/local used when angles are not allowed* The atom style does not support angles. *Compute angmom/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. -*Compute body/local requires atom style body* - Self-explanatory. - *Compute bond/local used when bonds are not allowed* The atom style does not support bonds. @@ -1916,46 +1185,10 @@ Doc page with :doc:`WARNING messages ` *Compute chunk/atom bin/sphere radius is too large for periodic box* Radius cannot be bigger than 1/2 of any periodic dimension. -*Compute chunk/atom compute array is accessed out-of-range* - The index for the array is out of bounds. - -*Compute chunk/atom compute does not calculate a per-atom array* - Self-explanatory. - -*Compute chunk/atom compute does not calculate a per-atom vector* - Self-explanatory. - -*Compute chunk/atom compute does not calculate per-atom values* - Self-explanatory. - -*Compute chunk/atom cylinder axis must be z for 2d* - Self-explanatory. - -*Compute chunk/atom fix array is accessed out-of-range* - The index for the array is out of bounds. - -*Compute chunk/atom fix does not calculate a per-atom array* - Self-explanatory. - -*Compute chunk/atom fix does not calculate a per-atom vector* - Self-explanatory. - -*Compute chunk/atom fix does not calculate per-atom values* - Self-explanatory. - -*Compute chunk/atom for triclinic boxes requires units reduced* - Self-explanatory. - *Compute chunk/atom ids once but nchunk is not once* You cannot assign chunks IDs to atom permanently if the number of chunks may change. -*Compute chunk/atom molecule for non-molecular system* - Self-explanatory. - -*Compute chunk/atom sphere z origin must be 0.0 for 2d* - Self-explanatory. - *Compute chunk/atom stores no IDs for compute property/chunk* It will only store IDs if its compress option is enabled. @@ -1968,9 +1201,6 @@ Doc page with :doc:`WARNING messages ` *Compute chunk/atom stores no coord3 for compute property/chunk* Only certain binning options for compute chunk/atom store coordinates. -*Compute chunk/atom variable is not atom-style variable* - Self-explanatory. - *Compute chunk/atom without bins cannot use discard mixed* That discard option only applies to the binning styles. @@ -1981,28 +1211,13 @@ Doc page with :doc:`WARNING messages ` This is so that the pair style defines a cutoff distance which is used to find clusters. -*Compute cna/atom cutoff is longer than pairwise cutoff* - Self-explanatory. - -*Compute cna/atom requires a pair style be defined* - Self-explanatory. - *Compute com/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. -*Compute contact/atom requires a pair style be defined* - Self-explanatory. - -*Compute contact/atom requires atom style sphere* - Self-explanatory. - *Compute coord/atom cutoff is longer than pairwise cutoff* Cannot compute coordination at distances longer than the pair cutoff, since those atoms are not in the neighbor list. -*Compute coord/atom requires a pair style be defined* - Self-explanatory. - *Compute damage/atom requires peridynamic potential* Damage is a Peridynamic-specific metric. It requires you to be running a Peridynamics simulation. @@ -2010,65 +1225,29 @@ Doc page with :doc:`WARNING messages ` *Compute dihedral/local used when dihedrals are not allowed* The atom style does not support dihedrals. -*Compute dilatation/atom cannot be used with this pair style* - Self-explanatory. - -*Compute dilatation/atom requires Peridynamic pair style* - Self-explanatory. - *Compute does not allow an extra compute or fix to be reset* This is an internal LAMMPS error. Please report it to the developers. -*Compute erotate/asphere requires atom style ellipsoid or line or tri* - Self-explanatory. - *Compute erotate/asphere requires extended particles* This compute cannot be used with point particles. -*Compute erotate/rigid with non-rigid fix-ID* - Self-explanatory. - -*Compute erotate/sphere requires atom style sphere* - Self-explanatory. - -*Compute erotate/sphere/atom requires atom style sphere* - Self-explanatory. - *Compute event/displace has invalid fix event assigned* This is an internal LAMMPS error. Please report it to the developers. -*Compute group/group group ID does not exist* - Self-explanatory. - *Compute gyration/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. -*Compute heat/flux compute ID does not compute ke/atom* - Self-explanatory. - -*Compute heat/flux compute ID does not compute pe/atom* - Self-explanatory. - -*Compute heat/flux compute ID does not compute stress/atom* - Self-explanatory. - *Compute hexorder/atom cutoff is longer than pairwise cutoff* Cannot compute order parameter beyond cutoff. -*Compute hexorder/atom requires a pair style be defined* - Self-explanatory. - *Compute improper/local used when impropers are not allowed* The atom style does not support impropers. *Compute inertia/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. -*Compute ke/rigid with non-rigid fix-ID* - Self-explanatory. - *Compute msd/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. @@ -2077,24 +1256,12 @@ Doc page with :doc:`WARNING messages ` the number of chunks is changing. Compute chunk/atom allows setting nchunk to be static. -*Compute nve/asphere requires atom style ellipsoid* - Self-explanatory. - -*Compute nvt/nph/npt asphere requires atom style ellipsoid* - Self-explanatory. - -*Compute nvt/nph/npt body requires atom style body* - Self-explanatory. - *Compute omega/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. *Compute orientorder/atom cutoff is longer than pairwise cutoff* Cannot compute order parameter beyond cutoff. -*Compute orientorder/atom requires a pair style be defined* - Self-explanatory. - *Compute pair must use group all* Pair styles accumulate energy on all atoms. @@ -2102,12 +1269,6 @@ Doc page with :doc:`WARNING messages ` Energies computed by potentials (pair, bond, etc) are computed on all atoms. -*Compute plasticity/atom cannot be used with this pair style* - Self-explanatory. - -*Compute plasticity/atom requires Peridynamic pair style* - Self-explanatory. - *Compute pressure must use group all* Virial contributions computed by potentials (pair, bond, etc) are computed on all atoms. @@ -2123,9 +1284,6 @@ Doc page with :doc:`WARNING messages ` The command is accessing a vector added by the fix property/atom command, that does not exist. -*Compute property/atom for atom property that is not allocated* - Self-explanatory. - *Compute property/atom integer vector does not exist* The command is accessing a vector added by the fix property/atom command, that does not exist. @@ -2137,117 +1295,18 @@ Doc page with :doc:`WARNING messages ` Only inputs that generate the same number of datums can be used together. E.g. bond and angle quantities cannot be mixed. -*Compute property/local does not (yet) work with atom_style template* - Self-explanatory. - -*Compute property/local for property that is not allocated* - Self-explanatory. - -*Compute rdf requires a pair style be defined* - Self-explanatory. - -*Compute reduce compute array is accessed out-of-range* - An index for the array is out of bounds. - *Compute reduce compute calculates global values* A compute that calculates peratom or local values is required. -*Compute reduce compute does not calculate a local array* - Self-explanatory. - -*Compute reduce compute does not calculate a local vector* - Self-explanatory. - -*Compute reduce compute does not calculate a per-atom array* - Self-explanatory. - -*Compute reduce compute does not calculate a per-atom vector* - Self-explanatory. - -*Compute reduce fix array is accessed out-of-range* - An index for the array is out of bounds. - *Compute reduce fix calculates global values* A fix that calculates peratom or local values is required. -*Compute reduce fix does not calculate a local array* - Self-explanatory. - -*Compute reduce fix does not calculate a local vector* - Self-explanatory. - -*Compute reduce fix does not calculate a per-atom array* - Self-explanatory. - -*Compute reduce fix does not calculate a per-atom vector* - Self-explanatory. - -*Compute reduce replace requires min or max mode* - Self-explanatory. - -*Compute reduce variable is not atom-style variable* - Self-explanatory. - -*Compute slice compute array is accessed out-of-range* - An index for the array is out of bounds. - -*Compute slice compute does not calculate a global array* - Self-explanatory. - -*Compute slice compute does not calculate a global vector* - Self-explanatory. - -*Compute slice compute does not calculate global vector or array* - Self-explanatory. - -*Compute slice compute vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Compute slice fix array is accessed out-of-range* - An index for the array is out of bounds. - -*Compute slice fix does not calculate a global array* - Self-explanatory. - -*Compute slice fix does not calculate a global vector* - Self-explanatory. - -*Compute slice fix does not calculate global vector or array* - Self-explanatory. - -*Compute slice fix vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Compute sna/atom cutoff is longer than pairwise cutoff* - Self-explanatory. - -*Compute sna/atom requires a pair style be defined* - Self-explanatory. - -*Compute snad/atom cutoff is longer than pairwise cutoff* - Self-explanatory. - -*Compute snad/atom requires a pair style be defined* - Self-explanatory. - -*Compute snav/atom cutoff is longer than pairwise cutoff* - Self-explanatory. - -*Compute snav/atom requires a pair style be defined* - Self-explanatory. - *Compute stress/atom temperature ID does not compute temperature* The specified compute must compute temperature. -*Compute temp/asphere requires atom style ellipsoid* - Self-explanatory. - *Compute temp/asphere requires extended particles* This compute cannot be used with point particles. -*Compute temp/body requires atom style body* - Self-explanatory. - *Compute temp/body requires bodies* This compute can only be applied to body particles. @@ -2260,27 +1319,6 @@ Doc page with :doc:`WARNING messages ` *Compute temp/cs used when bonds are not allowed* This compute only works on pairs of bonded particles. -*Compute temp/partial cannot use vz for 2d systemx* - Self-explanatory. - -*Compute temp/profile cannot bin z for 2d systems* - Self-explanatory. - -*Compute temp/profile cannot use vz for 2d systemx* - Self-explanatory. - -*Compute temp/sphere requires atom style sphere* - Self-explanatory. - -*Compute ti kspace style does not exist* - Self-explanatory. - -*Compute ti pair style does not exist* - Self-explanatory. - -*Compute ti tail when pair style does not compute tail corrections* - Self-explanatory. - *Compute torque/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. @@ -2304,9 +1342,6 @@ Doc page with :doc:`WARNING messages ` *Compute vcm/chunk does not use chunk/atom compute* The style of the specified compute is not chunk/atom. -*Computed temperature for fix temp/berendsen cannot be 0.0* - Self-explanatory. - *Computed temperature for fix temp/rescale cannot be 0.0* Cannot rescale the temperature to a new value if the current temperature is 0.0. @@ -2368,67 +1403,19 @@ Doc page with :doc:`WARNING messages ` The specified constraints did not allow this style of grid to be created. -*Could not evaluate Python function input variable* - Self-explanatory. - *Could not find Python function* The provided Python code was run successfully, but it not define a callable function with the required name. -*Could not find atom_modify first group ID* - Self-explanatory. - *Could not find change_box group ID* Group ID used in the change_box command does not exist. -*Could not find compute ID for PRD* - Self-explanatory. - -*Could not find compute ID for TAD* - Self-explanatory. - -*Could not find compute ID for temperature bias* - Self-explanatory. - -*Could not find compute ID to delete* - Self-explanatory. - -*Could not find compute displace/atom fix ID* - Self-explanatory. - -*Could not find compute event/displace fix ID* - Self-explanatory. - -*Could not find compute group ID* - Self-explanatory. - -*Could not find compute heat/flux compute ID* - Self-explanatory. - -*Could not find compute msd fix ID* - Self-explanatory. - *Could not find compute msd/chunk fix ID* The compute creates an internal fix, which has been deleted. *Could not find compute pressure temperature ID* The compute ID for calculating temperature does not exist. -*Could not find compute stress/atom temperature ID* - Self-explanatory. - -*Could not find compute vacf fix ID* - Self-explanatory. - -*Could not find compute/voronoi surface group ID* - Self-explanatory. - -*Could not find compute_modify ID* - Self-explanatory. - -*Could not find custom per-atom property ID* - Self-explanatory. - *Could not find delete_atoms group ID* Group ID used in the delete_atoms command does not exist. @@ -2438,61 +1425,16 @@ Doc page with :doc:`WARNING messages ` *Could not find displace_atoms group ID* Group ID used in the displace_atoms command does not exist. -*Could not find dump custom compute ID* - Self-explanatory. - -*Could not find dump custom fix ID* - Self-explanatory. - -*Could not find dump custom variable name* - Self-explanatory. - *Could not find dump group ID* A group ID used in the dump command does not exist. -*Could not find dump local compute ID* - Self-explanatory. - -*Could not find dump local fix ID* - Self-explanatory. - -*Could not find dump modify compute ID* - Self-explanatory. - -*Could not find dump modify custom atom floating point property ID* - Self-explanatory. - -*Could not find dump modify custom atom integer property ID* - Self-explanatory. - -*Could not find dump modify fix ID* - Self-explanatory. - -*Could not find dump modify variable name* - Self-explanatory. - -*Could not find fix ID to delete* - Self-explanatory. - *Could not find fix adapt storage fix ID* This should not happen unless you explicitly deleted a secondary fix that fix adapt created internally. -*Could not find fix halt variable name* - Self-explanatory. - -*Could not find fix gcmc exclusion group ID* - Self-explanatory. - -*Could not find fix gcmc rotation group ID* - Self-explanatory. - *Could not find fix group ID* A group ID used in the fix command does not exist. -*Could not find fix msst compute ID* - Self-explanatory. - *Could not find fix poems group ID* A group ID used in the fix poems command does not exist. @@ -2502,9 +1444,6 @@ Doc page with :doc:`WARNING messages ` *Could not find fix rigid group ID* A group ID used in the fix rigid command does not exist. -*Could not find fix srd group ID* - Self-explanatory. - *Could not find fix_modify ID* A fix ID used in the fix_modify command does not exist. @@ -2514,12 +1453,6 @@ Doc page with :doc:`WARNING messages ` *Could not find fix_modify temperature ID* The compute ID for computing temperature does not exist. -*Could not find group clear group ID* - Self-explanatory. - -*Could not find group delete group ID* - Self-explanatory. - *Could not find pair fix ID* A fix is created internally by the pair style to store shear history information. You cannot delete it. @@ -2527,9 +1460,6 @@ Doc page with :doc:`WARNING messages ` *Could not find set group ID* Group ID specified in set command does not exist. -*Could not find specified fix gcmc group ID* - Self-explanatory. - *Could not find thermo compute ID* Compute ID specified in thermo_style command does not exist. @@ -2541,15 +1471,9 @@ Doc page with :doc:`WARNING messages ` The fix ID needed by thermo style custom to compute a requested quantity does not exist. -*Could not find thermo custom variable name* - Self-explanatory. - *Could not find thermo fix ID* Fix ID specified in thermo_style command does not exist. -*Could not find thermo variable name* - Self-explanatory. - *Could not find thermo_modify pressure ID* The compute ID needed by thermo style custom to compute pressure does not exist. @@ -2572,15 +1496,6 @@ Doc page with :doc:`WARNING messages ` Could not initialize at least one of the devices specified for the gpu package -*Could not grab element entry from EIM potential file* - Self-explanatory - -*Could not grab global entry from EIM potential file* - Self-explanatory. - -*Could not grab pair entry from EIM potential file* - Self-explanatory. - *Could not initialize embedded Python* The main module in Python was not accessible. @@ -2616,9 +1531,6 @@ Doc page with :doc:`WARNING messages ` *Coulombic cut not supported in pair_style lj/long/dipole/long* Must use long-range Coulombic interactions. -*Cound not find dump_modify ID* - Self-explanatory. - *Create_atoms command before simulation box is defined* The create_atoms command cannot be used before a read_data, read_restart, or create_box command. @@ -2635,9 +1547,6 @@ Doc page with :doc:`WARNING messages ` *Create_atoms region ID does not exist* A region ID used in the create_atoms command does not exist. -*Create_bonds command before simulation box is defined* - Self-explanatory. - *Create_bonds command requires no kspace_style be defined* This is so that atom pairs that are already bonded to not appear in the neighbor list. @@ -2649,12 +1558,6 @@ Doc page with :doc:`WARNING messages ` *Create_bonds max distance > neighbor cutoff* Can only create bonds for atom pairs that will be in neighbor list. -*Create_bonds requires a pair style be defined* - Self-explanatory. - -*Create_box region ID does not exist* - Self-explanatory. - *Create_box region does not support a bounding box* Not all regions represent bounded volumes. You cannot use such a region with the create_box command. @@ -2667,21 +1570,6 @@ Doc page with :doc:`WARNING messages ` The command is accessing a vector added by the fix property/atom command, that does not exist. -*Custom per-atom property ID is not floating point* - Self-explanatory. - -*Custom per-atom property ID is not integer* - Self-explanatory. - -*Cut-offs missing in pair_style lj/long/dipole/long* - Self-explanatory. - -*Cutoffs missing in pair_style buck/long/coul/long* - Self-explanatory. - -*Cutoffs missing in pair_style lj/long/coul/long* - Self-explanatory. - *Cyclic loop in joint connections* Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a ring (or cycle). @@ -2689,9 +1577,6 @@ Doc page with :doc:`WARNING messages ` *Degenerate lattice primitive vectors* Invalid set of 3 lattice vectors for lattice command. -*Delete region ID does not exist* - Self-explanatory. - *Delete_atoms command before simulation box is defined* The delete_atoms command cannot be used before a read_data, read_restart, or create_box command. @@ -2713,14 +1598,6 @@ Doc page with :doc:`WARNING messages ` *Delete_bonds command with no atoms existing* No atoms are yet defined so the delete_bonds command cannot be used. -*Deposition region extends outside simulation box* - Self-explanatory. - -*Did not assign all atoms correctly* - Atoms read in from a data file were not assigned correctly to - processors. This is likely due to some atom coordinates being - outside a non-periodic simulation box. - *Did not assign all restart atoms correctly* Atoms read in from the restart file were not assigned correctly to processors. This is likely due to some atom coordinates being outside @@ -2743,12 +1620,6 @@ Doc page with :doc:`WARNING messages ` *Did not set pressure for fix rigid/nph* The press keyword must be specified. -*Did not set temp for fix rigid/nvt/small* - Self-explanatory. - -*Did not set temp or press for fix rigid/npt/small* - Self-explanatory. - *Did not set temperature for fix rigid/nvt* The temp keyword must be specified. @@ -2765,18 +1636,6 @@ Doc page with :doc:`WARNING messages ` on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid dihedral. -*Dihedral atoms %d %d %d %d missing on proc %d at step %ld* - One or more of 4 atoms needed to compute a particular dihedral are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the dihedral has blown apart and an atom is - too far away. - -*Dihedral atoms missing on proc %d at step %ld* - One or more of 4 atoms needed to compute a particular dihedral are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the dihedral has blown apart and an atom is - too far away. - *Dihedral charmm is incompatible with Pair style* Dihedral style charmm must be used with a pair style charmm in order for the 1-4 epsilon/sigma parameters to be defined. @@ -2790,15 +1649,6 @@ Doc page with :doc:`WARNING messages ` No dihedral coefficients have been assigned in the data file or via the dihedral_coeff command. -*Dihedral style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Dihedral style hybrid cannot have none as an argument* - Self-explanatory. - -*Dihedral style hybrid cannot use same dihedral style twice* - Self-explanatory. - *Dihedral/improper extent > half of periodic box length* This error was detected by the neigh_modify check yes setting. It is an error because the dihedral atoms are so far apart it is ambiguous @@ -2830,9 +1680,6 @@ Doc page with :doc:`WARNING messages ` The dimension command cannot be used after a read_data, read_restart, or create_box command. -*Disk limit not supported by OS or illegal path* - Self-explanatory. - *Dispersion PPPMDisp order has been reduced below minorder* The default minimum order is 2. This can be reset by the kspace_modify minorder command. @@ -2841,9 +1688,6 @@ Doc page with :doc:`WARNING messages ` The displace_atoms command cannot be used before a read_data, read_restart, or create_box command. -*Distance must be > 0 for compute event/displace* - Self-explanatory. - *Divide by 0 in influence function* This should not normally occur. It is likely a problem with your model. @@ -2852,23 +1696,9 @@ Doc page with :doc:`WARNING messages ` This should not normally occur. It is likely a problem with your model. -*Divide by 0 in variable formula* - Self-explanatory. - -*Domain too large for neighbor bins* - The domain has become extremely large so that neighbor bins cannot be - used. Most likely, one or more atoms have been blown out of the - simulation box to a great distance. - -*Double precision is not supported on this accelerator* - Self-explanatory - *Dump atom/gz only writes compressed files* The dump atom/gz output file name must have a .gz suffix. -*Dump cfg arguments can not mix xs\|ys\|zs with xsu\|ysu\|zsu* - Self-explanatory. - *Dump cfg arguments must start with 'mass type xs ys zs' or 'mass type xsu ysu zsu'* This is a requirement of the CFG output format. See the dump cfg doc page for more details. @@ -2883,30 +1713,6 @@ Doc page with :doc:`WARNING messages ` The fix must produce per-atom quantities on timesteps that dump custom needs them. -*Dump custom compute does not calculate per-atom array* - Self-explanatory. - -*Dump custom compute does not calculate per-atom vector* - Self-explanatory. - -*Dump custom compute does not compute per-atom info* - Self-explanatory. - -*Dump custom compute vector is accessed out-of-range* - Self-explanatory. - -*Dump custom fix does not compute per-atom array* - Self-explanatory. - -*Dump custom fix does not compute per-atom info* - Self-explanatory. - -*Dump custom fix does not compute per-atom vector* - Self-explanatory. - -*Dump custom fix vector is accessed out-of-range* - Self-explanatory. - *Dump custom variable is not atom-style variable* Only atom-style variables generate per-atom quantities, needed for dump output. @@ -2927,132 +1733,36 @@ Doc page with :doc:`WARNING messages ` This is because a % signifies one file per processor and MPI-IO creates one large file for all processors. -*Dump file does not contain requested snapshot* - Self-explanatory. - -*Dump file is incorrectly formatted* - Self-explanatory. - -*Dump image body yes requires atom style body* - Self-explanatory. - -*Dump image bond not allowed with no bond types* - Self-explanatory. - -*Dump image cannot perform sorting* - Self-explanatory. - -*Dump image line requires atom style line* - Self-explanatory. - *Dump image requires one snapshot per file* Use a "\*" in the filename. -*Dump image tri requires atom style tri* - Self-explanatory. - *Dump local and fix not computed at compatible times* The fix must produce per-atom quantities on timesteps that dump local needs them. -*Dump local attributes contain no compute or fix* - Self-explanatory. - *Dump local cannot sort by atom ID* This is because dump local does not really dump per-atom info. -*Dump local compute does not calculate local array* - Self-explanatory. - -*Dump local compute does not calculate local vector* - Self-explanatory. - -*Dump local compute does not compute local info* - Self-explanatory. - -*Dump local compute vector is accessed out-of-range* - Self-explanatory. - *Dump local count is not consistent across input fields* Every column of output must be the same length. -*Dump local fix does not compute local array* - Self-explanatory. - -*Dump local fix does not compute local info* - Self-explanatory. - -*Dump local fix does not compute local vector* - Self-explanatory. - -*Dump local fix vector is accessed out-of-range* - Self-explanatory. - -*Dump modify bcolor not allowed with no bond types* - Self-explanatory. - -*Dump modify bdiam not allowed with no bond types* - Self-explanatory. - -*Dump modify compute ID does not compute per-atom array* - Self-explanatory. - -*Dump modify compute ID does not compute per-atom info* - Self-explanatory. - -*Dump modify compute ID does not compute per-atom vector* - Self-explanatory. - -*Dump modify compute ID vector is not large enough* - Self-explanatory. - *Dump modify element names do not match atom types* Number of element names must equal number of atom types. -*Dump modify fix ID does not compute per-atom array* - Self-explanatory. - -*Dump modify fix ID does not compute per-atom info* - Self-explanatory. - -*Dump modify fix ID does not compute per-atom vector* - Self-explanatory. - -*Dump modify fix ID vector is not large enough* - Self-explanatory. - -*Dump modify variable is not atom-style variable* - Self-explanatory. - -*Dump sort column is invalid* - Self-explanatory. - *Dump xtc requires sorting by atom ID* Use the dump_modify sort command to enable this. *Dump xyz/gz only writes compressed files* The dump xyz/gz output file name must have a .gz suffix. -*Dump_modify buffer yes not allowed for this style* - Self-explanatory. - *Dump_modify format string is too short* There are more fields to be dumped in a line of output than your format string specifies. -*Dump_modify region ID does not exist* - Self-explanatory. - *Dumping an atom property that is not allocated* The chosen atom style does not define the per-atom quantity being dumped. -*Duplicate atom IDs exist* - Self-explanatory. - -*Duplicate fields in read_dump command* - Self-explanatory. - *Duplicate particle in PeriDynamic bond - simulation box is too small* This is likely because your box length is shorter than 2 times the bond length. @@ -3067,20 +1777,9 @@ Doc page with :doc:`WARNING messages ` There is no variable syntax that uses empty brackets. Check the variable doc page. -*Energy was not tallied on needed timestep* - You are using a thermo keyword that requires potentials to - have tallied energy, but they did not on this timestep. See the - variable page for ideas on how to make this work. - -*Epsilon or sigma reference not set by pair style in PPPMDisp* - Self-explanatory. - *Epsilon or sigma reference not set by pair style in ewald/n* The pair style is not providing the needed epsilon or sigma values. -*Error in MEAM parameter file: keyword %s (further information)* - Self-explanatory. Check the parameter file. - *Error in vdw spline: inner radius > outer radius* A pre-tabulated spline is invalid. Likely a problem with the potential parameters. @@ -3118,57 +1817,9 @@ Doc page with :doc:`WARNING messages ` *File variable could not read value* Check the file assigned to the variable. -*Final box dimension due to fix deform is < 0.0* - Self-explanatory. - *Fix %s does not allow use of dynamic group* Dynamic groups have not yet been enabled for this fix. -*Fix ID for compute chunk/atom does not exist* - Self-explanatory. - -*Fix ID for compute erotate/rigid does not exist* - Self-explanatory. - -*Fix ID for compute ke/rigid does not exist* - Self-explanatory. - -*Fix ID for compute reduce does not exist* - Self-explanatory. - -*Fix ID for compute slice does not exist* - Self-explanatory. - -*Fix ID for fix ave/atom does not exist* - Self-explanatory. - -*Fix ID for fix ave/chunk does not exist* - Self-explanatory. - -*Fix ID for fix ave/correlate does not exist* - Self-explanatory. - -*Fix ID for fix ave/histo does not exist* - Self-explanatory. - -*Fix ID for fix ave/time does not exist* - Self-explanatory. - -*Fix ID for fix store/state does not exist* - Self-explanatory - -*Fix ID for fix vector does not exist* - Self-explanatory. - -*Fix ID for read_data does not exist* - Self-explanatory. - -*Fix ID for velocity does not exist* - Self-explanatory. - -*Fix ID must be alphanumeric or underscore characters* - Self-explanatory. - *Fix SRD: bad bin assignment for SRD advection* Something has gone wrong in your SRD model; try using more conservative settings. @@ -3191,12 +1842,6 @@ Doc page with :doc:`WARNING messages ` *Fix adapt interface to this pair style not supported* New coding for the pair style would need to be done. -*Fix adapt kspace style does not exist* - Self-explanatory. - -*Fix adapt pair style does not exist* - Self-explanatory - *Fix adapt pair style param not supported* The pair style does not know about the parameter you specified. @@ -3206,30 +1851,15 @@ Doc page with :doc:`WARNING messages ` *Fix adapt requires atom attribute diameter* The atom style being used does not specify an atom diameter. -*Fix adapt type pair range is not valid for pair hybrid sub-style* - Self-explanatory. - *Fix append/atoms requires a lattice be defined* Use the lattice command for this purpose. -*Fix ave/atom compute array is accessed out-of-range* - Self-explanatory. - -*Fix ave/atom compute does not calculate a per-atom array* - Self-explanatory. - *Fix ave/atom compute does not calculate a per-atom vector* A compute used by fix ave/atom must generate per-atom values. *Fix ave/atom compute does not calculate per-atom values* A compute used by fix ave/atom must generate per-atom values. -*Fix ave/atom fix array is accessed out-of-range* - Self-explanatory. - -*Fix ave/atom fix does not calculate a per-atom array* - Self-explanatory. - *Fix ave/atom fix does not calculate a per-atom vector* A fix used by fix ave/atom must generate per-atom values. @@ -3239,145 +1869,13 @@ Doc page with :doc:`WARNING messages ` *Fix ave/atom variable is not atom-style variable* A variable used by fix ave/atom must generate per-atom values. -*Fix ave/chunk compute does not calculate a per-atom array* - Self-explanatory. - -*Fix ave/chunk compute does not calculate a per-atom vector* - Self-explanatory. - -*Fix ave/chunk compute does not calculate per-atom values* - Self-explanatory. - -*Fix ave/chunk compute vector is accessed out-of-range* - Self-explanatory. - *Fix ave/chunk does not use chunk/atom compute* The specified compute is not for a compute chunk/atom command. -*Fix ave/chunk fix does not calculate a per-atom array* - Self-explanatory. - -*Fix ave/chunk fix does not calculate a per-atom vector* - Self-explanatory. - -*Fix ave/chunk fix does not calculate per-atom values* - Self-explanatory. - -*Fix ave/chunk fix vector is accessed out-of-range* - Self-explanatory. - -*Fix ave/chunk variable is not atom-style variable* - Self-explanatory. - -*Fix ave/correlate compute does not calculate a scalar* - Self-explanatory. - -*Fix ave/correlate compute does not calculate a vector* - Self-explanatory. - -*Fix ave/correlate compute vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Fix ave/correlate fix does not calculate a scalar* - Self-explanatory. - -*Fix ave/correlate fix does not calculate a vector* - Self-explanatory. - -*Fix ave/correlate fix vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Fix ave/correlate variable is not equal-style variable* - Self-explanatory. - -*Fix ave/histo cannot input local values in scalar mode* - Self-explanatory. - -*Fix ave/histo cannot input per-atom values in scalar mode* - Self-explanatory. - -*Fix ave/histo compute array is accessed out-of-range* - Self-explanatory. - -*Fix ave/histo compute does not calculate a global array* - Self-explanatory. - -*Fix ave/histo compute does not calculate a global scalar* - Self-explanatory. - -*Fix ave/histo compute does not calculate a global vector* - Self-explanatory. - -*Fix ave/histo compute does not calculate a local array* - Self-explanatory. - -*Fix ave/histo compute does not calculate a local vector* - Self-explanatory. - -*Fix ave/histo compute does not calculate a per-atom array* - Self-explanatory. - -*Fix ave/histo compute does not calculate a per-atom vector* - Self-explanatory. - -*Fix ave/histo compute does not calculate local values* - Self-explanatory. - -*Fix ave/histo compute does not calculate per-atom values* - Self-explanatory. - -*Fix ave/histo compute vector is accessed out-of-range* - Self-explanatory. - -*Fix ave/histo fix array is accessed out-of-range* - Self-explanatory. - -*Fix ave/histo fix does not calculate a global array* - Self-explanatory. - -*Fix ave/histo fix does not calculate a global scalar* - Self-explanatory. - -*Fix ave/histo fix does not calculate a global vector* - Self-explanatory. - -*Fix ave/histo fix does not calculate a local array* - Self-explanatory. - -*Fix ave/histo fix does not calculate a local vector* - Self-explanatory. - -*Fix ave/histo fix does not calculate a per-atom array* - Self-explanatory. - -*Fix ave/histo fix does not calculate a per-atom vector* - Self-explanatory. - -*Fix ave/histo fix does not calculate local values* - Self-explanatory. - -*Fix ave/histo fix does not calculate per-atom values* - Self-explanatory. - -*Fix ave/histo fix vector is accessed out-of-range* - Self-explanatory. - -*Fix ave/histo input is invalid compute* - Self-explanatory. - -*Fix ave/histo input is invalid fix* - Self-explanatory. - -*Fix ave/histo input is invalid variable* - Self-explanatory. - *Fix ave/histo inputs are not all global, peratom, or local* All inputs in a single fix ave/histo command must be of the same style. -*Fix ave/histo/weight value and weight vector lengths do not match* - Self-explanatory. - *Fix ave/time cannot set output array intensive/extensive from these inputs* One of more of the vector inputs has individual elements which are flagged as intensive or extensive. Such an input cannot be flagged as @@ -3386,48 +1884,6 @@ Doc page with :doc:`WARNING messages ` *Fix ave/time cannot use variable with vector mode* Variables produce scalar values. -*Fix ave/time columns are inconsistent lengths* - Self-explanatory. - -*Fix ave/time compute array is accessed out-of-range* - An index for the array is out of bounds. - -*Fix ave/time compute does not calculate a scalar* - Self-explanatory. - -*Fix ave/time compute does not calculate a vector* - Self-explanatory. - -*Fix ave/time compute does not calculate an array* - Self-explanatory. - -*Fix ave/time compute vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Fix ave/time fix array cannot be variable length* - Self-explanatory. - -*Fix ave/time fix array is accessed out-of-range* - An index for the array is out of bounds. - -*Fix ave/time fix does not calculate a scalar* - Self-explanatory. - -*Fix ave/time fix does not calculate a vector* - Self-explanatory. - -*Fix ave/time fix does not calculate an array* - Self-explanatory. - -*Fix ave/time fix vector cannot be variable length* - Self-explanatory. - -*Fix ave/time fix vector is accessed out-of-range* - The index for the vector is out of bounds. - -*Fix ave/time variable is not equal-style variable* - Self-explanatory. - *Fix balance rcb cannot be used with comm_style brick* Comm_style tiled must be used instead. @@ -3439,19 +1895,10 @@ Doc page with :doc:`WARNING messages ` acquire needed info, The comm_modify cutoff command can be used to extend the communication range. -*Fix bond/create angle type is invalid* - Self-explanatory. - *Fix bond/create cutoff is longer than pairwise cutoff* This is not allowed because bond creation is done using the pairwise neighbor list. -*Fix bond/create dihedral type is invalid* - Self-explanatory. - -*Fix bond/create improper type is invalid* - Self-explanatory. - *Fix bond/create induced too many angles/dihedrals/impropers per atom* See the read_data command for info on using the "extra/angle/per/atom", (or dihedral, improper) keywords to allow for additional @@ -3498,15 +1945,6 @@ Doc page with :doc:`WARNING messages ` comm_modify cutoff command can be used to extend the communication range. -*Fix bond/react: A deleted atom cannot remain bonded to an atom that is not deleted* - Self-explanatory. - -*Fix bond/react: First neighbors of chiral atoms must be of mutually different types* - Self-explanatory. - -*Fix bond/react: Chiral atoms must have exactly four first neighbors* - Self-explanatory. - *Fix bond/react: Molecule template 'Coords' section required for chiralIDs keyword* The coordinates of atoms in the pre-reacted template are used to determine chirality. @@ -3524,12 +1962,6 @@ Doc page with :doc:`WARNING messages ` *Fix bond/swap cannot use dihedral or improper styles* These styles cannot be defined when using this fix. -*Fix bond/swap requires pair and bond styles* - Self-explanatory. - -*Fix bond/swap requires special_bonds = 0,1,1* - Self-explanatory. - *Fix box/relax generated negative box length* The pressure being applied is likely too large. Try applying it incrementally, to build to the high pressure. @@ -3555,12 +1987,6 @@ Doc page with :doc:`WARNING messages ` *Fix deform volume setting is invalid* Cannot use volume style unless other dimensions are being controlled. -*Fix deposit and fix rigid/small not using same molecule template ID* - Self-explanatory. - -*Fix deposit and fix shake not using same molecule template ID* - Self-explanatory. - *Fix deposit molecule must have atom types* The defined molecule does not specify atom types. @@ -3578,9 +2004,6 @@ Doc page with :doc:`WARNING messages ` Not all regions represent bounded volumes. You cannot use such a region with the fix deposit command. -*Fix deposit shake fix does not exist* - Self-explanatory. - *Fix efield requires atom attribute q or mu* The atom style defined does not have this attribute. @@ -3628,28 +2051,16 @@ Doc page with :doc:`WARNING messages ` *Fix freeze requires atom attribute torque* The atom style defined does not have this attribute. -*Fix gcmc and fix shake not using same molecule template ID* - Self-explanatory. - -*Fix gcmc atom has charge, but atom style does not* - Self-explanatory. - *Fix gcmc cannot exchange individual atoms belonging to a molecule* This is an error since you should not delete only one atom of a molecule. The user has specified atomic (non-molecular) gas exchanges, but an atom belonging to a molecule could be deleted. -*Fix gcmc does not (yet) work with atom_style template* - Self-explanatory. - *Fix gcmc molecule command requires that atoms have molecule attributes* Should not choose the gcmc molecule feature if no molecules are being simulated. The general molecule flag is off, but gcmc's molecule flag is on. -*Fix gcmc molecule has charges, but atom style does not* - Self-explanatory. - *Fix gcmc molecule must have atom types* The defined molecule does not specify atom types. @@ -3676,39 +2087,6 @@ Doc page with :doc:`WARNING messages ` Not all regions represent bounded volumes. You cannot use such a region with the fix gcmc command. -*Fix gcmc region extends outside simulation box* - Self-explanatory. - -*Fix gcmc shake fix does not exist* - Self-explanatory. - -*Fix gld c coefficients must be >= 0* - Self-explanatory. - -*Fix gld needs more prony series coefficients* - Self-explanatory. - -*Fix gld prony terms must be > 0* - Self-explanatory. - -*Fix gld series type must be pprony for now* - Self-explanatory. - -*Fix gld start temperature must be >= 0* - Self-explanatory. - -*Fix gld stop temperature must be >= 0* - Self-explanatory. - -*Fix gld tau coefficients must be > 0* - Self-explanatory. - -*Fix halt variable is not equal-style variable* - Self-explanatory. - -*Fix heat group has no atoms* - Self-explanatory. - *Fix heat kinetic energy of an atom went negative* This will cause the velocity rescaling about to be performed by fix heat to be invalid. @@ -3724,69 +2102,24 @@ Doc page with :doc:`WARNING messages ` *Fix langevin angmom is not yet implemented with kokkos* This option is not yet available. -*Fix langevin angmom requires atom style ellipsoid* - Self-explanatory. - *Fix langevin angmom requires extended particles* This fix option cannot be used with point particles. -*Fix langevin gjf and respa are not compatible* - Self-explanatory. - *Fix langevin gjf cannot have period equal to dt/2* If the period is equal to dt/2 then division by zero will happen. -*Fix langevin gjf should come before fix nve* - Self-explanatory. - *Fix langevin gjf with tbias is not yet implemented with kokkos* This option is not yet available. *Fix langevin omega is not yet implemented with kokkos* This option is not yet available. -*Fix langevin omega requires atom style sphere* - Self-explanatory. - *Fix langevin omega requires extended particles* One of the particles has radius 0.0. *Fix langevin period must be > 0.0* The time window for temperature relaxation must be > 0 -*Fix langevin variable returned negative temperature* - Self-explanatory. - -*Fix momentum group has no atoms* - Self-explanatory. - -*Fix move cannot define z or vz variable for 2d problem* - Self-explanatory. - -*Fix move cannot rotate aroung non z-axis for 2d problem* - Self-explanatory. - -*Fix move cannot set linear z motion for 2d problem* - Self-explanatory. - -*Fix move cannot set wiggle z motion for 2d problem* - Self-explanatory. - -*Fix msst compute ID does not compute potential energy* - Self-explanatory. - -*Fix msst compute ID does not compute pressure* - Self-explanatory. - -*Fix msst compute ID does not compute temperature* - Self-explanatory. - -*Fix msst requires a periodic box* - Self-explanatory. - -*Fix msst tscale must satisfy 0 <= tscale < 1* - Self-explanatory. - *Fix npt/nph has tilted box too far in one step - periodic cell is too far from equilibrium state* Self-explanatory. The change in the box tilt is too extreme on a short timescale. @@ -3806,61 +2139,22 @@ Doc page with :doc:`WARNING messages ` *Fix nve/asphere requires extended particles* This fix can only be used for particles with a shape setting. -*Fix nve/asphere/noforce requires atom style ellipsoid* - Self-explanatory. - *Fix nve/asphere/noforce requires extended particles* One of the particles is not an ellipsoid. -*Fix nve/body requires atom style body* - Self-explanatory. - *Fix nve/body requires bodies* This fix can only be used for particles that are bodies. -*Fix nve/line can only be used for 2d simulations* - Self-explanatory. - -*Fix nve/line requires atom style line* - Self-explanatory. - -*Fix nve/line requires line particles* - Self-explanatory. - *Fix nve/sphere dipole requires atom attribute mu* An atom style with this attribute is needed. -*Fix nve/sphere requires atom style sphere* - Self-explanatory. - *Fix nve/sphere requires extended particles* This fix can only be used for particles of a finite size. -*Fix nve/tri can only be used for 3d simulations* - Self-explanatory. - -*Fix nve/tri requires atom style tri* - Self-explanatory. - -*Fix nve/tri requires tri particles* - Self-explanatory. - *Fix nvt/nph/npt asphere requires extended particles* The shape setting for a particle in the fix group has shape = 0.0, which means it is a point particle. -*Fix nvt/nph/npt body requires bodies* - Self-explanatory. - -*Fix nvt/nph/npt sphere requires atom style sphere* - Self-explanatory. - -*Fix nvt/npt/nph damping parameters must be > 0.0* - Self-explanatory. - -*Fix nvt/npt/nph dilate group ID does not exist* - Self-explanatory. - *Fix nvt/sphere requires extended particles* This fix can only be used for particles of a finite size. @@ -3879,15 +2173,6 @@ Doc page with :doc:`WARNING messages ` *Fix peri neigh does not exist* Somehow a fix that the pair style defines has been deleted. -*Fix pour and fix rigid/small not using same molecule template ID* - Self-explanatory. - -*Fix pour and fix shake not using same molecule template ID* - Self-explanatory. - -*Fix pour insertion count per timestep is 0* - Self-explanatory. - *Fix pour molecule must have atom types* The defined molecule does not specify atom types. @@ -3898,12 +2183,6 @@ Doc page with :doc:`WARNING messages ` When using atom_style template, you cannot pour molecules that are not in that template. -*Fix pour polydisperse fractions do not sum to 1.0* - Self-explanatory. - -*Fix pour region ID does not exist* - Self-explanatory. - *Fix pour region cannot be dynamic* Only static regions can be used with fix pour. @@ -3914,187 +2193,49 @@ Doc page with :doc:`WARNING messages ` *Fix pour requires atom attributes radius, rmass* The atom style defined does not have these attributes. -*Fix pour rigid fix does not exist* - Self-explanatory. - -*Fix pour shake fix does not exist* - Self-explanatory. - -*Fix press/berendsen damping parameters must be > 0.0* - Self-explanatory. - -*Fix property/atom cannot specify mol twice* - Self-explanatory. - -*Fix property/atom cannot specify q twice* - Self-explanatory. - -*Fix property/atom mol when atom_style already has molecule attribute* - Self-explanatory. - -*Fix property/atom q when atom_style already has charge attribute* - Self-explanatory. - *Fix property/atom vector name already exists* The name for an integer or floating-point vector must be unique. -*Fix qeq has negative upper Taper radius cutoff* - Self-explanatory. - -*Fix qeq/comb group has no atoms* - Self-explanatory. - *Fix qeq/comb requires atom attribute q* An atom style with charge must be used to perform charge equilibration. -*Fix qeq/dynamic group has no atoms* - Self-explanatory. - -*Fix qeq/dynamic requires atom attribute q* - Self-explanatory. - -*Fix qeq/fire group has no atoms* - Self-explanatory. - -*Fix qeq/fire requires atom attribute q* - Self-explanatory. - -*Fix qeq/point group has no atoms* - Self-explanatory. - *Fix qeq/point has insufficient QEq matrix size* Occurs when number of neighbor atoms for an atom increased too much during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and re-compile. -*Fix qeq/point requires atom attribute q* - Self-explanatory. - -*Fix qeq/shielded group has no atoms* - Self-explanatory. - *Fix qeq/shielded has insufficient QEq matrix size* Occurs when number of neighbor atoms for an atom increased too much during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and re-compile. -*Fix qeq/shielded requires atom attribute q* - Self-explanatory. - *Fix qeq/slater could not extract params from pair coul/streitz* This should not happen unless pair coul/streitz has been altered. -*Fix qeq/slater group has no atoms* - Self-explanatory. - *Fix qeq/slater has insufficient QEq matrix size* Occurs when number of neighbor atoms for an atom increased too much during a run. Increase SAFE_ZONE and MIN_CAP in fix_qeq.h and re-compile. -*Fix qeq/slater requires atom attribute q* - Self-explanatory. - *Fix reax/bonds numbonds > nsbmax_most* The limit of the number of bonds expected by the ReaxFF force field was exceeded. -*Fix recenter group has no atoms* - Self-explanatory. - -*Fix restrain requires an atom map, see atom_modify* - Self-explanatory. - *Fix rigid atom has non-zero image flag in a non-periodic dimension* Image flags for non-periodic dimensions should not be set. -*Fix rigid file has no lines* - Self-explanatory. - -*Fix rigid langevin period must be > 0.0* - Self-explanatory. - -*Fix rigid molecule requires atom attribute molecule* - Self-explanatory. - -*Fix rigid npt/nph dilate group ID does not exist* - Self-explanatory. - *Fix rigid npt/nph does not yet allow triclinic box* This is a current restriction in LAMMPS. -*Fix rigid npt/nph period must be > 0.0* - Self-explanatory. - -*Fix rigid npt/small t_chain should not be less than 1* - Self-explanatory. - -*Fix rigid npt/small t_order must be 3 or 5* - Self-explanatory. - -*Fix rigid nvt/npt/nph damping parameters must be > 0.0* - Self-explanatory. - -*Fix rigid nvt/small t_chain should not be less than 1* - Self-explanatory. - -*Fix rigid nvt/small t_iter should not be less than 1* - Self-explanatory. - -*Fix rigid nvt/small t_order must be 3 or 5* - Self-explanatory. - -*Fix rigid xy torque cannot be on for 2d simulation* - Self-explanatory. - -*Fix rigid z force cannot be on for 2d simulation* - Self-explanatory. - -*Fix rigid/npt period must be > 0.0* - Self-explanatory. - -*Fix rigid/npt temperature order must be 3 or 5* - Self-explanatory. - -*Fix rigid/npt/small period must be > 0.0* - Self-explanatory. - -*Fix rigid/nvt period must be > 0.0* - Self-explanatory. - -*Fix rigid/nvt temperature order must be 3 or 5* - Self-explanatory. - -*Fix rigid/nvt/small period must be > 0.0* - Self-explanatory. - *Fix rigid/small atom has non-zero image flag in a non-periodic dimension* Image flags for non-periodic dimensions should not be set. -*Fix rigid/small langevin period must be > 0.0* - Self-explanatory. - *Fix rigid/small molecule must have atom types* The defined molecule does not specify atom types. *Fix rigid/small molecule must have coordinates* The defined molecule does not specify coordinates. -*Fix rigid/small npt/nph period must be > 0.0* - Self-explanatory. - -*Fix rigid/small nvt/npt/nph damping parameters must be > 0.0* - Self-explanatory. - -*Fix rigid/small nvt/npt/nph dilate group ID does not exist* - Self-explanatory. - -*Fix rigid/small requires an atom map, see atom_modify* - Self-explanatory. - -*Fix rigid/small requires atom attribute molecule* - Self-explanatory. - *Fix rigid: Bad principal moments* The principal moments of inertia computed for a rigid body are not within the required tolerances. @@ -4106,9 +2247,6 @@ Doc page with :doc:`WARNING messages ` *Fix shake molecule template must have shake info* The defined molecule does not specify SHAKE information. -*Fix spring couple group ID does not exist* - Self-explanatory. - *Fix srd can only currently be used with comm_style brick* This is a current restriction in LAMMPS. @@ -4119,18 +2257,9 @@ Doc page with :doc:`WARNING messages ` This is because the SRD collisions will impart torque to the solute particles. -*Fix srd requires SRD particles all have same mass* - Self-explanatory. - *Fix srd requires ghost atoms store velocity* Use the comm_modify vel yes command to enable this. -*Fix srd requires newton pair on* - Self-explanatory. - -*Fix store/state compute array is accessed out-of-range* - Self-explanatory. - *Fix store/state compute does not calculate a per-atom array* The compute calculates a per-atom vector. @@ -4141,9 +2270,6 @@ Doc page with :doc:`WARNING messages ` Computes that calculate global or local quantities cannot be used with fix store/state. -*Fix store/state fix array is accessed out-of-range* - Self-explanatory. - *Fix store/state fix does not calculate a per-atom array* The fix calculates a per-atom vector. @@ -4154,71 +2280,20 @@ Doc page with :doc:`WARNING messages ` Fixes that calculate global or local quantities cannot be used with fix store/state. -*Fix store/state for atom property that is not allocated* - Self-explanatory. - *Fix store/state variable is not atom-style variable* Only atom-style variables calculate per-atom quantities. -*Fix temp/berendsen period must be > 0.0* - Self-explanatory. - -*Fix temp/berendsen variable returned negative temperature* - Self-explanatory. - *Fix temp/csld is not compatible with fix rattle or fix shake* These two commands cannot currently be used together with fix temp/csld. -*Fix temp/csld variable returned negative temperature* - Self-explanatory. - -*Fix temp/csvr variable returned negative temperature* - Self-explanatory. - -*Fix temp/rescale variable returned negative temperature* - Self-explanatory. - -*Fix tfmc displacement length must be > 0* - Self-explanatory. - *Fix tfmc is not compatible with fix shake* These two commands cannot currently be used together. -*Fix tfmc temperature must be > 0* - Self-explanatory. - -*Fix thermal/conductivity swap value must be positive* - Self-explanatory. - *Fix tmd must come after integration fixes* Any fix tmd command must appear in the input script after all time integration fixes (nve, nvt, npt). See the fix tmd documentation for details. -*Fix ttm electron temperatures must be > 0.0* - Self-explanatory. - -*Fix ttm electronic_density must be > 0.0* - Self-explanatory. - -*Fix ttm electronic_specific_heat must be > 0.0* - Self-explanatory. - -*Fix ttm electronic_thermal_conductivity must be >= 0.0* - Self-explanatory. - -*Fix ttm gamma_p must be > 0.0* - Self-explanatory. - -*Fix ttm gamma_s must be >= 0.0* - Self-explanatory. - -*Fix ttm number of nodes must be > 0* - Self-explanatory. - -*Fix ttm v_0 must be >= 0.0* - Self-explanatory. - *Fix used in compute chunk/atom not computed at compatible time* The chunk/atom compute cannot query the output of the fix on a timestep it is needed. @@ -4235,39 +2310,6 @@ Doc page with :doc:`WARNING messages ` The inputs to the command have conflicting intensive/extensive attributes. You need to use more than one fix vector command. -*Fix vector compute does not calculate a scalar* - Self-explanatory. - -*Fix vector compute does not calculate a vector* - Self-explanatory. - -*Fix vector compute vector is accessed out-of-range* - Self-explanatory. - -*Fix vector fix does not calculate a scalar* - Self-explanatory. - -*Fix vector fix does not calculate a vector* - Self-explanatory. - -*Fix vector fix vector is accessed out-of-range* - Self-explanatory. - -*Fix vector variable is not equal-style variable* - Self-explanatory. - -*Fix viscosity swap value must be positive* - Self-explanatory. - -*Fix viscosity vtarget value must be positive* - Self-explanatory. - -*Fix wall cutoff <= 0.0* - Self-explanatory. - -*Fix wall/colloid requires atom style sphere* - Self-explanatory. - *Fix wall/colloid requires extended particles* One of the particles has radius 0.0. @@ -4275,21 +2317,12 @@ Doc page with :doc:`WARNING messages ` Must use a granular pair style to define the parameters needed for this fix. -*Fix wall/gran requires atom style sphere* - Self-explanatory. - *Fix wall/piston command only available at zlo* The face keyword must be zlo. -*Fix wall/region colloid requires atom style sphere* - Self-explanatory. - *Fix wall/region colloid requires extended particles* One of the particles has radius 0.0. -*Fix wall/region cutoff <= 0.0* - Self-explanatory. - *Fix_modify pressure ID does not compute pressure* The compute ID assigned to the fix must compute pressure. @@ -4303,12 +2336,6 @@ Doc page with :doc:`WARNING messages ` *Found no restart file matching pattern* When using a "\*" in the restart file name, no matching file was found. -*GPU library not compiled for this accelerator* - Self-explanatory. - -*GPU package does not (yet) work with atom_style template* - Self-explanatory. - *GPU particle split must be set to 1 for this pair style.* For this pair style, you cannot run part of the force calculation on the host. See the package command. @@ -4325,21 +2352,12 @@ Doc page with :doc:`WARNING messages ` *Gravity changed since fix pour was created* The gravity vector defined by fix gravity must be static. -*Gravity must point in -y to use with fix pour in 2d* - Self-explanatory. - -*Gravity must point in -z to use with fix pour in 3d* - Self-explanatory. - *Grmask function in equal-style variable formula* Grmask is per-atom operation. *Group ID does not exist* A group ID used in the group command does not exist. -*Group ID in variable formula does not exist* - Self-explanatory. - *Group all cannot be made dynamic* This operation is not allowed. @@ -4347,15 +2365,6 @@ Doc page with :doc:`WARNING messages ` The group command cannot be used before a read_data, read_restart, or create_box command. -*Group dynamic cannot reference itself* - Self-explanatory. - -*Group dynamic parent group cannot be dynamic* - Self-explanatory. - -*Group dynamic parent group does not exist* - Self-explanatory. - *Group region ID does not exist* A region ID used in the group command does not exist. @@ -4388,19 +2397,10 @@ Doc page with :doc:`WARNING messages ` One or more of the coefficients defined in the potential file is invalid. -*Illegal compute voronoi/atom command (occupation and (surface or edges))* - Self-explanatory. - *Illegal coul/streitz parameter* One or more of the coefficients defined in the potential file is invalid. -*Illegal dump_modify sfactor value (must be > 0.0)* - Self-explanatory. - -*Illegal dump_modify tfactor value (must be > 0.0)* - Self-explanatory. - *Illegal fix gcmc gas mass <= 0* The computed mass of the designated gas molecule or atom type was less than or equal to zero. @@ -4411,9 +2411,6 @@ Doc page with :doc:`WARNING messages ` *Illegal fix wall/piston velocity* The piston velocity must be positive. -*Illegal integrate style* - Self-explanatory. - *Illegal nb3b/harmonic parameter* One or more of the coefficients defined in the potential file is invalid. @@ -4462,18 +2459,6 @@ Doc page with :doc:`WARNING messages ` on a particular processor. The pairwise cutoff is too short or the atoms are too far apart to make a valid improper. -*Improper atoms %d %d %d %d missing on proc %d at step %ld* - One or more of 4 atoms needed to compute a particular improper are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the improper has blown apart and an atom is - too far away. - -*Improper atoms missing on proc %d at step %ld* - One or more of 4 atoms needed to compute a particular improper are - missing on this processor. Typically this is because the pairwise - cutoff is set too short or the improper has blown apart and an atom is - too far away. - *Improper coeff for hybrid has invalid style* Improper style hybrid uses another improper style as one of its coefficients. The improper style used in the improper_coeff command @@ -4483,15 +2468,6 @@ Doc page with :doc:`WARNING messages ` No improper coefficients have been assigned in the data file or via the improper_coeff command. -*Improper style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Improper style hybrid cannot have none as an argument* - Self-explanatory. - -*Improper style hybrid cannot use same improper style twice* - Self-explanatory. - *Improper_coeff command before improper_style is defined* Coefficients cannot be set in the data file or via the improper_coeff command until an improper_style has been assigned. @@ -4554,24 +2530,6 @@ Doc page with :doc:`WARNING messages ` *Incorrect SNAP parameter file* The file cannot be parsed correctly, check its internal syntax. -*Incorrect args for angle coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect args for bond coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect args for dihedral coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect args for improper coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect args for pair coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect args in pair_style command* - Self-explanatory. - *Incorrect atom format in data file* Number of values per atom line in the data file is not consistent with the atom style. @@ -4610,10 +2568,6 @@ Doc page with :doc:`WARNING messages ` *Incorrect element names in EAM potential file* The element names in the EAM file do not match those requested. -*Incorrect format of ... section in data file* - Number or type of values per line in the given section of the data file - is not consistent with the requirements for this section. - *Incorrect format in COMB potential file* Incorrect number of words per line in the potential file. @@ -4650,49 +2604,25 @@ Doc page with :doc:`WARNING messages ` *Incorrect integer value in Bodies section of data file* See page for body style. -*Incorrect multiplicity arg for dihedral coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect number of elements in potential file* - Self-explanatory. - *Incorrect rigid body format in fix rigid file* The number of fields per line is not what expected. *Incorrect rigid body format in fix rigid/small file* The number of fields per line is not what expected. -*Incorrect sign arg for dihedral coefficients* - Self-explanatory. Check the input script or data file. - -*Incorrect table format check for element types* - Self-explanatory. - *Incorrect velocity format in data file* Each atom style defines a format for the Velocity section of the data file. The read-in lines do not match. -*Incorrect weight arg for dihedral coefficients* - Self-explanatory. Check the input script or data file. - -*Index between variable brackets must be positive* - Self-explanatory. - *Indexed per-atom vector in variable formula without atom map* Accessing a value from an atom vector requires the ability to lookup an atom index, which is provided by an atom map. An atom map does not exist (by default) for non-molecular problems. Using the atom_modify map command will force an atom map to be created. -*Initial temperatures not all set in fix ttm* - Self-explanatory. - *Input line quote not followed by white-space* An end quote must be followed by white-space. -*Insertion region extends outside simulation box* - Self-explanatory. - *Insufficient Jacobi rotations for POEMS body* Eigensolve for rigid body was not sufficiently accurate. @@ -4716,62 +2646,17 @@ Doc page with :doc:`WARNING messages ` *Internal error in atom_style body* This error should not occur. Contact the developers. -*Invalid -reorder N value* - Self-explanatory. - -*Invalid Angles section in molecule file* - Self-explanatory. - -*Invalid Bonds section in molecule file* - Self-explanatory. - -*Invalid Boolean syntax in if command* - Self-explanatory. - -*Invalid Charges section in molecule file* - Self-explanatory. - -*Invalid Coords section in molecule file* - Self-explanatory. - -*Invalid Diameters section in molecule file* - Self-explanatory. - -*Invalid Dihedrals section in molecule file* - Self-explanatory. - -*Invalid Impropers section in molecule file* - Self-explanatory. - -*Invalid Kokkos command-line args* - Self-explanatory. See Section 2.7 of the manual for details. - *Invalid LAMMPS restart file* The file does not appear to be a LAMMPS restart file since it does not contain the correct magic string at the beginning. -*Invalid Masses section in molecule file* - Self-explanatory. - *Invalid molecule ID in molecule file* Molecule ID must be a non-zero positive integer. -*Invalid Molecules section in molecule file* - Self-explanatory. - *Invalid REAX atom type* There is a mis-match between LAMMPS atom types and the elements listed in the ReaxFF force field file. -*Invalid Special Bond Counts section in molecule file* - Self-explanatory. - -*Invalid Types section in molecule file* - Self-explanatory. - -*Invalid angle count in molecule file* - Self-explanatory. - *Invalid angle table length* Length must be 2 or greater. @@ -4779,12 +2664,6 @@ Doc page with :doc:`WARNING messages ` Angle type must be positive integer and within range of specified angle types. -*Invalid angle type in Angles section of molecule file* - Self-explanatory. - -*Invalid angle type index for fix shake* - Self-explanatory. - *Invalid args for non-hybrid pair coefficients* "NULL" is only supported in pair_coeff calls when using pair hybrid @@ -4800,9 +2679,6 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers and within range of defined atoms. -*Invalid atom ID in Angles section of molecule file* - Self-explanatory. - *Invalid atom ID in Atoms section of data file* Atom IDs must be positive integers. @@ -4814,9 +2690,6 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers and within range of defined atoms. -*Invalid atom ID in Bonds section of molecule file* - Self-explanatory. - *Invalid atom ID in Bonus section of data file* Atom IDs must be positive integers and within range of defined atoms. @@ -4825,9 +2698,6 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers and within range of defined atoms. -*Invalid atom ID in Fragments section of molecule file* - Self-explanatory. - *Invalid atom ID in Impropers section of data file* Atom IDs must be positive integers and within range of defined atoms. @@ -4836,15 +2706,6 @@ Doc page with :doc:`WARNING messages ` Atom IDs must be positive integers and within range of defined atoms. -*Invalid atom ID in dihedrals section of molecule file* - Self-explanatory. - -*Invalid atom ID in impropers section of molecule file* - Self-explanatory. - -*Invalid atom ID in variable file* - Self-explanatory. - *Invalid atom IDs in neb file* An ID in the file was not found in the system. @@ -4873,12 +2734,6 @@ Doc page with :doc:`WARNING messages ` *Invalid atom type in fix atom/swap command* The atom type specified in the atom/swap command does not exist. -*Invalid atom type in fix bond/create command* - Self-explanatory. - -*Invalid atom type in fix deposit command* - Self-explanatory. - *Invalid atom type in fix deposit mol command* The atom types in the defined molecule are added to the value specified in the create_atoms command, as an offset. The final value @@ -4888,9 +2743,6 @@ Doc page with :doc:`WARNING messages ` *Invalid atom type in fix gcmc command* The atom type specified in the gcmc command does not exist. -*Invalid atom type in fix pour command* - Self-explanatory. - *Invalid atom type in fix pour mol command* The atom types in the defined molecule are added to the value specified in the create_atoms command, as an offset. The final value @@ -4915,18 +2767,6 @@ Doc page with :doc:`WARNING messages ` *Invalid atom_style body command* No body style argument was provided. -*Invalid atom_style command* - Self-explanatory. - -*Invalid attribute in dump custom command* - Self-explanatory. - -*Invalid attribute in dump local command* - Self-explanatory. - -*Invalid attribute in dump modify command* - Self-explanatory. - *Invalid basis setting in create_atoms command* The basis index must be between 1 to N where N is the number of basis atoms in the lattice. The type index must be between 1 to N where N @@ -4946,9 +2786,6 @@ Doc page with :doc:`WARNING messages ` *Invalid body nparticle command* Arguments in atom-style command are not correct. -*Invalid bond count in molecule file* - Self-explanatory. - *Invalid bond table length* Length must be 2 or greater. @@ -4956,21 +2793,6 @@ Doc page with :doc:`WARNING messages ` Bond type must be positive integer and within range of specified bond types. -*Invalid bond type in Bonds section of molecule file* - Self-explanatory. - -*Invalid bond type in create_bonds command* - Self-explanatory. - -*Invalid bond type in fix bond/break command* - Self-explanatory. - -*Invalid bond type in fix bond/create command* - Self-explanatory. - -*Invalid bond type index for fix shake* - Self-explanatory. Check the fix shake command in the input script. - *Invalid coeffs for this dihedral style* Cannot set class 2 coeffs in data file for this dihedral style. @@ -5074,22 +2896,10 @@ Doc page with :doc:`WARNING messages ` *Invalid density in set command* Density must be > 0.0. -*Invalid diameter in set command* - Self-explanatory. - -*Invalid dihedral count in molecule file* - Self-explanatory. - *Invalid dihedral type in Dihedrals section of data file* Dihedral type must be positive integer and within range of specified dihedral types. -*Invalid dihedral type in dihedrals section of molecule file* - Self-explanatory. - -*Invalid dipole length in set command* - Self-explanatory. - *Invalid displace_atoms rotate axis for 2d* Axis must be in z direction. @@ -5129,15 +2939,9 @@ Doc page with :doc:`WARNING messages ` *Invalid dump_modify threshold operator* Operator keyword used for threshold specification in not recognized. -*Invalid entry in -reorder file* - Self-explanatory. - *Invalid fix ID in variable formula* The fix is not recognized. -*Invalid fix ave/time off column* - Self-explanatory. - *Invalid fix box/relax command for a 2d simulation* Fix box/relax styles involving the z dimension cannot be used in a 2d simulation. @@ -5148,12 +2952,6 @@ Doc page with :doc:`WARNING messages ` *Invalid fix box/relax pressure settings* Settings for coupled dimensions must be the same. -*Invalid fix halt attribute* - Self-explanatory. - -*Invalid fix halt operator* - Self-explanatory. - *Invalid fix nvt/npt/nph command for a 2d simulation* Cannot control z dimension in a 2d model. @@ -5208,94 +3006,22 @@ Doc page with :doc:`WARNING messages ` *Invalid group function in variable formula* Group function is not recognized. -*Invalid group in comm_modify command* - Self-explanatory. - *Invalid image up vector* Up vector cannot be (0,0,0). *Invalid immediate variable* Syntax of immediate value is incorrect. -*Invalid improper count in molecule file* - Self-explanatory. - *Invalid improper type in Impropers section of data file* Improper type must be positive integer and within range of specified improper types. -*Invalid improper type in impropers section of molecule file* - Self-explanatory. - *Invalid index for non-body particles in compute body/local command* Only indices 1,2,3 can be used for non-body particles. -*Invalid index in compute body/local command* - Self-explanatory. - -*Invalid is_active() function in variable formula* - Self-explanatory. - -*Invalid is_available() function in variable formula* - Self-explanatory. - -*Invalid is_defined() function in variable formula* - Self-explanatory. - -*Invalid keyword in angle table parameters* - Self-explanatory. - -*Invalid keyword in bond table parameters* - Self-explanatory. - -*Invalid keyword in compute angle/local command* - Self-explanatory. - -*Invalid keyword in compute bond/local command* - Self-explanatory. - -*Invalid keyword in compute dihedral/local command* - Self-explanatory. - -*Invalid keyword in compute improper/local command* - Self-explanatory. - -*Invalid keyword in compute pair/local command* - Self-explanatory. - -*Invalid keyword in compute property/atom command* - Self-explanatory. - -*Invalid keyword in compute property/chunk command* - Self-explanatory. - -*Invalid keyword in compute property/local command* - Self-explanatory. - -*Invalid keyword in dump cfg command* - Self-explanatory. - *Invalid keyword in pair table parameters* Keyword used in list of table parameters is not recognized. -*Invalid length in set command* - Self-explanatory. - -*Invalid mass in set command* - Self-explanatory. - -*Invalid mass line in data file* - Self-explanatory. - -*Invalid mass value* - Self-explanatory. - -*Invalid math function in variable formula* - Self-explanatory. - -*Invalid math/group/special function in variable formula* - Self-explanatory. - *Invalid option in lattice command for non-custom style* Certain lattice keywords are not supported unless the lattice style is "custom". @@ -5336,9 +3062,6 @@ Doc page with :doc:`WARNING messages ` *Invalid random number seed in set command* Random number seed must be > 0. -*Invalid replace values in compute reduce* - Self-explanatory. - *Invalid rigid body ID in fix rigid file* The ID does not match the number of an existing ID of rigid bodies that are defined by the fix rigid command. @@ -5351,12 +3074,6 @@ Doc page with :doc:`WARNING messages ` The number of timesteps must fit in a 32-bit integer. If you want to run for more steps than this, perform multiple shorter runs. -*Invalid run command start/stop value* - Self-explanatory. - -*Invalid run command upto value* - Self-explanatory. - *Invalid seed for Marsaglia random # generator* The initial seed for this random number generator must be a positive integer less than or equal to 900 million. @@ -5365,45 +3082,9 @@ Doc page with :doc:`WARNING messages ` The initial seed for this random number generator must be a positive integer. -*Invalid shake angle type in molecule file* - Self-explanatory. - -*Invalid shake atom in molecule file* - Self-explanatory. - -*Invalid shake bond type in molecule file* - Self-explanatory. - -*Invalid shake flag in molecule file* - Self-explanatory. - -*Invalid shape in Ellipsoids section of data file* - Self-explanatory. - *Invalid shape in Triangles section of data file* Two or more of the triangle corners are duplicate points. -*Invalid shape in set command* - Self-explanatory. - -*Invalid shear direction for fix wall/gran* - Self-explanatory. - -*Invalid special atom index in molecule file* - Self-explanatory. - -*Invalid special function in variable formula* - Self-explanatory. - -*Invalid style in pair_write command* - Self-explanatory. Check the input script. - -*Invalid syntax in variable formula* - Self-explanatory. - -*Invalid t_event in prd command* - Self-explanatory. - *Invalid t_event in tad command* The value must be greater than 0. @@ -5415,9 +3096,6 @@ Doc page with :doc:`WARNING messages ` The template indices must be between 1 to N, where N is the number of molecules in the template. -*Invalid thermo keyword in variable formula* - The keyword is not recognized. - *Invalid threads_per_atom specified.* For 3-body potentials on the GPU, the threads_per_atom setting cannot be greater than 4 for NVIDIA GPUs. @@ -5469,9 +3147,6 @@ Doc page with :doc:`WARNING messages ` *Invalid variable evaluation in variable formula* A variable used in a formula could not be evaluated. -*Invalid variable in next command* - Self-explanatory. - *Invalid variable name* Variable name used in an input script line is invalid. @@ -5488,21 +3163,6 @@ Doc page with :doc:`WARNING messages ` *Invalid volume in set command* Volume must be > 0.0. -*Invalid wiggle direction for fix wall/gran* - Self-explanatory. - -*Invoked angle equil angle on angle style none* - Self-explanatory. - -*Invoked angle single on angle style none* - Self-explanatory. - -*Invoked bond equil distance on bond style none* - Self-explanatory. - -*Invoked bond single on bond style none* - Self-explanatory. - *Invoked pair single on pair style none* A command (e.g. a dump) attempted to invoke the single() function on a pair style none, which is illegal. You are probably attempting to @@ -5519,12 +3179,6 @@ Doc page with :doc:`WARNING messages ` Model. Please contact the OpenKIM database maintainers to verify and potentially correct this. -*KOKKOS package does not yet support comm_style tiled* - Self-explanatory. - -*KOKKOS package requires a kokkos enabled atom_style* - Self-explanatory. - *KSpace accuracy must be > 0* The kspace accuracy designated in the input must be greater than zero. @@ -5549,9 +3203,6 @@ Doc page with :doc:`WARNING messages ` Setting a kspace style requires that a pair style with matching long-range Coulombic or dispersion components be used. -*Keyword %s in MEAM parameter file not recognized* - Self-explanatory. - *Kokkos has been compiled for CUDA but no GPUs are requested* One or more GPUs must be used when Kokkos is compiled for CUDA. @@ -5565,39 +3216,18 @@ Doc page with :doc:`WARNING messages ` the required accuracy via *force/disp/real* as well as *force/disp/kspace* is set. -*Kspace style does not support compute group/group* - Self-explanatory. - -*Kspace style pppm/disp/tip4p requires newton on* - Self-explanatory. - -*Kspace style pppm/tip4p requires newton on* - Self-explanatory. - *Kspace style requires atom attribute q* The atom style defined does not have these attributes. -*Kspace_modify eigtol must be smaller than one* - Self-explanatory. - *LAMMPS is not built with Python embedded* This is done by including the PYTHON package before LAMMPS is built. This is required to use python-style variables. -*LAMMPS unit_style lj not supported by KIM models* - Self-explanatory. Check the input script or data file. - -*LJ6 off not supported in pair_style buck/long/coul/long* - Self-explanatory. - *Label map is incomplete: all types must be assigned a unique type label* For a given type-kind (atom types, bond types, etc.) to be written to the data file, all associated types must be assigned a type label, and each type label can be assigned to only one numeric type. -*Label wasn't found in input script* - Self-explanatory. - *Labelmap command before simulation box is defined* The labelmap command cannot be used before a read_data, read_restart, or create_box command. @@ -5625,19 +3255,9 @@ Doc page with :doc:`WARNING messages ` 2d simulation can use sq, sq2, or hex lattice. 3d simulation can use sc, bcc, or fcc lattice. -*Log of zero/negative value in variable formula* - Self-explanatory. - *Lost atoms via balance: original %ld current %ld* This should not occur. Report the problem to the developers. -*Lost atoms: original %ld current %ld* - Lost atoms are checked for each time thermo output is done. See the - thermo_modify lost command for options. Lost atoms usually indicate - bad dynamics, e.g. atoms have been blown far out of the simulation - box, or moved further than one processor's subdomain away before - reneighboring. - *MEAM library error %d* A call to the MEAM Fortran library returned an error. @@ -5678,9 +3298,6 @@ Doc page with :doc:`WARNING messages ` The minimize command cannot be used before a read_data, read_restart, or create_box command. -*Mismatched brackets in variable* - Self-explanatory. - *Mismatched compute in variable formula* A compute is referenced incorrectly or a compute that produces per-atom values is used in an equal-style variable formula. @@ -5697,52 +3314,10 @@ Doc page with :doc:`WARNING messages ` produces per-atom values is used in an equal-style variable formula. -*Modulo 0 in variable formula* - Self-explanatory. - *Molecule IDs too large for compute chunk/atom* The IDs must not be larger than can be stored in a 32-bit integer since chunk IDs are 32-bit integers. -*Molecule auto special bond generation overflow* - Counts exceed maxspecial setting for other atoms in system. - -*Molecule file has angles but no nangles setting* - Self-explanatory. - -*Molecule file has body params but no setting for them* - Self-explanatory. - -*Molecule file has bonds but no nbonds setting* - Self-explanatory. - -*Molecule file has dihedrals but no ndihedrals setting* - Self-explanatory. - -*Molecule file has fragments but no nfragments setting* - Self-explanatory. - -*Molecule file has impropers but no nimpropers setting* - Self-explanatory. - -*Molecule file has no Body Doubles section* - Self-explanatory. - -*Molecule file has no Body Integers section* - Self-explanatory. - -*Molecule file has no Fragments section* - Self-explanatory. - -*Molecule file has special flags but no bonds* - Self-explanatory. - -*Molecule file needs both Special Bond sections* - Self-explanatory. - -*Molecule file requires atom style body* - Self-explanatory. - *Molecule file shake flags not before shake atoms* The order of the two sections is important. @@ -5755,52 +3330,6 @@ Doc page with :doc:`WARNING messages ` *Molecule file special list does not match special count* The number of values in an atom's special list does not match count. -*Molecule file z center-of-mass must be 0.0 for 2d* - Self-explanatory. - -*Molecule file z coord must be 0.0 for 2d* - Self-explanatory. - -*Molecule natoms must be 1 for body particle* - Self-explanatory. - -*Molecule sizescale must be 1.0 for body particle* - Self-explanatory. - -*Molecule template ID for atom_style template does not exist* - Self-explanatory. - -*Molecule template ID for create_atoms does not exist* - Self-explanatory. - -*Molecule template ID for fix deposit does not exist* - Self-explanatory. - -*Molecule template ID for fix gcmc does not exist* - Self-explanatory. - -*Molecule template ID for fix pour does not exist* - Self-explanatory. - -*Molecule template ID for fix rigid/small does not exist* - Self-explanatory. - -*Molecule template ID for fix shake does not exist* - Self-explanatory. - -*Molecule template ID must be alphanumeric or underscore characters* - Self-explanatory. - -*Molecule topology/atom exceeds system topology/atom* - The number of bonds, angles, etc per-atom in the molecule exceeds the - system setting. See the create_box command for how to specify these - values. - -*Molecule topology type exceeds system topology type* - The number of bond, angle, etc types in the molecule exceeds the - system setting. See the create_box command for how to specify these - values. - *More than one fix deform* Only one fix deform can be defined at a time. @@ -5811,9 +3340,6 @@ Doc page with :doc:`WARNING messages ` *More than one fix shake* Only one fix shake can be defined. -*Mu not allowed when not using semi-grand in fix atom/swap command* - Self-explanatory. - *Must define angle_style before Angle Coeffs* Must use an angle_style command before reading a data file that defines Angle Coeffs. @@ -5874,9 +3400,6 @@ Doc page with :doc:`WARNING messages ` Cannot use the temper command with only one processor partition. Use the -partition command-line option. -*Must not have multiple fixes change box parameter ...* - Self-explanatory. - *Must read Angle Type Labels before Angles* An Angle Type Labels section of a data file must come before the Angles section. @@ -5941,21 +3464,6 @@ Doc page with :doc:`WARNING messages ` *Must specify a region in fix deposit* The region keyword must be specified with this fix. -*Must specify a region in fix pour* - Self-explanatory. - -*Must specify at least 2 types in fix atom/swap command* - Self-explanatory. - -*Must use 'kim_style init' command before simulation box is defined* - Self-explanatory. - -*Must use 'kim_style define' command after simulation box is defined* - Self-explanatory. - -*Must use 'kim_style init' command before 'kim_style define'* - Self-explanatory. - *Must use 'kspace_modify pressure/scalar no' for rRESPA with kspace_style MSM* The kspace scalar pressure option cannot (yet) be used with rRESPA. @@ -5979,22 +3487,10 @@ Doc page with :doc:`WARNING messages ` *Must use Kokkos half/thread or full neighbor list with threads or GPUs* Using Kokkos half-neighbor lists with threading is not allowed. -*Must use a block or cylinder region with fix pour* - Self-explanatory. - -*Must use a block region with fix pour for 2d simulations* - Self-explanatory. - *Must use a bond style with TIP4P potential* TIP4P potentials assume bond lengths in water are constrained by a fix shake command. -*Must use a molecular atom style with fix poems molecule* - Self-explanatory. - -*Must use a z-axis cylinder region with fix pour* - Self-explanatory. - *Must use an angle style with TIP4P potential* TIP4P potentials assume angles in water are constrained by a fix shake command. @@ -6002,12 +3498,6 @@ Doc page with :doc:`WARNING messages ` *Must use atom map style array with Kokkos* See the atom_modify map command. -*Must use atom style with molecule IDs with fix bond/swap* - Self-explanatory. - -*Must use pair_style comb or comb3 with fix qeq/comb* - Self-explanatory. - *Must use variable energy with fix addforce* Must define an energy variable when applying a dynamic force during minimization. @@ -6016,21 +3506,12 @@ Doc page with :doc:`WARNING messages ` You must define an energy when performing a minimization with a variable E-field. -*NEB command before simulation box is defined* - Self-explanatory. - *NEB requires damped dynamics minimizer* Use a different minimization style. -*NEB requires use of fix neb* - Self-explanatory. - *NL ramp in wall/piston only implemented in zlo for now* The ramp keyword can only be used for piston applied to face zlo. -*Need nswaptypes mu values in fix atom/swap command* - Self-explanatory. - *Needed bonus data not in data file* Some atom styles require bonus data. See the read_data page for details. @@ -6039,12 +3520,6 @@ Doc page with :doc:`WARNING messages ` The header of the data file indicated bonds, angles, etc would be included, but they are not present. -*Neigh_modify exclude molecule requires atom attribute molecule* - Self-explanatory. - -*Neigh_modify include group != atom_modify first group* - Self-explanatory. - *Neighbor delay must be 0 or multiple of every setting* The delay and every parameters set via the neigh_modify command are inconsistent. If the delay setting is non-zero, then it must be a @@ -6061,12 +3536,6 @@ Doc page with :doc:`WARNING messages ` *Neighbor multi not yet enabled for ghost neighbors* This is a current restriction within LAMMPS. -*Neighbor multi not yet enabled for granular* - Self-explanatory. - -*Neighbor multi not yet enabled for rRESPA* - Self-explanatory. - *Neighbor page size must be >= 10x the one atom setting* This is required to prevent wasting too much memory. @@ -6094,19 +3563,10 @@ Doc page with :doc:`WARNING messages ` *Next command must list all universe and uloop variables* This is to ensure they stay in sync. -*No Kspace style defined for compute group/group* - Self-explanatory. - *No OpenMP support compiled in* An OpenMP flag is set, but LAMMPS was not built with OpenMP support. -*No angle style is defined for compute angle/local* - Self-explanatory. - -*No angles allowed with this atom style* - Self-explanatory. - *No atoms in data file* The header of the data file indicated that atoms would be included, but they are not present. @@ -6114,52 +3574,16 @@ Doc page with :doc:`WARNING messages ` *No basis atoms in lattice* Basis atoms must be defined for lattice style user. -*No bodies allowed with this atom style* - Self-explanatory. Check data file. - -*No bond style is defined for compute bond/local* - Self-explanatory. - -*No bonds allowed with this atom style* - Self-explanatory. - -*No box information in dump. You have to use 'box no'* - Self-explanatory. - *No count or invalid atom count in molecule file* The number of atoms must be specified. -*No dihedral style is defined for compute dihedral/local* - Self-explanatory. - -*No dihedrals allowed with this atom style* - Self-explanatory. - *No dump custom arguments specified* The dump custom command requires that atom quantities be specified to output to dump file. -*No dump local arguments specified* - Self-explanatory. - -*No ellipsoids allowed with this atom style* - Self-explanatory. Check data file. - *No fix gravity defined for fix pour* Gravity is required to use fix pour. -*No improper style is defined for compute improper/local* - Self-explanatory. - -*No impropers allowed with this atom style* - Self-explanatory. - -*No input values for fix ave/spatial* - Self-explanatory. - -*No lines allowed with this atom style* - Self-explanatory. Check data file. - *No matching element in ADP potential file* The ADP potential file does not contain elements that match the requested elements. @@ -6172,63 +3596,22 @@ Doc page with :doc:`WARNING messages ` The data file cannot specify the number of bonds, angles, etc, because this info if inferred from the molecule templates. -*No overlap of box and region for create_atoms* - Self-explanatory. - *No pair coul/streitz for fix qeq/slater* These commands must be used together. -*No pair hbond/dreiding coefficients set* - Self-explanatory. - *No pair style defined for compute group/group* Cannot calculate group interactions without a pair style defined. -*No pair style is defined for compute pair/local* - Self-explanatory. - -*No pair style is defined for compute property/local* - Self-explanatory. - *No rigid bodies defined* The fix specification did not end up defining any rigid bodies. -*No triangles allowed with this atom style* - Self-explanatory. Check data file. - -*No values in fix ave/chunk command* - Self-explanatory. - -*No values in fix ave/time command* - Self-explanatory. - -*Non digit character between brackets in variable* - Self-explanatory. - *Non integer # of swaps in temper command* Swap frequency in temper command must evenly divide the total # of timesteps. -*Non-numeric box dimensions - simulation unstable* - The box size has apparently blown up. - -*Non-zero atom IDs with atom_modify id = no* - Self-explanatory. - -*Non-zero read_data shift z value for 2d simulation* - Self-explanatory. - -*Nprocs not a multiple of N for -reorder* - Self-explanatory. - *Number of core atoms != number of shell atoms* There must be a one-to-one pairing of core and shell atoms. -*Numeric index is out of bounds* - A command with an argument that specifies an integer or range of - integers is using a value that is less than 1 or greater than the - maximum allowed limit. - *One or more Atom IDs is negative* Atom IDs must be positive integers. @@ -6244,70 +3627,10 @@ Doc page with :doc:`WARNING messages ` Two or more rigid bodies defined by the fix rigid command cannot contain the same atom. -*One or more rigid bodies are a single particle* - Self-explanatory. - *One or zero atoms in rigid body* Any rigid body defined by the fix rigid command must contain 2 or more atoms. -*Only 2 types allowed when not using semi-grand in fix atom/swap command* - Self-explanatory. - -*Only one cut-off allowed when requesting all long* - Self-explanatory. - -*Only one cutoff allowed when requesting all long* - Self-explanatory. - -*Only zhi currently implemented for fix append/atoms* - Self-explanatory. - -*Out of range atoms - cannot compute MSM* - One or more atoms are attempting to map their charge to a MSM grid point - that is not owned by a processor. This is likely for one of two - reasons, both of them bad. First, it may mean that an atom near the - boundary of a processor's subdomain has moved more than 1/2 the - :doc:`neighbor skin distance ` without neighbor lists being - rebuilt and atoms being migrated to new processors. This also means - you may be missing pairwise interactions that need to be computed. - The solution is to change the re-neighboring criteria via the - :doc:`neigh_modify ` command. The safest settings are - "delay 0 every 1 check yes". Second, it may mean that an atom has - moved far outside a processor's subdomain or even the entire - simulation box. This indicates bad physics, e.g. due to highly - overlapping atoms, too large a timestep, etc. - -*Out of range atoms - cannot compute PPPM* - One or more atoms are attempting to map their charge to a PPPM grid - point that is not owned by a processor. This is likely for one of two - reasons, both of them bad. First, it may mean that an atom near the - boundary of a processor's subdomain has moved more than 1/2 the - :doc:`neighbor skin distance ` without neighbor lists being - rebuilt and atoms being migrated to new processors. This also means - you may be missing pairwise interactions that need to be computed. - The solution is to change the re-neighboring criteria via the - :doc:`neigh_modify ` command. The safest settings are - "delay 0 every 1 check yes". Second, it may mean that an atom has - moved far outside a processor's subdomain or even the entire - simulation box. This indicates bad physics, e.g. due to highly - overlapping atoms, too large a timestep, etc. - -*Out of range atoms - cannot compute PPPMDisp* - One or more atoms are attempting to map their charge to a PPPM grid - point that is not owned by a processor. This is likely for one of two - reasons, both of them bad. First, it may mean that an atom near the - boundary of a processor's subdomain has moved more than 1/2 the - :doc:`neighbor skin distance ` without neighbor lists being - rebuilt and atoms being migrated to new processors. This also means - you may be missing pairwise interactions that need to be computed. - The solution is to change the re-neighboring criteria via the - :doc:`neigh_modify ` command. The safest settings are - "delay 0 every 1 check yes". Second, it may mean that an atom has - moved far outside a processor's subdomain or even the entire - simulation box. This indicates bad physics, e.g. due to highly - overlapping atoms, too large a timestep, etc. - *Overflow of allocated fix vector storage* This should not normally happen if the fix correctly calculated how long the vector will grow to. Contact the developers. @@ -6363,12 +3686,6 @@ Doc page with :doc:`WARNING messages ` The prd command cannot be used before a read_data, read_restart, or create_box command. -*PRD nsteps must be multiple of t_event* - Self-explanatory. - -*PRD t_corr must be multiple of t_event* - Self-explanatory. - *Package command after simulation box is defined* The package command cannot be used after a read_data, read_restart, or create_box command. @@ -6389,30 +3706,18 @@ Doc page with :doc:`WARNING messages ` The OPENMP package must be installed via "make yes-openmp" before LAMMPS is built. -*Pair body requires atom style body* - Self-explanatory. - *Pair body requires body style nparticle* This pair style is specific to the nparticle body style. -*Pair brownian requires atom style sphere* - Self-explanatory. - *Pair brownian requires extended particles* One of the particles has radius 0.0. *Pair brownian requires monodisperse particles* All particles must be the same finite size. -*Pair brownian/poly requires atom style sphere* - Self-explanatory. - *Pair brownian/poly requires extended particles* One of the particles has radius 0.0. -*Pair brownian/poly requires newton pair off* - Self-explanatory. - *Pair coeff for hybrid has invalid style* Style in pair coeff must have been listed in pair_style command. @@ -6448,18 +3753,6 @@ Doc page with :doc:`WARNING messages ` Each atom type involved in pair_style gayberne must have these 3 coefficients set at least once. -*Pair gayberne requires atom style ellipsoid* - Self-explanatory. - -*Pair gayberne requires atoms with same type have same shape* - Self-explanatory. - -*Pair gayberne/gpu requires atom style ellipsoid* - Self-explanatory. - -*Pair gayberne/gpu requires atoms with same type have same shape* - Self-explanatory. - *Pair granular requires atom attributes radius, rmass* The atom style defined does not have these attributes. @@ -6470,9 +3763,6 @@ Doc page with :doc:`WARNING messages ` This is a current restriction of the implementation of pair granular styles with history. -*Pair hybrid single calls do not support per sub-style special bond values* - Self-explanatory. - *Pair hybrid sub-style does not support single call* You are attempting to invoke a single() call on a pair style that does not support it. @@ -6488,36 +3778,21 @@ Doc page with :doc:`WARNING messages ` *Pair inner cutoff >= Pair outer cutoff* The specified cutoffs for the pair style are inconsistent. -*Pair line/lj requires atom style line* - Self-explanatory. - *Pair lj/long/dipole/long requires atom attributes mu, torque* The atom style defined does not have these attributes. -*Pair lubricate requires atom style sphere* - Self-explanatory. - *Pair lubricate requires ghost atoms store velocity* Use the comm_modify vel yes command to enable this. *Pair lubricate requires monodisperse particles* All particles must be the same finite size. -*Pair lubricate/poly requires atom style sphere* - Self-explanatory. - *Pair lubricate/poly requires extended particles* One of the particles has radius 0.0. *Pair lubricate/poly requires ghost atoms store velocity* Use the comm_modify vel yes command to enable this. -*Pair lubricate/poly requires newton pair off* - Self-explanatory. - -*Pair lubricateU requires atom style sphere* - Self-explanatory. - *Pair lubricateU requires ghost atoms store velocity* Use the comm_modify vel yes command to enable this. @@ -6527,9 +3802,6 @@ Doc page with :doc:`WARNING messages ` *Pair lubricateU/poly requires ghost atoms store velocity* Use the comm_modify vel yes command to enable this. -*Pair lubricateU/poly requires newton pair off* - Self-explanatory. - *Pair peri lattice is not identical in x, y, and z* The lattice defined by the lattice command must be cubic. @@ -6540,24 +3812,6 @@ Doc page with :doc:`WARNING messages ` Even for atomic systems, an atom map is required to find Peridynamic bonds. Use the atom_modify command to define one. -*Pair resquared epsilon a,b,c coeffs are not all set* - Self-explanatory. - -*Pair resquared epsilon and sigma coeffs are not all set* - Self-explanatory. - -*Pair resquared requires atom style ellipsoid* - Self-explanatory. - -*Pair resquared requires atoms with same type have same shape* - Self-explanatory. - -*Pair resquared/gpu requires atom style ellipsoid* - Self-explanatory. - -*Pair resquared/gpu requires atoms with same type have same shape* - Self-explanatory. - *Pair style AIREBO requires atom IDs* This is a requirement to use the AIREBO potential. @@ -6575,9 +3829,6 @@ Doc page with :doc:`WARNING messages ` *Pair style COMB requires atom IDs* This is a requirement to use the AIREBO potential. -*Pair style COMB requires atom attribute q* - Self-explanatory. - *Pair style COMB requires newton pair on* See the newton command. This is a restriction to use the COMB potential. @@ -6585,9 +3836,6 @@ Doc page with :doc:`WARNING messages ` *Pair style COMB3 requires atom IDs* This is a requirement to use the COMB3 potential. -*Pair style COMB3 requires atom attribute q* - Self-explanatory. - *Pair style COMB3 requires newton pair on* See the newton command. This is a restriction to use the COMB3 potential. @@ -6671,9 +3919,6 @@ Doc page with :doc:`WARNING messages ` *Pair style coul/long/gpu requires atom attribute q* The atom style defined does not have these attributes. -*Pair style coul/streitz requires atom attribute q* - Self-explanatory. - *Pair style does not have extra field requested by compute pair/local* The pair style does not support the pN value requested by the compute pair/local command. @@ -6710,24 +3955,9 @@ Doc page with :doc:`WARNING messages ` Atoms in the simulation do not have IDs, so history effects cannot be tracked by the granular pair potential. -*Pair style hbond/dreiding requires an atom map, see atom_modify* - Self-explanatory. - -*Pair style hbond/dreiding requires atom IDs* - Self-explanatory. - -*Pair style hbond/dreiding requires molecular system* - Self-explanatory. - *Pair style hbond/dreiding requires newton pair on* See the newton command for details. -*Pair style hybrid cannot have hybrid as an argument* - Self-explanatory. - -*Pair style hybrid cannot have none as an argument* - Self-explanatory. - *Pair style is incompatible with KSpace style* If a pair style with a long-range Coulombic component is selected, then a kspace style must also be used. @@ -6827,9 +4057,6 @@ Doc page with :doc:`WARNING messages ` *Pair style nm/cut/coul/long requires atom attribute q* The atom style defined does not have this attribute. -*Pair style peri requires atom style peri* - Self-explanatory. - *Pair style polymorphic requires atom IDs* This is a requirement to use the polymorphic potential. @@ -6849,9 +4076,6 @@ Doc page with :doc:`WARNING messages ` *Pair style requires a KSpace style* No kspace style is defined. -*Pair style requires use of kspace_style ewald/disp* - Self-explanatory. - *Pair style sw/gpu requires atom IDs* This is a requirement to use this potential. @@ -6904,38 +4128,17 @@ Doc page with :doc:`WARNING messages ` *Pair tersoff/zbl/kk requires metal or real units* This is a current restriction of this pair potential. -*Pair tri/lj requires atom style tri* - Self-explanatory. - -*Pair yukawa/colloid requires atom style sphere* - Self-explanatory. - -*Pair yukawa/colloid requires atoms with same type have same radius* - Self-explanatory. - -*Pair yukawa/colloid/gpu requires atom style sphere* - Self-explanatory. - *PairKIM only works with 3D problems* This is a current limitation. -*Pair_coeff command before pair_style is defined* - Self-explanatory. - *Pair_coeff command before simulation box is defined* The pair_coeff command cannot be used before a read_data, read_restart, or create_box command. -*Pair_modify command before pair_style is defined* - Self-explanatory. - *Pair_modify special setting for pair hybrid incompatible with global special_bonds setting* Cannot override a setting of 0.0 or 1.0 or change a setting between 0.0 and 1.0. -*Pair_write command before pair_style is defined* - Self-explanatory. - *Particle on or inside fix wall surface* Particles must be "exterior" to the wall in order for energy/force to be calculated. @@ -6947,26 +4150,13 @@ Doc page with :doc:`WARNING messages ` *Per-atom compute in equal-style variable formula* Equal-style variables cannot use per-atom quantities. -*Per-atom energy was not tallied on needed timestep* - You are using a thermo keyword that requires potentials to - have tallied energy, but they did not on this timestep. See the - variable page for ideas on how to make this work. - *Per-atom fix in equal-style variable formula* Equal-style variables cannot use per-atom quantities. -*Per-atom virial was not tallied on needed timestep* - You are using a thermo keyword that requires potentials to have - tallied the virial, but they did not on this timestep. See the - variable page for ideas on how to make this work. - *Per-processor system is too big* The number of owned atoms plus ghost atoms on a single processor must fit in 32-bit integer. -*Potential energy ID for fix neb does not exist* - Self-explanatory. - *Potential energy ID for fix nvt/nph/npt does not exist* A compute for potential energy must be defined. @@ -6976,79 +4166,22 @@ Doc page with :doc:`WARNING messages ` *Potential file is missing an entry* The potential file does not have a needed entry. -*Power by 0 in variable formula* - Self-explanatory. - *Pressure ID for fix box/relax does not exist* The compute ID needed to compute pressure for the fix does not exist. -*Pressure ID for fix modify does not exist* - Self-explanatory. - -*Pressure ID for fix npt/nph does not exist* - Self-explanatory. - *Pressure ID for fix press/berendsen does not exist* The compute ID needed to compute pressure for the fix does not exist. -*Pressure ID for fix rigid npt/nph does not exist* - Self-explanatory. - *Pressure ID for thermo does not exist* The compute ID needed to compute pressure for thermodynamics does not exist. -*Pressure control can not be used with fix nvt* - Self-explanatory. - -*Pressure control can not be used with fix nvt/asphere* - Self-explanatory. - -*Pressure control can not be used with fix nvt/body* - Self-explanatory. - -*Pressure control can not be used with fix nvt/sllod* - Self-explanatory. - -*Pressure control can not be used with fix nvt/sphere* - Self-explanatory. - -*Pressure control must be used with fix nph* - Self-explanatory. - -*Pressure control must be used with fix nph/asphere* - Self-explanatory. - -*Pressure control must be used with fix nph/body* - Self-explanatory. - -*Pressure control must be used with fix nph/small* - Self-explanatory. - -*Pressure control must be used with fix nph/sphere* - Self-explanatory. - *Pressure control must be used with fix nphug* A pressure control keyword (iso, aniso, tri, x, y, or z) must be provided. -*Pressure control must be used with fix npt* - Self-explanatory. - -*Pressure control must be used with fix npt/asphere* - Self-explanatory. - -*Pressure control must be used with fix npt/body* - Self-explanatory. - -*Pressure control must be used with fix npt/sphere* - Self-explanatory. - -*Processor count in z must be 1 for 2d simulation* - Self-explanatory. - *Processor partitions do not match number of allocated processors* The total number of processors in all partitions must match the number of processors LAMMPS is running on. @@ -7069,12 +4202,6 @@ Doc page with :doc:`WARNING messages ` *Processors part option and grid style are incompatible* Cannot use gstyle numa or custom with the part option. -*Processors twogrid requires proc count be a multiple of core count* - Self-explanatory. - -*Pstart and Pstop must have the same value* - Self-explanatory. - *Python function evaluation failed* The Python function did not run successfully and/or did not return a value (if it is supposed to return a value). This is probably due to @@ -7101,9 +4228,6 @@ Doc page with :doc:`WARNING messages ` *R0 < 0 for fix spring command* Equilibrium spring length is invalid. -*RATTLE coordinate constraints are not satisfied up to desired tolerance* - Self-explanatory. - *RATTLE determinant = 0.0* The determinant of the matrix being solved for a single cluster specified by the fix rattle command is numerically invalid. @@ -7111,19 +4235,10 @@ Doc page with :doc:`WARNING messages ` *RATTLE failed* Certain constraints were not satisfied. -*RATTLE velocity constraints are not satisfied up to desired tolerance* - Self-explanatory. - *Read data add offset is too big* It cannot be larger than the size of atom IDs, e.g. the maximum 32-bit integer. -*Read dump of atom property that is not allocated* - Self-explanatory. - -*Read rerun dump file timestep > specified stop* - Self-explanatory. - *Read restart MPI-IO input not allowed with % in filename* This is because a % signifies one file per processor and MPI-IO creates one large file for all processors. @@ -7139,16 +4254,10 @@ Doc page with :doc:`WARNING messages ` The read_dump command cannot be used before a read_data, read_restart, or create_box command. -*Read_dump field not found in dump file* - Self-explanatory. - *Read_dump triclinic status does not match simulation* Both the dump snapshot and the current LAMMPS simulation must be using either an orthogonal or triclinic box. -*Read_dump xyz fields do not have consistent scaling/wrapping* - Self-explanatory. - *Reax_defs.h setting for NATDEF is too small* Edit the setting in the ReaxFF library and re-compile the library and re-build LAMMPS. @@ -7160,66 +4269,6 @@ Doc page with :doc:`WARNING messages ` *Receiving partition in processors part command is already a receiver* Cannot specify a partition to be a receiver twice. -*Region ID for compute chunk/atom does not exist* - Self-explanatory. - -*Region ID for compute reduce/region does not exist* - Self-explanatory. - -*Region ID for compute temp/region does not exist* - Self-explanatory. - -*Region ID for dump custom does not exist* - Self-explanatory. - -*Region ID for fix addforce does not exist* - Self-explanatory. - -*Region ID for fix atom/swap does not exist* - Self-explanatory. - -*Region ID for fix ave/spatial does not exist* - Self-explanatory. - -*Region ID for fix aveforce does not exist* - Self-explanatory. - -*Region ID for fix deposit does not exist* - Self-explanatory. - -*Region ID for fix efield does not exist* - Self-explanatory. - -*Region ID for fix evaporate does not exist* - Self-explanatory. - -*Region ID for fix gcmc does not exist* - Self-explanatory. - -*Region ID for fix heat does not exist* - Self-explanatory. - -*Region ID for fix setforce does not exist* - Self-explanatory. - -*Region ID for fix wall/region does not exist* - Self-explanatory. - -*Region ID for group dynamic does not exist* - Self-explanatory. - -*Region ID in variable formula does not exist* - Self-explanatory. - -*Region cannot have 0 length rotation vector* - Self-explanatory. - -*Region for fix oneway does not exist* - Self-explanatory. - -*Region intersect region ID does not exist* - Self-explanatory. - *Region union or intersect cannot be dynamic* The sub-regions can be dynamic, but not the combined region. @@ -7256,18 +4305,12 @@ Doc page with :doc:`WARNING messages ` The rerun command cannot be used before a read_data, read_restart, or create_box command. -*Rerun dump file does not contain requested snapshot* - Self-explanatory. - *Resetting timestep size is not allowed with fix move* This is because fix move is moving atoms based on elapsed time. *Respa inner cutoffs are invalid* The first cutoff must be <= the second cutoff. -*Respa levels must be >= 1* - Self-explanatory. - *Respa middle cutoffs are invalid* The first cutoff must be <= the second cutoff. @@ -7356,12 +4399,6 @@ Doc page with :doc:`WARNING messages ` The run command cannot be used before a read_data, read_restart, or create_box command. -*Run command start value is after start of run* - Self-explanatory. - -*Run command stop value is before end of run* - Self-explanatory. - *Run_style command before simulation box is defined* The run_style command cannot be used before a read_data, read_restart, or create_box command. @@ -7382,9 +4419,6 @@ Doc page with :doc:`WARNING messages ` See the inside keyword if you want this message to be an error vs warning. -*Same dimension twice in fix ave/spatial* - Self-explanatory. - *Sending partition in processors part command is already a sender* Cannot specify a partition to be a sender twice. @@ -7392,12 +4426,6 @@ Doc page with :doc:`WARNING messages ` The set command cannot be used before a read_data, read_restart, or create_box command. -*Set command floating point vector does not exist* - Self-explanatory. - -*Set command integer vector does not exist* - Self-explanatory. - *Set command with no atoms existing* No atoms are yet defined so the set command cannot be used. @@ -7471,12 +4499,6 @@ Doc page with :doc:`WARNING messages ` The 3d grid of processors defined by the processors command does not match the number of processors LAMMPS is being run on. -*Specified target stress must be uniaxial or hydrostatic* - Self-explanatory. - -*Sqrt of negative value in variable formula* - Self-explanatory. - *Subsequent read data induced too many angles per atom* See the extra/angle/per/atom keyword for the create_box or the read_data command to set this limit larger @@ -7493,10 +4515,6 @@ Doc page with :doc:`WARNING messages ` See the extra/improper/per/atom keyword for the create_box or the read_data command to set this limit larger -*Substitution for illegal variable* - Input script line contained a variable that could not be substituted - for. - *Support for writing images in JPEG format not included* LAMMPS was not built with the -DLAMMPS_JPEG switch in the Makefile. @@ -7513,9 +4531,6 @@ Doc page with :doc:`WARNING messages ` The total charge on all atoms on the system is not 0.0. For some KSpace solvers this is an error. -*TAD nsteps must be multiple of t_event* - Self-explanatory. - *TIP4P hydrogen has incorrect atom type* The TIP4P pairwise computation found an H atom whose type does not agree with the specified H type. @@ -7528,9 +4543,6 @@ Doc page with :doc:`WARNING messages ` The target file for the fix tmd command did not list all atoms in the fix group. -*Tad command before simulation box is defined* - Self-explanatory. - *Tagint setting in lmptype.h is invalid* Tagint must be as large or larger than smallint. @@ -7538,107 +4550,17 @@ Doc page with :doc:`WARNING messages ` Format of tagint stored in restart file is not consistent with LAMMPS version you are running. See the settings in src/lmptype.h -*Target pressure for fix rigid/nph cannot be < 0.0* - Self-explanatory. - -*Target pressure for fix rigid/npt/small cannot be < 0.0* - Self-explanatory. - -*Target temperature for fix nvt/npt/nph cannot be 0.0* - Self-explanatory. - -*Target temperature for fix rigid/npt cannot be 0.0* - Self-explanatory. - -*Target temperature for fix rigid/npt/small cannot be 0.0* - Self-explanatory. - -*Target temperature for fix rigid/nvt cannot be 0.0* - Self-explanatory. - -*Target temperature for fix rigid/nvt/small cannot be 0.0* - Self-explanatory. - *Temper command before simulation box is defined* The temper command cannot be used before a read_data, read_restart, or create_box command. -*Temperature ID for fix bond/swap does not exist* - Self-explanatory. - -*Temperature ID for fix box/relax does not exist* - Self-explanatory. - -*Temperature ID for fix nvt/npt does not exist* - Self-explanatory. - -*Temperature ID for fix press/berendsen does not exist* - Self-explanatory. - -*Temperature ID for fix rigid nvt/npt/nph does not exist* - Self-explanatory. - -*Temperature ID for fix temp/berendsen does not exist* - Self-explanatory. - -*Temperature ID for fix temp/csld does not exist* - Self-explanatory. - -*Temperature ID for fix temp/csvr does not exist* - Self-explanatory. - -*Temperature ID for fix temp/rescale does not exist* - Self-explanatory. - *Temperature compute degrees of freedom < 0* This should not happen if you are calculating the temperature on a valid set of atoms. -*Temperature control can not be used with fix nph* - Self-explanatory. - -*Temperature control can not be used with fix nph/asphere* - Self-explanatory. - -*Temperature control can not be used with fix nph/body* - Self-explanatory. - -*Temperature control can not be used with fix nph/sphere* - Self-explanatory. - *Temperature control must be used with fix nphug* The temp keyword must be provided. -*Temperature control must be used with fix npt* - Self-explanatory. - -*Temperature control must be used with fix npt/asphere* - Self-explanatory. - -*Temperature control must be used with fix npt/body* - Self-explanatory. - -*Temperature control must be used with fix npt/sphere* - Self-explanatory. - -*Temperature control must be used with fix nvt* - Self-explanatory. - -*Temperature control must be used with fix nvt/asphere* - Self-explanatory. - -*Temperature control must be used with fix nvt/body* - Self-explanatory. - -*Temperature control must be used with fix nvt/sllod* - Self-explanatory. - -*Temperature control must be used with fix nvt/sphere* - Self-explanatory. - -*Temperature control must not be used with fix nph/small* - Self-explanatory. - *Temperature for fix nvt/sllod does not have a bias* The specified compute must compute temperature with a bias. @@ -7656,31 +4578,10 @@ Doc page with :doc:`WARNING messages ` *Test_descriptor_string already allocated* This is an internal error. Contact the developers. -*The package gpu command is required for gpu styles* - Self-explanatory. - *Thermo and fix not computed at compatible times* Fixes generate values on specific timesteps. The thermo output does not match these timesteps. -*Thermo compute array is accessed out-of-range* - Self-explanatory. - -*Thermo compute does not compute array* - Self-explanatory. - -*Thermo compute does not compute scalar* - Self-explanatory. - -*Thermo compute does not compute vector* - Self-explanatory. - -*Thermo compute vector is accessed out-of-range* - Self-explanatory. - -*Thermo custom variable cannot be indexed* - Self-explanatory. - *Thermo custom variable is not equal-style variable* Only equal-style variables can be output with thermodynamics, not atom-style variables. @@ -7688,21 +4589,6 @@ Doc page with :doc:`WARNING messages ` *Thermo every variable returned a bad timestep* The variable must return a timestep greater than the current timestep. -*Thermo fix array is accessed out-of-range* - Self-explanatory. - -*Thermo fix does not compute array* - Self-explanatory. - -*Thermo fix does not compute scalar* - Self-explanatory. - -*Thermo fix does not compute vector* - Self-explanatory. - -*Thermo fix vector is accessed out-of-range* - Self-explanatory. - *Thermo keyword in variable requires thermo to use/init pe* You are using a thermo keyword in a variable that requires potential energy to be calculated, but your thermo output @@ -7729,9 +4615,6 @@ Doc page with :doc:`WARNING messages ` *Thermo_modify every variable returned a bad timestep* The returned timestep is less than or equal to the current timestep. -*Thermo_modify int format does not contain d character* - Self-explanatory. - *Thermo_modify pressure ID does not compute pressure* The specified compute ID does not compute pressure. @@ -7766,15 +4649,6 @@ Doc page with :doc:`WARNING messages ` Table size specified via pair_modify command does not work with your machine's floating point representation. -*Too few lines in %s section of data file* - Self-explanatory. - -*Too few values in body lines in data file* - Self-explanatory. - -*Too few values in body section of molecule file* - Self-explanatory. - *Too many -pk arguments in command-line* The string formed by concatenating the arguments is too long. Use a package command in the input script instead. @@ -7844,10 +4718,6 @@ Doc page with :doc:`WARNING messages ` *Too many molecules for fix rigid* The limit is 2\^31 = ~2 billion molecules. -*Too many neighbor bins* - This is likely due to an immense simulation box that has blown up - to a large size. - *Too many timesteps* The cumulative timesteps must fit in a 64-bit integer. @@ -7862,12 +4732,6 @@ Doc page with :doc:`WARNING messages ` Table size specified via pair_modify command is too large. Note that a value of N generates a 2\^N size table. -*Too many values in body lines in data file* - Self-explanatory. - -*Too many values in body section of molecule file* - Self-explanatory. - *Too much buffered per-proc info for dump* The size of the buffered string must fit in a 32-bit integer for a dump. @@ -7884,9 +4748,6 @@ Doc page with :doc:`WARNING messages ` Fix poems cannot (yet) work with coupled bodies whose joints connect the bodies in a tree structure. -*Tried to convert a double to int, but input_double > INT_MAX* - Self-explanatory. - *Trying to build an occasional neighbor list before initialization completed* This is not allowed. Source code caller needs to be modified. @@ -7895,9 +4756,6 @@ Doc page with :doc:`WARNING messages ` chunk assignments persist for some number of timesteps, but are doing it in different ways. -*Two groups cannot be the same in fix spring couple* - Self-explanatory. - *The %s type label %s is already in use for type %s* For a given type-kind (atom types, bond types, etc.), a given type label can be assigned to only one numeric type. @@ -7912,9 +4770,6 @@ Doc page with :doc:`WARNING messages ` No matching end double quote was found following a leading double quote. -*Unexpected end of -reorder file* - Self-explanatory. - *Unexpected empty line in Angle Coeffs section* Read a blank line where there should be coefficient data. @@ -7930,9 +4785,6 @@ Doc page with :doc:`WARNING messages ` *Unexpected empty line in Pair Coeffs section* Read a blank line where there should be coefficient data. -*Unexpected end of custom file* - Self-explanatory. - *Unexpected end of data file* LAMMPS hit the end of the data file while attempting to read a section. Something is wrong with the format of the data file. @@ -7946,9 +4798,6 @@ Doc page with :doc:`WARNING messages ` *Unexpected end of fix rigid/small file* A read operation from the file failed. -*Unexpected end of molecule file* - Self-explanatory. - *Unexpected end of neb file* A read operation from the file failed. @@ -7960,93 +4809,15 @@ Doc page with :doc:`WARNING messages ` A universe or uloop style variable must specify a number of values >= to the number of processor partitions. -*Unrecognized angle style* - The choice of angle style is unknown. - -*Unrecognized atom style* - The choice of atom style is unknown. - -*Unrecognized body style* - The choice of body style is unknown. - -*Unrecognized bond style* - The choice of bond style is unknown. - -*Unknown category for info is_active()* - Self-explanatory. - -*Unknown category for info is_available()* - Self-explanatory. - -*Unknown category for info is_defined()* - Self-explanatory. - -*Unrecognized command: %s* - The command is not known to LAMMPS. Check the input script. - -*Unrecognized compute style* - The choice of compute style is unknown. - -*Unrecognized dihedral style* - The choice of dihedral style is unknown. - -*Unrecognized dump reader style* - The choice of dump reader style via the format keyword is unknown. - -*Unrecognized dump style* - The choice of dump style is unknown. - -*Unknown error in GPU library* - Self-explanatory. - -*Unrecognized fix style* - The choice of fix style is unknown. - -*Unknown identifier in data file: %s* - A section of the data file cannot be read by LAMMPS. - -*Unrecognized improper style* - The choice of improper style is unknown. - *Unknown keyword in thermo_style custom command* One or more specified keywords are not recognized. -*Unrecognized kspace style* - The choice of kspace style is unknown. - -*Unknown name for info newton category* - Self-explanatory. - -*Unknown name for info package category* - Self-explanatory. - -*Unknown name for info pair category* - Self-explanatory. - -*Unrecognized pair style* - The choice of pair style is unknown. - *Unknown pair_modify hybrid sub-style* The choice of sub-style is unknown. -*Unrecognized region style* - The choice of region style is unknown. - -*Unknown section in molecule file* - Self-explanatory. - -*Unknown table style in angle style table* - Self-explanatory. - -*Unknown table style in bond style table* - Self-explanatory. - *Unknown table style in pair_style command* Style of table is invalid for use with pair_style table command. -*Unknown unit_style* - Self-explanatory. Check the input script or data file. - *Unrecognized lattice type in MEAM library file* The lattice type in an entry of the MEAM library file is not valid. @@ -8055,9 +4826,6 @@ Doc page with :doc:`WARNING messages ` The lattice type in an entry of the MEAM parameter file is not valid. -*Unrecognized pair style in compute pair command* - Self-explanatory. - *Unsupported mixing rule in kspace_style ewald/disp* Only geometric mixing is supported. @@ -8067,9 +4835,6 @@ Doc page with :doc:`WARNING messages ` *Unsupported order in kspace_style pppm/disp, pair_style %s* Only pair styles with 1/r and 1/r\^6 dependence are currently supported. -*Unsupported parameter in MEAM library file* - Self-explanatory. - *Use cutoff keyword to set cutoff in single mode* Mode is single so cutoff/multi keyword cannot be used. @@ -8080,9 +4845,6 @@ Doc page with :doc:`WARNING messages ` Fix nvt/sllod requires that deforming atoms have a velocity profile provided by "remap v" as a fix deform option. -*Using fix nvt/sllod with no fix deform defined* - Self-explanatory. - *Using fix srd with inconsistent fix deform remap option* When shearing the box in an SRD simulation, the remap v option for fix deform needs to be used. @@ -8093,27 +4855,6 @@ Doc page with :doc:`WARNING messages ` *Using pair lubricate/poly with inconsistent fix deform remap option* If fix deform is used, the remap v option is required. -*Using suffix gpu without GPU package installed* - Self-explanatory. - -*Using suffix intel without INTEL package installed* - Self-explanatory. - -*Using suffix kk without KOKKOS package enabled* - Self-explanatory. - -*Using suffix omp without OPENMP package installed* - Self-explanatory. - -*Using update dipole flag requires atom attribute mu* - Self-explanatory. - -*Using update dipole flag requires atom style sphere* - Self-explanatory. - -*Variable ID in variable formula does not exist* - Self-explanatory. - *Variable atom ID is too large* Specified ID is larger than the maximum allowed atom ID. @@ -8127,9 +4868,6 @@ Doc page with :doc:`WARNING messages ` *Variable evaluation in region gave bad value* Variable returned a radius < 0.0. -*Variable for compute ti is invalid style* - Self-explanatory. - *Variable for create_atoms is invalid style* The variables must be equal-style variables. @@ -8154,9 +4892,6 @@ Doc page with :doc:`WARNING messages ` *Variable for fix adapt is invalid style* Only equal-style variables can be used. -*Variable for fix addforce is invalid style* - Self-explanatory. - *Variable for fix aveforce is invalid style* Only equal-style variables can be used. @@ -8220,9 +4955,6 @@ Doc page with :doc:`WARNING messages ` *Variable for region is invalid style* Only equal-style variables can be used. -*Variable for region is not equal style* - Self-explanatory. - *Variable for region sphere is invalid style* Only equal-style variables are allowed. @@ -8238,173 +4970,11 @@ Doc page with :doc:`WARNING messages ` *Variable for velocity set is invalid style* Only atom-style variables can be used. -*Variable for voronoi radius is not atom style* - Self-explanatory. - -*Variable formula compute array is accessed out-of-range* - Self-explanatory. - -*Variable formula compute vector is accessed out-of-range* - Self-explanatory. - -*Variable formula fix array is accessed out-of-range* - Self-explanatory. - -*Variable formula fix vector is accessed out-of-range* - Self-explanatory. - *Variable has circular dependency* A circular dependency is when variable "a" in used by variable "b" and variable "b" is also used by variable "a". Circular dependencies with longer chains of dependence are also not allowed. -*Variable name between brackets must be alphanumeric or underscore characters* - Self-explanatory. - -*Variable name for compute chunk/atom does not exist* - Self-explanatory. - -*Variable name for compute reduce does not exist* - Self-explanatory. - -*Variable name for compute ti does not exist* - Self-explanatory. - -*Variable name for create_atoms does not exist* - Self-explanatory. - -*Variable name for displace_atoms does not exist* - Self-explanatory. - -*Variable name for dump every does not exist* - Self-explanatory. - -*Variable name for dump image center does not exist* - Self-explanatory. - -*Variable name for dump image phi does not exist* - Self-explanatory. - -*Variable name for dump image theta does not exist* - Self-explanatory. - -*Variable name for dump image zoom does not exist* - Self-explanatory. - -*Variable name for fix adapt does not exist* - Self-explanatory. - -*Variable name for fix addforce does not exist* - Self-explanatory. - -*Variable name for fix ave/atom does not exist* - Self-explanatory. - -*Variable name for fix ave/chunk does not exist* - Self-explanatory. - -*Variable name for fix ave/correlate does not exist* - Self-explanatory. - -*Variable name for fix ave/histo does not exist* - Self-explanatory. - -*Variable name for fix ave/spatial does not exist* - Self-explanatory. - -*Variable name for fix ave/time does not exist* - Self-explanatory. - -*Variable name for fix aveforce does not exist* - Self-explanatory. - -*Variable name for fix deform does not exist* - Self-explanatory. - -*Variable name for fix efield does not exist* - Self-explanatory. - -*Variable name for fix gravity does not exist* - Self-explanatory. - -*Variable name for fix heat does not exist* - Self-explanatory. - -*Variable name for fix indent does not exist* - Self-explanatory. - -*Variable name for fix langevin does not exist* - Self-explanatory. - -*Variable name for fix move does not exist* - Self-explanatory. - -*Variable name for fix setforce does not exist* - Self-explanatory. - -*Variable name for fix store/state does not exist* - Self-explanatory. - -*Variable name for fix temp/berendsen does not exist* - Self-explanatory. - -*Variable name for fix temp/csld does not exist* - Self-explanatory. - -*Variable name for fix temp/csvr does not exist* - Self-explanatory. - -*Variable name for fix temp/rescale does not exist* - Self-explanatory. - -*Variable name for fix vector does not exist* - Self-explanatory. - -*Variable name for fix wall does not exist* - Self-explanatory. - -*Variable name for fix wall/reflect does not exist* - Self-explanatory. - -*Variable name for fix wall/srd does not exist* - Self-explanatory. - -*Variable name for group does not exist* - Self-explanatory. - -*Variable name for group dynamic does not exist* - Self-explanatory. - -*Variable name for region cylinder does not exist* - Self-explanatory. - -*Variable name for region does not exist* - Self-explanatory. - -*Variable name for region sphere does not exist* - Self-explanatory. - -*Variable name for restart does not exist* - Self-explanatory. - -*Variable name for set command does not exist* - Self-explanatory. - -*Variable name for thermo every does not exist* - Self-explanatory. - -*Variable name for velocity set does not exist* - Self-explanatory. - -*Variable name for voronoi radius does not exist* - Self-explanatory. - -*Variable name must be alphanumeric or underscore characters* - Self-explanatory. - -*Variable uses atom property that is not allocated* - Self-explanatory. - *Velocity command before simulation box is defined* The velocity command cannot be used before a read_data, read_restart, or create_box command. @@ -8412,12 +4982,6 @@ Doc page with :doc:`WARNING messages ` *Velocity command with no atoms existing* A velocity command has been used, but no atoms yet exist. -*Velocity ramp in z for a 2d problem* - Self-explanatory. - -*Velocity rigid used with non-rigid fix-ID* - Self-explanatory. - *Velocity temperature ID does calculate a velocity bias* The specified compute must compute a bias for temperature. @@ -8441,23 +5005,9 @@ Doc page with :doc:`WARNING messages ` This is so there is an equal number of Rspace processors for every Kspace processor. -*Virial was not tallied on needed timestep* - You are using a thermo keyword that requires potentials to - have tallied the virial, but they did not on this timestep. See the - variable page for ideas on how to make this work. - *Voro++ error: narea and neigh have a different size* This error is returned by the Voro++ library. -*Wall defined twice in fix wall command* - Self-explanatory. - -*Wall defined twice in fix wall/reflect command* - Self-explanatory. - -*Wall defined twice in fix wall/srd command* - Self-explanatory. - *Water H epsilon must be 0.0 for pair style lj/cut/tip4p/cut* This is because LAMMPS does not compute the Lennard-Jones interactions with these particles for efficiency reasons. @@ -8474,18 +5024,6 @@ Doc page with :doc:`WARNING messages ` A world-style variable must specify a number of values equal to the number of processor partitions. -*Write_data command before simulation box is defined* - Self-explanatory. - *Write_restart command before simulation box is defined* The write_restart command cannot be used before a read_data, read_restart, or create_box command. - -*Zero length rotation vector with displace_atoms* - Self-explanatory. - -*Zero length rotation vector with fix move* - Self-explanatory. - -*Zero-length lattice orient vector* - Self-explanatory. diff --git a/doc/src/Errors_warnings.rst b/doc/src/Errors_warnings.rst index 25aa87f162..3f18ddd2ca 100644 --- a/doc/src/Errors_warnings.rst +++ b/doc/src/Errors_warnings.rst @@ -1,11 +1,15 @@ Warning messages ================ -This is an alphabetic list of the WARNING messages LAMMPS prints out -and the reason why. If the explanation here is not sufficient, the -documentation for the offending command may help. Warning messages -also list the source file and line number where the warning was -generated. For example, a message like this: +This is an alphabetic list of some of the WARNING messages LAMMPS prints +out and the reason why. If the explanation here is not sufficient, the +documentation for the offending command may help. This is a historic +list and no longer updated. Instead the LAMMPS developers are trying +to provide more details right with the error message or link to a +paragraph with :doc:`detailed explanations `. + +Warning messages also list the source file and line number where the +warning was generated. For example, a message like this: .. parsed-literal:: @@ -14,7 +18,7 @@ generated. For example, a message like this: means that line #187 in the file src/domain.cpp generated the error. Looking in the source code may help you figure out what went wrong. -Doc page with :doc:`ERROR messages ` +Please also see the page with :doc:`Error messages ` ---------- @@ -28,16 +32,10 @@ Doc page with :doc:`ERROR messages ` cutoff is set too short or the angle has blown apart and an atom is too far away. -*Angle style in data file differs from currently defined angle style* - Self-explanatory. - *Angles are defined but no angle style is set* The topology contains angles, but there are no angle forces computed since there was no angle_style command. -*Atom style in data file differs from currently defined atom style* - Self-explanatory. - *Bond atom missing in box size check* The second atom needed to compute a particular bond is missing on this processor. Typically this is because the pairwise cutoff is set too @@ -53,9 +51,6 @@ Doc page with :doc:`ERROR messages ` processor. Typically this is because the pairwise cutoff is set too short or the bond has blown apart and an atom is too far away. -*Bond style in data file differs from currently defined bond style* - Self-explanatory. - *Bonds are defined but no bond style is set* The topology contains bonds, but there are no bond forces computed since there was no bond_style command. @@ -68,9 +63,6 @@ Doc page with :doc:`ERROR messages ` length, multiplying by the number of bonds in the interaction (e.g. 3 for a dihedral) and adding a small amount of stretch. -*Both groups in compute group/group have a net charge; the Kspace boundary correction to energy will be non-zero* - Self-explanatory. - *Calling write_dump before a full system init.* The write_dump command is used before the system has been fully initialized as part of a 'run' or 'minimize' command. Not all dump @@ -86,18 +78,6 @@ Doc page with :doc:`ERROR messages ` This means the temperature associated with the rigid bodies may be incorrect on this timestep. -*Cannot include log terms without 1/r terms; setting flagHI to 1* - Self-explanatory. - -*Cannot include log terms without 1/r terms; setting flagHI to 1.* - Self-explanatory. - -*Charges are set, but coulombic solver is not used* - Self-explanatory. - -*Charges did not converge at step %ld: %lg* - Self-explanatory. - *Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost* The communication cutoff defaults to the maximum of what is inferred from pair and bond styles (will be zero, if none are defined) and what is specified @@ -123,9 +103,6 @@ Doc page with :doc:`ERROR messages ` is not changed automatically and the warning may be ignored depending on the specific system being simulated. -*Communication cutoff is too small for SNAP micro load balancing, increased to %lf* - Self-explanatory. - *Compute cna/atom cutoff may be too large to find ghost atom neighbors* The neighbor cutoff used may not encompass enough ghost atoms to perform this operation correctly. @@ -158,9 +135,6 @@ Doc page with :doc:`ERROR messages ` Conformation of the 4 listed dihedral atoms is extreme; you may want to check your simulation geometry. -*Dihedral style in data file differs from currently defined dihedral style* - Self-explanatory. - *Dihedrals are defined but no dihedral style is set* The topology contains dihedrals, but there are no dihedral forces computed since there was no dihedral_style command. @@ -177,9 +151,6 @@ Doc page with :doc:`ERROR messages ` *Estimated error in splitting of dispersion coeffs is %g* Error is greater than 0.0001 percent. -*Ewald/disp Newton solver failed, using old method to estimate g_ewald* - Self-explanatory. Choosing a different cutoff value may help. - *FENE bond too long* A FENE bond has stretched dangerously far. It's interaction strength will be truncated to attempt to prevent the bond from blowing up. @@ -192,9 +163,6 @@ Doc page with :doc:`ERROR messages ` A FENE bond has stretched dangerously far. It's interaction strength will be truncated to attempt to prevent the bond from blowing up. -*Fix halt condition for fix-id %s met on step %ld with value %g* - Self explanatory. - *Fix SRD walls overlap but fix srd overlap not set* You likely want to set this in your input script. @@ -238,21 +206,12 @@ Doc page with :doc:`ERROR messages ` *Fix property/atom mol or charge w/out ghost communication* A model typically needs these properties defined for ghost atoms. -*Fix qeq CG convergence failed (%g) after %d iterations at %ld step* - Self-explanatory. - *Fix qeq has non-zero lower Taper radius cutoff* Absolute value must be <= 0.01. *Fix qeq has very low Taper radius cutoff* Value should typically be >= 5.0. -*Fix qeq/dynamic tolerance may be too small for damped dynamics* - Self-explanatory. - -*Fix qeq/fire tolerance may be too small for damped fires* - Self-explanatory. - *Fix rattle should come after all other integration fixes* This fix is designed to work after all other integration fixes change atom positions. Thus it should be the last integration fix specified. @@ -285,9 +244,6 @@ Doc page with :doc:`ERROR messages ` The user-specified force accuracy cannot be achieved unless the table feature is disabled by using 'pair_modify table 0'. -*Geometric mixing assumed for 1/r\^6 coefficients* - Self-explanatory. - *Group for fix_modify temp != fix group* The fix_modify command is specifying a temperature computation that computes a temperature on a different group of atoms than the fix @@ -310,46 +266,14 @@ Doc page with :doc:`ERROR messages ` Conformation of the 4 listed improper atoms is extreme; you may want to check your simulation geometry. -*Improper style in data file differs from currently defined improper style* - Self-explanatory. - *Impropers are defined but no improper style is set* The topology contains impropers, but there are no improper forces computed since there was no improper_style command. -*Inconsistent image flags* - The image flags for a pair on bonded atoms appear to be inconsistent. - Inconsistent means that when the coordinates of the two atoms are - unwrapped using the image flags, the two atoms are far apart. - Specifically they are further apart than half a periodic box length. - Or they are more than a box length apart in a non-periodic dimension. - This is usually due to the initial data file not having correct image - flags for the two atoms in a bond that straddles a periodic boundary. - They should be different by 1 in that case. This is a warning because - inconsistent image flags will not cause problems for dynamics or most - LAMMPS simulations. However they can cause problems when such atoms - are used with the fix rigid or replicate commands. Note that if you - have an infinite periodic crystal with bonds then it is impossible to - have fully consistent image flags, since some bonds will cross - periodic boundaries and connect two atoms with the same image - flag. - *Increasing communication cutoff for GPU style* The pair style has increased the communication cutoff to be consistent with the communication cutoff requirements for this pair style when run on the GPU. -*KIM Model does not provide 'energy'; Potential energy will be zero* - Self-explanatory. - -*KIM Model does not provide 'forces'; Forces will be zero* - Self-explanatory. - -*KIM Model does not provide 'particleEnergy'; energy per atom will be zero* - Self-explanatory. - -*KIM Model does not provide 'particleVirial'; virial per atom will be zero* - Self-explanatory. - *Kspace_modify slab param < 2.0 may cause unphysical behavior* The kspace_modify slab parameter should be larger to ensure periodic grids padded with empty space do not overlap. @@ -401,20 +325,10 @@ Doc page with :doc:`ERROR messages ` box, or moved further than one processor's subdomain away before reneighboring. -*MSM mesh too small, increasing to 2 points in each direction* - Self-explanatory. - *Mismatch between velocity and compute groups* The temperature computation used by the velocity command will not be on the same group of atoms that velocities are being set for. -*Mixing forced for lj coefficients* - Self-explanatory. - -*Molecule attributes do not match system attributes* - An attribute is specified (e.g. diameter, charge) that is - not defined for the specified atom style. - *Molecule has bond topology but no special bond settings* This means the bonded atoms will not be excluded in pairwise interactions. @@ -449,9 +363,6 @@ Doc page with :doc:`ERROR messages ` *More than one compute damage/atom* It is not efficient to use compute ke/atom more than once. -*More than one compute dilatation/atom* - Self-explanatory. - *More than one compute erotate/sphere/atom* It is not efficient to use compute erorate/sphere/atom more than once. @@ -464,24 +375,6 @@ Doc page with :doc:`ERROR messages ` *More than one compute orientorder/atom* It is not efficient to use compute orientorder/atom more than once. -*More than one compute plasticity/atom* - Self-explanatory. - -*More than one compute sna/atom* - Self-explanatory. - -*More than one compute sna/grid* - Self-explanatory. - -*More than one compute sna/grid/local* - Self-explanatory. - -*More than one compute snad/atom* - Self-explanatory. - -*More than one compute snav/atom* - Self-explanatory. - *More than one fix poems* It is not efficient to use fix poems more than once. @@ -557,21 +450,12 @@ Doc page with :doc:`ERROR messages ` *Pair COMB charge %.10f with force %.10f hit min barrier* Something is possibly wrong with your model. -*Pair brownian needs newton pair on for momentum conservation* - Self-explanatory. - -*Pair dpd needs newton pair on for momentum conservation* - Self-explanatory. - *Pair dsmc: num_of_collisions > number_of_A* Collision model in DSMC is breaking down. *Pair dsmc: num_of_collisions > number_of_B* Collision model in DSMC is breaking down. -*Pair style in data file differs from currently defined pair style* - Self-explanatory. - *Pair style restartinfo set but has no restart support* This pair style has a bug, where it does not support reading and writing information to a restart file, but does not set the member @@ -681,9 +565,6 @@ Doc page with :doc:`ERROR messages ` cluster specified by the fix shake command is numerically suspect. LAMMPS will set it to 0.0 and continue. -*Shell command '%s' failed with error '%s'* - Self-explanatory. - *Shell command returned with non-zero status* This may indicate the shell command did not operate as expected. @@ -694,15 +575,9 @@ Doc page with :doc:`ERROR messages ` This will lead to invalid constraint forces in the SHAKE/RATTLE computation. -*Simulations might be very slow because of large number of structure factors* - Self-explanatory. - *Slab correction not needed for MSM* Slab correction is intended to be used with Ewald or PPPM and is not needed by MSM. -*Specifying an 'subset' value of '0' is equivalent to no 'subset' keyword* - Self-explanatory. - *System is not charge neutral, net charge = %g* The total charge on all atoms on the system is not 0.0. For some KSpace solvers this is only a warning. @@ -734,9 +609,6 @@ Doc page with :doc:`ERROR messages ` assumed to also be for all atoms. Thus the pressure printed by thermo could be inaccurate. -*The fix ave/spatial command has been replaced by the more flexible fix ave/chunk and compute chunk/atom commands -- fix ave/spatial will be removed in the summer of 2015* - Self-explanatory. - *The minimizer does not re-orient dipoles when using fix efield* This means that only the atom coordinates will be minimized, not the orientation of the dipoles. @@ -745,9 +617,6 @@ Doc page with :doc:`ERROR messages ` More than the maximum # of neighbors was found multiple times. This was unexpected. -*Too many inner timesteps in fix ttm* - Self-explanatory. - *Too many neighbors in CNA for %d atoms* More than the maximum # of neighbors was found multiple times. This was unexpected. @@ -775,24 +644,6 @@ Doc page with :doc:`ERROR messages ` The deformation will heat the SRD particles so this can be dangerous. -*Using kspace solver on system with no charge* - Self-explanatory. - -*Using largest cut-off for lj/long/dipole/long long long* - Self-explanatory. - -*Using largest cutoff for buck/long/coul/long* - Self-explanatory. - -*Using largest cutoff for lj/long/coul/long* - Self-explanatory. - -*Using largest cutoff for pair_style lj/long/tip4p/long* - Self-explanatory. - -*Using package gpu without any pair style defined* - Self-explanatory. - *Using pair potential shift with pair_modify compute no* The shift effects will thus not be computed. diff --git a/doc/src/Howto.rst b/doc/src/Howto.rst index df42f6bd9d..ec90472c27 100644 --- a/doc/src/Howto.rst +++ b/doc/src/Howto.rst @@ -40,6 +40,7 @@ Settings howto Howto_walls Howto_nemd Howto_dispersion + Howto_bulk2slab Analysis howto ============== diff --git a/doc/src/Howto_bulk2slab.rst b/doc/src/Howto_bulk2slab.rst new file mode 100644 index 0000000000..2c26961522 --- /dev/null +++ b/doc/src/Howto_bulk2slab.rst @@ -0,0 +1,160 @@ +=========================== +Convert bulk system to slab +=========================== + +A regularly encountered simulation problem is how to convert a bulk +system that has been run for a while to equilibrate into a slab system +with some vacuum space and free surfaces. The challenge here is that +one cannot just change the box dimensions with the :doc:`change_box +command ` or edit the box boundaries in a data file because +some atoms will have non-zero image flags from diffusing around. + +Changing the box dimensions results in an undesired displacement of +those atoms, since the image flags indicate how many times the box +length in x-, y-, or z-direction needs to be added or subtracted to get +the "unwrapped" coordinates. By changing the box dimension this +distance is changed and thus those atoms move unphysically relative to +their neighbors with zero image flags. Setting image flags forcibly to +zero creates problems because that could break apart molecules by having +one atom of a bond on the top of the system and the other at the bottom. + +.. _bulk2slab: +.. figure:: JPG/rhodo-both.jpg + :figwidth: 80% + :figclass: align-center + + Snapshots of the bulk Rhodopsin in lipid layer and water system (right) + and the generated slab geometry (left) + +.. admonition:: Disclaimer + :class: note + + The following workflow will work for many bulk systems, but not all. + Some systems cannot be converted (e.g. polymers with bonds to the + same molecule across periodic boundaries, sometimes called "infinite + polymers"). The amount of vacuum that needs to be added depends on + the length of the molecules where the system is split (the example + here splits where there is water with short molecules). In some + cases, the system may need to be re-centered in the box first using + the :doc:`displace_atoms command `. Also, the time + spent on strong thermalization and equilibration will depend on the + specific system and its thermodynamic conditions. + +Below is a suggested workflow using the :doc:`Rhodopsin benchmark input +` for demonstration. The figure shows the state *before* +the procedure on the left (with unwrapped atoms that have diffused out +of the box) and *after* on the right (with the vacuum added above and +below). The procedure is implemented by modifying a copy of the +``in.rhodo`` input file. The first lines up to and including the +:doc:`read_data command ` remain unchanged. Then we insert +the following lines to add vacuum to the z direction above and below the +system: + +.. code-block:: LAMMPS + + variable delta index 10.0 + reset_atoms image all + write_dump all custom rhodo-unwrap.lammpstrj id xu yu zu + change_box all z final $(zlo-2.0*v_delta) $(zhi+2.0*v_delta) & + boundary p p f + read_dump rhodo-unwrap.lammpstrj 0 x y z box no replace yes + kspace_modify slab 3.0 + +Specifically, the :doc:`variable delta ` (set to 10.0) +represents a distance that determines the amount of vacuum added: we add +twice its value in each direction to the z-dimension; thus in total +:math:`40 \AA` get added. The :doc:`reset_atoms image all +` command shall reset any image flags to become either 0 or +:math:`\pm 1` and thus have the minimum distance from the center of the +simulation box, but the correct relative distance for bonded atoms. + +The :doc:`write_dump command ` then writes out the resulting +*unwrapped* coordinates of the system. After expanding the box, +coordinates that were outside the box should now be inside and the +unwrapped coordinates will become "wrapped", while atoms outside the +periodic boundaries will be wrapped back into the box and their image +flags in those directions restored. + +The :doc:`change_box command ` adds the desired +distance to the low and high box boundary in z-direction and then changes +the :doc:`boundary to "p p f" ` which will force the image +flags in z-direction to zero and create an undesired displacement for +the atoms with non-zero image flags. + +With the :doc:`read_dump command ` we read back and replace +partially incorrect coordinates with the previously saved, unwrapped +coordinates. It is important to ignore the box dimensions stored in the +dump file. We want to preserve the expanded box. Finally, we turn on +the slab correction for the PPPM long-range solver with the +:doc:`kspace_modify command ` as required when using a +long range Coulomb solver for non-periodic z-dimension. + +Next we replace the :doc:`fix npt command ` with: + +.. code-block:: LAMMPS + + fix 2 nvt temp 300.0 300.0 10.0 + +We now have an open system and thus the adjustment of the cell in +z-direction is no longer required. Since splitting the bulk water +region where the vacuum is inserted, creates surface atoms with high +potential energy, we reduce the thermostat time constant from 100.0 to +10.0 to remove excess kinetic energy resulting from that change faster. + +Also the high potential energy of the surface atoms can cause that some +of them are ejected from the slab. In order to suppress that, we add +soft harmonic walls to push back any atoms that want to leave the slab. +To determine the position of the wall, we first need to to determine the +extent of the atoms in z-direction and then place the harmonic walls +based on that information: + +.. code-block:: LAMMPS + + compute zmin all reduce min z + compute zmax all reduce max z + thermo_style custom zlo c_zmin zhi c_zmax + run 0 post no + fix 3 all wall/harmonic zhi $(c_zmax+v_delta) 10.0 0.0 ${delta} & + zlo $(c_zmin-v_delta) 10.0 0.0 ${delta} + +The two :doc:`compute reduce ` command determine the +minimum and maximum z-coordinate across all atoms. In order to trigger +the execution of the compute commands we need to "consume" them. This +is done with the :doc:`thermo_style custom ` command +followed by the :doc:`run 0 ` command. This avoids and error +accessing the min/max values determined by the compute commands to +compute the location of the wall in lower and upper direction. This +uses the previously defined *delta* variable to determine the distance +of the wall from the extent of the system and the cutoff for the wall +interaction. This way only atoms that move beyond the min/max values in +z-direction will experience a restoring force, nudging them back to the +slab. The force constant of :math:`10.0 \frac{\mathrm{kcal/mol}}{\AA}` +was determined empirically. + +Adding these "restoring" soft walls assist in making the free surfaces +above and below the slab flat, instead of having rugged or ondulated +surfaces. The impact of the walls can be changed by adjusting the force +constant, cutoff, and position of the wall. + +Finally, we replace the :doc:`run 100 ` of the original input with: + +.. code-block:: LAMMPS + + run 1000 post no + + unfix 3 + fix 2 all nvt temp 300.0 300.0 100.0 + run 1000 post no + + write_data data.rhodo-slab + +This runs the system converted to a slab first for 1000 MD steps using +the walls and stronger Nose-Hoover thermostat. Then the walls are +removed with :doc:`unfix 3 ` and the thermostat time constant +reset to 100.0 and the system run for another 1000 steps. Finally the +resulting slab geometry is written to a new data file +``data.rhodo-slab`` with a :doc:`write_data command `. The +number of MD steps required to reach a proper equilibrium state is very +likely larger. The number of 1000 steps (corresponding to 2 +picoseconds) was chosen for demonstration purposes, so that the +procedure can be easily and quickly tested. diff --git a/doc/src/JPG/rhodo-both.jpg b/doc/src/JPG/rhodo-both.jpg new file mode 100644 index 0000000000..47cc863d8f Binary files /dev/null and b/doc/src/JPG/rhodo-both.jpg differ diff --git a/doc/src/compute_chunk_atom.rst b/doc/src/compute_chunk_atom.rst index 9bca1e26d1..24c2e2e47c 100644 --- a/doc/src/compute_chunk_atom.rst +++ b/doc/src/compute_chunk_atom.rst @@ -217,13 +217,16 @@ scaled differently in the two different dimensions to transform them into ellipses). The created bins (and hence the chunk IDs) are numbered consecutively -from 1 to the number of bins = *Nchunk*\ . For *bin2d* and *bin3d*, the -numbering varies most rapidly in the first dimension (which could be -*x*, *y*, or *z*), next rapidly in the second dimension, and most slowly in the -third dimension. For *bin/sphere*, the bin with smallest radii is chunk -1 and the bin with largest radii is chunk Nchunk = *ncbin*\ . For -*bin/cylinder*, the numbering varies most rapidly in the dimension -along the cylinder axis and most slowly in the radial direction. +from 1 to the number of bins = *Nchunk*\ . For *bin2d* and *bin3d*, the +numbering varies fastest in the last dimension (which could be +*x*, *y*, or *z*), slower in the second dimension, and slowest in the +first dimension. For *bin/sphere*, the bin with smallest radius is chunk +1 and the bin with largest radius is chunk Nchunk = *ncbin*\ . For +*bin/cylinder*, the numbering varies faster in the dimension +along the cylinder axis and slower in the radial direction. +In all cases, for a given dimension, the numbering increases +with increasing value of the coordinate (Cartesian coordinate, +sphere or cylinder radius, axial position). Each time this compute is invoked, each atom is mapped to a bin based on its current position. Note that between reneighboring timesteps, diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 9cf54f5c7e..92c44be458 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -2782,6 +2782,7 @@ omegaz Omelyan omp OMP +ondulated oneAPI onebody onelevel diff --git a/src/ADIOS/dump_custom_adios.cpp b/src/ADIOS/dump_custom_adios.cpp index 4c38a0513b..060a5493f2 100644 --- a/src/ADIOS/dump_custom_adios.cpp +++ b/src/ADIOS/dump_custom_adios.cpp @@ -273,8 +273,8 @@ void DumpCustomADIOS::init_style() fix[i] = modify->get_fix_by_id(id_fix[i]); if (!fix[i]) error->all(FLERR, "Could not find dump custom/adios fix ID {}", id_fix[i]); if (nevery % fix[i]->peratom_freq) - error->all(FLERR, "dump custom/adios and fix {} with ID {} not computed at compatible times", - fix[i]->style, id_fix[i]); + error->all(FLERR, Error::NOLASTLINE, "dump custom/adios and fix {} with ID {} not " + "computed at compatible times{}", fix[i]->style, id_fix[i], utils::errorurl(7)); } int ivariable; diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index a9db2a21ca..aa0a04954f 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -13,15 +13,17 @@ ------------------------------------------------------------------------- */ #include "pair_line_lj.h" -#include + #include "atom.h" #include "atom_vec_line.h" -#include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "memory.h" #include "error.h" +#include "force.h" +#include "info.h" +#include "memory.h" +#include "neigh_list.h" +#include "neighbor.h" +#include using namespace LAMMPS_NS; @@ -414,7 +416,9 @@ void PairLineLJ::init_style() double PairLineLJ::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutsubsq[i][j] = cutsub[i][j] * cutsub[i][j]; diff --git a/src/BOCS/fix_bocs.cpp b/src/BOCS/fix_bocs.cpp index 0c4d6a41ad..80c6789575 100644 --- a/src/BOCS/fix_bocs.cpp +++ b/src/BOCS/fix_bocs.cpp @@ -1089,7 +1089,7 @@ void FixBocs::couple() } if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); // switch order from xy-xz-yz to Voigt @@ -1099,7 +1099,7 @@ void FixBocs::couple() p_current[5] = tensor[3]; if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); } } diff --git a/src/BPM/bond_bpm_spring_plastic.cpp b/src/BPM/bond_bpm_spring_plastic.cpp index 5f22fb41b8..7059449f3b 100644 --- a/src/BPM/bond_bpm_spring_plastic.cpp +++ b/src/BPM/bond_bpm_spring_plastic.cpp @@ -296,7 +296,7 @@ void BondBPMSpringPlastic::allocate() void BondBPMSpringPlastic::coeff(int narg, char **arg) { if (narg != 5) - error->all(FLERR, "Incorrect args for bond coefficients"); + error->all(FLERR, "Incorrect args for bond coefficients" + utils::errorurl(21)); if (!allocated) allocate(); int ilo, ihi; @@ -319,7 +319,7 @@ void BondBPMSpringPlastic::coeff(int narg, char **arg) if (1.0 + ecrit[i] > max_stretch) max_stretch = 1.0 + ecrit[i]; } - if (count == 0) error->all(FLERR, "Incorrect args for bond coefficients"); + if (count == 0) error->all(FLERR, "Incorrect args for bond coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index 0a24c44bd6..e5b0c5abb1 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -306,10 +306,10 @@ void PPPMDielectric::qsum_qsq(int warning_flag) // so issue warning or error if (fabs(qsum) > SMALL) { - std::string message = fmt::format("System is not charge neutral, net " - "charge = {:.8}",qsum); - if (!warn_nonneutral) error->all(FLERR,message + utils::errorurl(29)); - if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message + utils::errorurl(29)); + std::string message = fmt::format("System is not charge neutral, net charge = {:.8}{}", + qsum, utils::errorurl(29)); + if (!warn_nonneutral) error->all(FLERR,message); + if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message); warn_nonneutral = 2; } } diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index 252a9386e3..052b617351 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -580,10 +580,10 @@ void PPPMDispDielectric::qsum_qsq(int warning_flag) // so issue warning or error if (fabs(qsum) > SMALL) { - std::string message = fmt::format("System is not charge neutral, net " - "charge = {:.8}",qsum); - if (!warn_nonneutral) error->all(FLERR,message + utils::errorurl(29)); - if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message + utils::errorurl(29)); + std::string message = fmt::format("System is not charge neutral, net charge = {:.8}{}", + qsum, utils::errorurl(29)); + if (!warn_nonneutral) error->all(FLERR,message); + if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message); warn_nonneutral = 2; } } diff --git a/src/DPD-BASIC/pair_dpd.cpp b/src/DPD-BASIC/pair_dpd.cpp index 8fa2b1913c..1c8ee883a1 100644 --- a/src/DPD-BASIC/pair_dpd.cpp +++ b/src/DPD-BASIC/pair_dpd.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -278,7 +279,9 @@ void PairDPD::init_style() double PairDPD::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); sigma[i][j] = sqrt(2.0*force->boltz*temperature*gamma[i][j]); diff --git a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp index 40730036de..fdf2d29e7e 100644 --- a/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp +++ b/src/DPD-BASIC/pair_dpd_coul_slater_long.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -353,7 +354,9 @@ void PairDPDCoulSlaterLong::init_style() double PairDPDCoulSlaterLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); sigma[i][j] = sqrt(2.0*force->boltz*temperature*gamma[i][j]); diff --git a/src/DPD-BASIC/pair_dpd_ext.cpp b/src/DPD-BASIC/pair_dpd_ext.cpp index 6c10df7419..3321686b07 100644 --- a/src/DPD-BASIC/pair_dpd_ext.cpp +++ b/src/DPD-BASIC/pair_dpd_ext.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -337,7 +338,9 @@ void PairDPDExt::init_style() double PairDPDExt::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); sigma[i][j] = sqrt(2.0*force->boltz*temperature*gamma[i][j]); sigmaT[i][j] = sqrt(2.0*force->boltz*temperature*gammaT[i][j]); diff --git a/src/DPD-MESO/pair_edpd.cpp b/src/DPD-MESO/pair_edpd.cpp index 84c1f92534..3e08de6319 100644 --- a/src/DPD-MESO/pair_edpd.cpp +++ b/src/DPD-MESO/pair_edpd.cpp @@ -24,6 +24,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -387,7 +388,9 @@ void PairEDPD::init_style() double PairEDPD::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; cutT[j][i] = cutT[i][j]; diff --git a/src/DPD-MESO/pair_mdpd.cpp b/src/DPD-MESO/pair_mdpd.cpp index dbc78101ac..3e78804093 100644 --- a/src/DPD-MESO/pair_mdpd.cpp +++ b/src/DPD-MESO/pair_mdpd.cpp @@ -24,6 +24,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -243,7 +244,7 @@ void PairMDPD::settings(int narg, char **arg) void PairMDPD::coeff(int narg, char **arg) { - if (narg != 7 ) error->all(FLERR,"Incorrect args for pair coefficients\n itype jtype A B gamma cutA cutB"); + if (narg != 7 ) error->all(FLERR,"Incorrect args for pair coefficients" + utils::errorurl(21)); if (!allocated) allocate(); int ilo,ihi,jlo,jhi; @@ -256,7 +257,7 @@ void PairMDPD::coeff(int narg, char **arg) double cut_one = utils::numeric(FLERR,arg[5],false,lmp); double cut_two = utils::numeric(FLERR,arg[6],false,lmp); - if (cut_one < cut_two) error->all(FLERR,"Incorrect args for pair coefficients\n cutA should be larger than cutB."); + if (cut_one < cut_two) error->all(FLERR, "Value for cutA should be larger than cutB."); int count = 0; for (int i = ilo; i <= ihi; i++) { @@ -300,7 +301,9 @@ void PairMDPD::init_style() double PairMDPD::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); sigma[i][j] = sqrt(2.0*force->boltz*temperature*gamma[i][j]); diff --git a/src/DPD-MESO/pair_mdpd_rhosum.cpp b/src/DPD-MESO/pair_mdpd_rhosum.cpp index 0e25b16352..ae96867c4a 100644 --- a/src/DPD-MESO/pair_mdpd_rhosum.cpp +++ b/src/DPD-MESO/pair_mdpd_rhosum.cpp @@ -25,6 +25,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -63,7 +64,7 @@ PairMDPDRhoSum::~PairMDPDRhoSum() { void PairMDPDRhoSum::init_style() { if (!atom->rho_flag) - error->all(FLERR,"Pair style mdpd/rhosum requires atom attribute rho"); + error->all(FLERR, Error::NOLASTLINE, "Pair style mdpd/rhosum requires atom attribute rho"); // need a full neighbor list neighbor->add_request(this, NeighConst::REQ_FULL); @@ -218,9 +219,9 @@ void PairMDPDRhoSum::coeff(int narg, char **arg) { ------------------------------------------------------------------------- */ double PairMDPDRhoSum::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair mdpd/rhosum coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, "All pair mdpd/rhosum coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/DPD-MESO/pair_tdpd.cpp b/src/DPD-MESO/pair_tdpd.cpp index cd74c2f501..c4a60a0d16 100644 --- a/src/DPD-MESO/pair_tdpd.cpp +++ b/src/DPD-MESO/pair_tdpd.cpp @@ -24,6 +24,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -340,7 +341,9 @@ void PairTDPD::init_style() double PairTDPD::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); sigma[i][j] = sqrt(2.0*force->boltz*temperature*gamma[i][j]); diff --git a/src/DPD-REACT/pair_dpd_fdt.cpp b/src/DPD-REACT/pair_dpd_fdt.cpp index 24b54cf69d..326130ace3 100644 --- a/src/DPD-REACT/pair_dpd_fdt.cpp +++ b/src/DPD-REACT/pair_dpd_fdt.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "fix.h" #include "force.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -332,7 +333,9 @@ void PairDPDfdt::init_style() double PairDPDfdt::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; a0[j][i] = a0[i][j]; diff --git a/src/DPD-REACT/pair_dpd_fdt_energy.cpp b/src/DPD-REACT/pair_dpd_fdt_energy.cpp index 3bb6d57ec3..1bbcd8bba0 100644 --- a/src/DPD-REACT/pair_dpd_fdt_energy.cpp +++ b/src/DPD-REACT/pair_dpd_fdt_energy.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "fix.h" #include "force.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -430,7 +431,9 @@ void PairDPDfdtEnergy::init_style() double PairDPDfdtEnergy::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; a0[j][i] = a0[i][j]; diff --git a/src/DPD-REACT/pair_exp6_rx.cpp b/src/DPD-REACT/pair_exp6_rx.cpp index d914b0592d..b898eae4ec 100644 --- a/src/DPD-REACT/pair_exp6_rx.cpp +++ b/src/DPD-REACT/pair_exp6_rx.cpp @@ -19,6 +19,7 @@ #include "error.h" #include "fix.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "modify.h" @@ -695,7 +696,9 @@ void PairExp6rx::coeff(int narg, char **arg) double PairExp6rx::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); return cut[i][j]; } diff --git a/src/DPD-REACT/pair_multi_lucy.cpp b/src/DPD-REACT/pair_multi_lucy.cpp index cb9ab92694..3efa7f46ac 100644 --- a/src/DPD-REACT/pair_multi_lucy.cpp +++ b/src/DPD-REACT/pair_multi_lucy.cpp @@ -29,6 +29,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -327,7 +328,9 @@ void PairMultiLucy::coeff(int narg, char **arg) double PairMultiLucy::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); tabindex[j][i] = tabindex[i][j]; diff --git a/src/DPD-REACT/pair_multi_lucy_rx.cpp b/src/DPD-REACT/pair_multi_lucy_rx.cpp index 178b5c3b85..a6f0850b0b 100644 --- a/src/DPD-REACT/pair_multi_lucy_rx.cpp +++ b/src/DPD-REACT/pair_multi_lucy_rx.cpp @@ -30,6 +30,7 @@ #include "error.h" #include "fix.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "modify.h" @@ -461,7 +462,9 @@ void PairMultiLucyRX::coeff(int narg, char **arg) double PairMultiLucyRX::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); tabindex[j][i] = tabindex[i][j]; diff --git a/src/DRUDE/fix_tgnh_drude.cpp b/src/DRUDE/fix_tgnh_drude.cpp index 503cac604a..fa6dbb62fd 100644 --- a/src/DRUDE/fix_tgnh_drude.cpp +++ b/src/DRUDE/fix_tgnh_drude.cpp @@ -1063,7 +1063,7 @@ void FixTGNHDrude::couple() } if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); // switch order from xy-xz-yz to Voigt @@ -1073,7 +1073,7 @@ void FixTGNHDrude::couple() p_current[5] = tensor[3]; if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); } } diff --git a/src/EXTRA-COMPUTE/compute_slcsa_atom.cpp b/src/EXTRA-COMPUTE/compute_slcsa_atom.cpp index e0b34b8ff1..7ca13cc77a 100644 --- a/src/EXTRA-COMPUTE/compute_slcsa_atom.cpp +++ b/src/EXTRA-COMPUTE/compute_slcsa_atom.cpp @@ -81,12 +81,12 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : int twojmax = utils::inumeric(FLERR, arg[3], false, lmp); if (twojmax < 0) - error->all(FLERR, "Illegal compute slcsa/atom command: twojmax must be a non-negative integer"); + error->all(FLERR, 3, "Illegal compute slcsa/atom command: twojmax must be >= 0"); ncomps = compute_ncomps(twojmax); nclasses = utils::inumeric(FLERR, arg[4], false, lmp); if (nclasses < 2) - error->all(FLERR, "Illegal compute slcsa/atom command: nclasses must be greater than 1"); + error->all(FLERR, 4, "Illegal compute slcsa/atom command: nclasses must be greater than 1"); database_mean_descriptor_file = arg[5]; lda_scalings_file = arg[6]; @@ -116,11 +116,12 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : val.which = argi.get_type(); val.argindex = argi.get_index1(); val.id = argi.get_name(); + if ((val.which == ArgInfo::FIX) || (val.which == ArgInfo::VARIABLE) || (val.which == ArgInfo::UNKNOWN) || (val.which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR, "Invalid compute slcsa/atom argument: {}", arg[0]); + error->all(FLERR, 10, "Invalid compute slcsa/atom argument: {}", arg[0]); - // if wildcard expansion occurred, free earg memory from exapnd_args() + // if wildcard expansion occurred, free earg memory from expand_args() if (expand) { for (int i = 0; i < nvalues; i++) delete[] earg[i]; @@ -128,15 +129,19 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : } val.val.c = modify->get_compute_by_id(val.id); - if (!val.val.c) error->all(FLERR, "Compute ID {} for fix slcsa/atom does not exist", val.id); + if (!val.val.c) error->all(FLERR, 10, "Compute ID {} for fix slcsa/atom does not exist", val.id); if (val.val.c->peratom_flag == 0) - error->all(FLERR, "Compute slcsa/atom compute {} does not calculate per-atom values", val.id); + error->all(FLERR, 10, "Compute slcsa/atom compute {} does not calculate per-atom values", + val.id); if (val.argindex == 0 && val.val.c->size_peratom_cols != 0) - error->all(FLERR, "Compute slcsa/atom compute {} does not calculate a per-atom vector", val.id); + error->all(FLERR, 10, "Compute slcsa/atom compute {} does not calculate a per-atom vector", + val.id); if (val.argindex && val.val.c->size_peratom_cols == 0) - error->all(FLERR, "Compute slcsa/atom compute {} does not calculate a per-atom array", val.id); + error->all(FLERR, 10, "Compute slcsa/atom compute {} does not calculate a per-atom array", + val.id); if (val.argindex && val.argindex > val.val.c->size_peratom_cols) - error->all(FLERR, "Compute slcsa/atom compute {} array is accessed out-of-range", val.id); + error->all(FLERR, 10, "Compute slcsa/atom compute {} array is accessed out-of-range{}", val.id, + utils::errorurl(20)); descriptorval = val; memory->create(database_mean_descriptor, ncomps, "slcsa/atom:database_mean_descriptor"); memory->create(lda_scalings, ncomps, nclasses - 1, "slcsa/atom:lda_scalings"); @@ -150,7 +155,7 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : if (comm->me == 0) { if (strcmp(database_mean_descriptor_file, "NULL") == 0) { - error->one(FLERR, + error->one(FLERR, Error::NOLASTLINE, "Cannot open database mean descriptor file {}: ", database_mean_descriptor_file, utils::getsyserror()); } else { @@ -165,8 +170,8 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : } if (strcmp(lda_scalings_file, "NULL") == 0) { - error->one(FLERR, "Cannot open database linear discriminant analysis scalings file {}: ", - lda_scalings_file, utils::getsyserror()); + error->one(FLERR, Error::NOLASTLINE, "Cannot open database linear discriminant analysis " + "scalings file {}: ", lda_scalings_file, utils::getsyserror()); } else { PotentialFileReader reader(lmp, lda_scalings_file, "lda scalings file"); int nread = 0; @@ -180,8 +185,8 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : } if (strcmp(lr_decision_file, "NULL") == 0) { - error->one(FLERR, "Cannot open logistic regression decision file {}: ", lr_decision_file, - utils::getsyserror()); + error->one(FLERR, Error::NOLASTLINE, "Cannot open logistic regression decision file {}: ", + lr_decision_file, utils::getsyserror()); } else { PotentialFileReader reader(lmp, lr_decision_file, "lr decision file"); int nread = 0; @@ -195,8 +200,8 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : } if (strcmp(lr_bias_file, "NULL") == 0) { - error->one(FLERR, "Cannot open logistic regression bias file {}: ", lr_bias_file, - utils::getsyserror()); + error->one(FLERR, Error::NOLASTLINE, "Cannot open logistic regression bias file {}: ", + lr_bias_file, utils::getsyserror()); } else { PotentialFileReader reader(lmp, lr_bias_file, "lr bias file"); auto values = reader.next_values(nclasses); @@ -207,7 +212,8 @@ ComputeSLCSAAtom::ComputeSLCSAAtom(LAMMPS *lmp, int narg, char **arg) : } if (strcmp(maha_file, "NULL") == 0) { - error->one(FLERR, "Cannot open mahalanobis stats file {}: ", maha_file, utils::getsyserror()); + error->one(FLERR, Error::NOLASTLINE, "Cannot open mahalanobis stats file {}: ", maha_file, + utils::getsyserror()); } else { PotentialFileReader reader(lmp, maha_file, "mahalanobis stats file"); int nvalues = nclasses * ((nclasses - 1) * (nclasses - 1) + nclasses); diff --git a/src/EXTRA-FIX/fix_ave_correlate_long.cpp b/src/EXTRA-FIX/fix_ave_correlate_long.cpp index 4b4ba462b1..e3ee7b2c34 100644 --- a/src/EXTRA-FIX/fix_ave_correlate_long.cpp +++ b/src/EXTRA-FIX/fix_ave_correlate_long.cpp @@ -225,8 +225,8 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS *lmp, int narg, char **arg) : "Fix ave/correlate/long compute {} does not calculate a vector", val.id); if (val.argindex && val.argindex > val.val.c->size_vector) error->all(FLERR, val.iarg, - "Fix ave/correlate/long compute {} vector is accessed out-of-range", - val.id); + "Fix ave/correlate/long compute {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); @@ -241,11 +241,12 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS *lmp, int narg, char **arg) : "Fix ave/correlate/long fix {} does not calculate a vector", val.id); if (val.argindex && val.argindex > val.val.f->size_vector) error->all(FLERR, val.iarg, - "Fix ave/correlate/long fix {} vector is accessed out-of-range", val.id); + "Fix ave/correlate/long fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) error->all(FLERR, val.iarg, - "Fix {} for fix ave/correlate/long not computed at compatible time", - val.id); + "Fix {} for fix ave/correlate/long not computed at compatible time{}", + val.id, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); @@ -257,8 +258,7 @@ FixAveCorrelateLong::FixAveCorrelateLong(LAMMPS *lmp, int narg, char **arg) : "Fix ave/correlate/long variable {} is not equal-style variable", val.id); if (val.argindex && input->variable->vectorstyle(val.val.v) == 0) error->all(FLERR, val.iarg, - "Fix ave/correlate/long variable {} is not vector-style variable", - val.id); + "Fix ave/correlate/long variable {} is not vector-style variable", val.id); } } diff --git a/src/EXTRA-FIX/fix_controller.cpp b/src/EXTRA-FIX/fix_controller.cpp index d7989c79d7..90ebed801d 100644 --- a/src/EXTRA-FIX/fix_controller.cpp +++ b/src/EXTRA-FIX/fix_controller.cpp @@ -39,7 +39,7 @@ FixController::FixController(LAMMPS *lmp, int narg, char **arg) : extvector = 0; nevery = utils::inumeric(FLERR,arg[3],false,lmp); - if (nevery <= 0) error->all(FLERR,"Illegal fix controller command"); + if (nevery <= 0) error->all(FLERR, 3, "Illegal fix controller nevery value {}", nevery); alpha = utils::numeric(FLERR,arg[4],false,lmp); kp = utils::numeric(FLERR,arg[5],false,lmp); @@ -52,7 +52,7 @@ FixController::FixController(LAMMPS *lmp, int narg, char **arg) : if ((argi.get_type() == ArgInfo::UNKNOWN) || (argi.get_type() == ArgInfo::NONE) || (argi.get_dim() != 0)) - error->all(FLERR,"Illegal fix controller command"); + error->all(FLERR,8,"Illegal fix controller argument {}", arg[8]); pvwhich = argi.get_type(); pvindex = argi.get_index1(); @@ -60,48 +60,51 @@ FixController::FixController(LAMMPS *lmp, int narg, char **arg) : // setpoint arg - int iarg=9; - setpoint = utils::numeric(FLERR,arg[iarg],false,lmp); - iarg++; + setpoint = utils::numeric(FLERR,arg[9],false,lmp); // control variable arg - cvID = utils::strdup(arg[iarg]); + cvID = utils::strdup(arg[10]); // error check if (pvwhich == ArgInfo::COMPUTE) { Compute *c = modify->get_compute_by_id(pvID); - if (!c) error->all(FLERR,"Compute ID {} for fix controller does not exist", pvID); + if (!c) error->all(FLERR, 8, "Compute ID {} for fix controller does not exist", pvID); int flag = 0; if (c->scalar_flag && pvindex == 0) flag = 1; else if (c->vector_flag && pvindex > 0) flag = 1; if (!flag) - error->all(FLERR,"Fix controller compute does not calculate a global scalar or vector"); + error->all(FLERR, 8, "Fix controller compute {} does not calculate a global scalar or " + "vector", pvID); if (pvindex && pvindex > c->size_vector) - error->all(FLERR,"Fix controller compute vector is accessed out-of-range"); + error->all(FLERR, 8, "Fix controller compute {} vector is accessed out-of-range{}", + pvID, utils::errorurl(20)); } else if (pvwhich == ArgInfo::FIX) { Fix *f = modify->get_fix_by_id(pvID); - if (!f) error->all(FLERR,"Fix ID {} for fix controller does not exist", pvID); + if (!f) error->all(FLERR, 8, "Fix ID {} for fix controller does not exist", pvID); int flag = 0; if (f->scalar_flag && pvindex == 0) flag = 1; else if (f->vector_flag && pvindex > 0) flag = 1; - if (!flag) error->all(FLERR,"Fix controller fix does not calculate a global scalar or vector"); + if (!flag) + error->all(FLERR, 8, "Fix controller fix {} does not calculate a global scalar or vector", + pvID); if (pvindex && pvindex > f->size_vector) - error->all(FLERR,"Fix controller fix vector is accessed out-of-range"); + error->all(FLERR, 8, "Fix controller fix {} vector is accessed out-of-range{}", pvID, + utils::errorurl(20)); } else if (pvwhich == ArgInfo::VARIABLE) { int ivariable = input->variable->find(pvID); if (ivariable < 0) - error->all(FLERR,"Variable name for fix controller does not exist"); + error->all(FLERR, 8, "Variable name {} for fix controller does not exist", pvID); if (input->variable->equalstyle(ivariable) == 0) - error->all(FLERR,"Fix controller variable is not equal-style variable"); + error->all(FLERR, 8, "Fix controller variable {} is not equal-style variable", pvID); } int ivariable = input->variable->find(cvID); if (ivariable < 0) - error->all(FLERR,"Variable name for fix controller does not exist"); + error->all(FLERR, 10, "Variable name {} for fix controller does not exist", cvID); if (input->variable->internalstyle(ivariable) == 0) - error->all(FLERR,"Fix controller variable is not internal-style variable"); + error->all(FLERR, 10, "Fix controller variable {} is not internal-style variable", cvID); control = input->variable->compute_equal(ivariable); firsttime = 1; @@ -130,19 +133,26 @@ void FixController::init() { if (pvwhich == ArgInfo::COMPUTE) { pcompute = modify->get_compute_by_id(pvID); - if (!pcompute) error->all(FLERR,"Compute ID {} for fix controller does not exist", pvID); + if (!pcompute) + error->all(FLERR, Error::NOLASTLINE, + "Compute ID {} for fix controller does not exist", pvID); } else if (pvwhich == ArgInfo::FIX) { pfix = modify->get_fix_by_id(pvID); - if (!pfix) error->all(FLERR,"Fix ID {} for fix controller does not exist", pvID); + if (!pfix) + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for fix controller does not exist", pvID); } else if (pvwhich == ArgInfo::VARIABLE) { pvar = input->variable->find(pvID); - if (pvar < 0) error->all(FLERR,"Variable name for fix controller does not exist"); + if (pvar < 0) + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for fix controller does not exist", + pvID); } cvar = input->variable->find(cvID); - if (cvar < 0) error->all(FLERR,"Variable name for fix controller does not exist"); + if (cvar < 0) + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for fix controller does not exist", + cvID); // set sampling time diff --git a/src/EXTRA-FIX/fix_npt_cauchy.cpp b/src/EXTRA-FIX/fix_npt_cauchy.cpp index e94177233f..bb5d863e5d 100644 --- a/src/EXTRA-FIX/fix_npt_cauchy.cpp +++ b/src/EXTRA-FIX/fix_npt_cauchy.cpp @@ -1036,7 +1036,7 @@ void FixNPTCauchy::couple() } if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); // switch order from xy-xz-yz to Voigt @@ -1046,7 +1046,7 @@ void FixNPTCauchy::couple() p_current[5] = tensor[3]; if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) - error->all(FLERR,"Non-numeric pressure - simulation unstable"); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); } } diff --git a/src/EXTRA-MOLECULE/improper_cossq.cpp b/src/EXTRA-MOLECULE/improper_cossq.cpp index bcf9715990..5d7a425217 100644 --- a/src/EXTRA-MOLECULE/improper_cossq.cpp +++ b/src/EXTRA-MOLECULE/improper_cossq.cpp @@ -249,28 +249,29 @@ void ImproperCossq::allocate() void ImproperCossq::coeff(int narg, char **arg) { - /* Check whether there exist sufficient number of arguments. - 0: type of improper to be applied to - 1: energetic constant - 2: equilibrium angle in degrees */ - if (narg != 3) error->all(FLERR,"Incorrect args for cossq improper coefficients"); - if (!allocated) allocate(); + /* Check whether there exist sufficient number of arguments. + 0: type of improper to be applied to + 1: energetic constant + 2: equilibrium angle in degrees */ + if (narg != 3) error->all(FLERR,"Incorrect args for improper coefficients" + utils::errorurl(21)); + if (!allocated) allocate(); - int ilo,ihi; - utils::bounds(FLERR,arg[0],1,atom->nimpropertypes,ilo,ihi,error); + int ilo,ihi; + utils::bounds(FLERR,arg[0],1,atom->nimpropertypes,ilo,ihi,error); - double k_one = utils::numeric(FLERR,arg[1],false,lmp); - double chi_one = utils::numeric(FLERR,arg[2],false,lmp); + double k_one = utils::numeric(FLERR,arg[1],false,lmp); + double chi_one = utils::numeric(FLERR,arg[2],false,lmp); - int count = 0; - for (int i = ilo; i <= ihi; i++) { - k[i] = k_one; - chi[i] = ((chi_one * MY_PI)/180.0); - setflag[i] = 1; - count++; - } + int count = 0; + for (int i = ilo; i <= ihi; i++) { + k[i] = k_one; + chi[i] = ((chi_one * MY_PI)/180.0); + setflag[i] = 1; + count++; + } - if (count == 0) error->all(FLERR,"Incorrect args for improper coefficients" + utils::errorurl(21)); + if (count == 0) + error->all(FLERR, "Incorrect args for improper coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- @@ -278,8 +279,8 @@ void ImproperCossq::coeff(int narg, char **arg) ------------------------------------------------------------------------- */ void ImproperCossq::write_restart(FILE *fp) { - fwrite(&k[1],sizeof(double),atom->nimpropertypes,fp); - fwrite(&chi[1],sizeof(double),atom->nimpropertypes,fp); + fwrite(&k[1],sizeof(double),atom->nimpropertypes,fp); + fwrite(&chi[1],sizeof(double),atom->nimpropertypes,fp); } /* ---------------------------------------------------------------------- diff --git a/src/EXTRA-MOLECULE/improper_ring.cpp b/src/EXTRA-MOLECULE/improper_ring.cpp index 8fee93055e..57adb50260 100644 --- a/src/EXTRA-MOLECULE/improper_ring.cpp +++ b/src/EXTRA-MOLECULE/improper_ring.cpp @@ -80,187 +80,176 @@ ImproperRing::~ImproperRing() void ImproperRing::compute(int eflag, int vflag) { - /* Be careful!: "chi" is the equilibrium angle in radians. */ - int i1,i2,i3,i4,n,type; + /* Be careful!: "chi" is the equilibrium angle in radians. */ + int i1,i2,i3,i4,n,type; - double eimproper ; + double eimproper ; - /* Compatibility variables. */ - double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z; - double f1[3], f3[3], f4[3]; + /* Compatibility variables. */ + double vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z; + double f1[3], f3[3], f4[3]; - /* Actual computation variables. */ - int at1[3], at2[3], at3[3], icomb; - double bvec1x[3], bvec1y[3], bvec1z[3], - bvec2x[3], bvec2y[3], bvec2z[3], - bvec1n[3], bvec2n[3], bend_angle[3]; - double angle_summer, angfac, cfact1, cfact2, cfact3; - double cjiji, ckjji, ckjkj, fix, fiy, fiz, fjx, fjy, fjz, fkx, fky, fkz; + /* Actual computation variables. */ + int at1[3], at2[3], at3[3], icomb; + double bvec1x[3], bvec1y[3], bvec1z[3], + bvec2x[3], bvec2y[3], bvec2z[3], + bvec1n[3], bvec2n[3], bend_angle[3]; + double angle_summer, angfac, cfact1, cfact2, cfact3; + double cjiji, ckjji, ckjkj, fix, fiy, fiz, fjx, fjy, fjz, fkx, fky, fkz; - eimproper = 0.0; - ev_init(eflag,vflag); + eimproper = 0.0; + ev_init(eflag,vflag); - /* References to simulation data. */ - double **x = atom->x; - double **f = atom->f; - int **improperlist = neighbor->improperlist; - int nimproperlist = neighbor->nimproperlist; - int nlocal = atom->nlocal; - int newton_bond = force->newton_bond; + /* References to simulation data. */ + double **x = atom->x; + double **f = atom->f; + int **improperlist = neighbor->improperlist; + int nimproperlist = neighbor->nimproperlist; + int nlocal = atom->nlocal; + int newton_bond = force->newton_bond; - /* A description of the potential can be found in - Macromolecules 35, pp. 1463-1472 (2002). */ - for (n = 0; n < nimproperlist; n++) - { - /* Take the ids of the atoms contributing to the improper potential. */ - i1 = improperlist[n][0]; /* Atom "1" of Figure 1 from the above reference.*/ - i2 = improperlist[n][1]; /* Atom "2" ... */ - i3 = improperlist[n][2]; /* Atom "3" ... */ - i4 = improperlist[n][3]; /* Atom "9" ... */ - type = improperlist[n][4]; + /* A description of the potential can be found in + Macromolecules 35, pp. 1463-1472 (2002). */ + for (n = 0; n < nimproperlist; n++) { + /* Take the ids of the atoms contributing to the improper potential. */ + i1 = improperlist[n][0]; /* Atom "1" of Figure 1 from the above reference.*/ + i2 = improperlist[n][1]; /* Atom "2" ... */ + i3 = improperlist[n][2]; /* Atom "3" ... */ + i4 = improperlist[n][3]; /* Atom "9" ... */ + type = improperlist[n][4]; - /* Calculate the necessary variables for LAMMPS implementation. - if (evflag) ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f1,f3,f4, - vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z); - Although, they are irrelevant to the calculation of the potential, we keep - them for maximal compatibility. */ - vb1x = x[i1][0] - x[i2][0]; vb1y = x[i1][1] - x[i2][1]; vb1z = x[i1][2] - x[i2][2]; + /* Calculate the necessary variables for LAMMPS implementation. + if (evflag) ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f1,f3,f4, + vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z); + Although, they are irrelevant to the calculation of the potential, we keep + them for maximal compatibility. */ + vb1x = x[i1][0] - x[i2][0]; vb1y = x[i1][1] - x[i2][1]; vb1z = x[i1][2] - x[i2][2]; - vb2x = x[i3][0] - x[i2][0]; vb2y = x[i3][1] - x[i2][1]; vb2z = x[i3][2] - x[i2][2]; + vb2x = x[i3][0] - x[i2][0]; vb2y = x[i3][1] - x[i2][1]; vb2z = x[i3][2] - x[i2][2]; - vb3x = x[i4][0] - x[i3][0]; vb3y = x[i4][1] - x[i3][1]; vb3z = x[i4][2] - x[i3][2]; + vb3x = x[i4][0] - x[i3][0]; vb3y = x[i4][1] - x[i3][1]; vb3z = x[i4][2] - x[i3][2]; - /* Pass the atom tags to form the necessary combinations. */ - at1[0] = i1; at2[0] = i2; at3[0] = i4; /* ids: 1-2-9 */ - at1[1] = i1; at2[1] = i2; at3[1] = i3; /* ids: 1-2-3 */ - at1[2] = i4; at2[2] = i2; at3[2] = i3; /* ids: 9-2-3 */ + /* Pass the atom tags to form the necessary combinations. */ + at1[0] = i1; at2[0] = i2; at3[0] = i4; /* ids: 1-2-9 */ + at1[1] = i1; at2[1] = i2; at3[1] = i3; /* ids: 1-2-3 */ + at1[2] = i4; at2[2] = i2; at3[2] = i3; /* ids: 9-2-3 */ - /* Initialize the sum of the angles differences. */ - angle_summer = 0.0; - /* Take a loop over the three angles, defined by each triad: */ - for (icomb = 0; icomb < 3; icomb ++) + /* Initialize the sum of the angles differences. */ + angle_summer = 0.0; + /* Take a loop over the three angles, defined by each triad: */ + for (icomb = 0; icomb < 3; icomb ++) { - /* Bond vector connecting the first and the second atom. */ - bvec1x[icomb] = x[at2[icomb]][0] - x[at1[icomb]][0]; - bvec1y[icomb] = x[at2[icomb]][1] - x[at1[icomb]][1]; - bvec1z[icomb] = x[at2[icomb]][2] - x[at1[icomb]][2]; - /* also calculate the norm of the vector: */ - bvec1n[icomb] = sqrt( bvec1x[icomb]*bvec1x[icomb] - + bvec1y[icomb]*bvec1y[icomb] - + bvec1z[icomb]*bvec1z[icomb]); - /* Bond vector connecting the second and the third atom. */ - bvec2x[icomb] = x[at3[icomb]][0] - x[at2[icomb]][0]; - bvec2y[icomb] = x[at3[icomb]][1] - x[at2[icomb]][1]; - bvec2z[icomb] = x[at3[icomb]][2] - x[at2[icomb]][2]; - /* also calculate the norm of the vector: */ - bvec2n[icomb] = sqrt( bvec2x[icomb]*bvec2x[icomb] - + bvec2y[icomb]*bvec2y[icomb] - + bvec2z[icomb]*bvec2z[icomb]); + /* Bond vector connecting the first and the second atom. */ + bvec1x[icomb] = x[at2[icomb]][0] - x[at1[icomb]][0]; + bvec1y[icomb] = x[at2[icomb]][1] - x[at1[icomb]][1]; + bvec1z[icomb] = x[at2[icomb]][2] - x[at1[icomb]][2]; + /* also calculate the norm of the vector: */ + bvec1n[icomb] = sqrt( bvec1x[icomb]*bvec1x[icomb] + + bvec1y[icomb]*bvec1y[icomb] + + bvec1z[icomb]*bvec1z[icomb]); + /* Bond vector connecting the second and the third atom. */ + bvec2x[icomb] = x[at3[icomb]][0] - x[at2[icomb]][0]; + bvec2y[icomb] = x[at3[icomb]][1] - x[at2[icomb]][1]; + bvec2z[icomb] = x[at3[icomb]][2] - x[at2[icomb]][2]; + /* also calculate the norm of the vector: */ + bvec2n[icomb] = sqrt( bvec2x[icomb]*bvec2x[icomb] + + bvec2y[icomb]*bvec2y[icomb] + + bvec2z[icomb]*bvec2z[icomb]); - /* Calculate the bending angle of the atom triad: */ - bend_angle[icomb] = ( bvec2x[icomb]*bvec1x[icomb] - + bvec2y[icomb]*bvec1y[icomb] - + bvec2z[icomb]*bvec1z[icomb]); - bend_angle[icomb] /= (bvec1n[icomb] * bvec2n[icomb]); - if (bend_angle[icomb] > 1.0) bend_angle[icomb] -= SMALL; - if (bend_angle[icomb] < -1.0) bend_angle[icomb] += SMALL; + /* Calculate the bending angle of the atom triad: */ + bend_angle[icomb] = ( bvec2x[icomb]*bvec1x[icomb] + + bvec2y[icomb]*bvec1y[icomb] + + bvec2z[icomb]*bvec1z[icomb]); + bend_angle[icomb] /= (bvec1n[icomb] * bvec2n[icomb]); + if (bend_angle[icomb] > 1.0) bend_angle[icomb] -= SMALL; + if (bend_angle[icomb] < -1.0) bend_angle[icomb] += SMALL; - /* Append the current angle to the sum of angle differences. */ - angle_summer += (bend_angle[icomb] - chi[type]); + /* Append the current angle to the sum of angle differences. */ + angle_summer += (bend_angle[icomb] - chi[type]); } - if (eflag) eimproper = (1.0/6.0) *k[type] * powint(angle_summer,6); - /* - printf("The tags: %d-%d-%d-%d, of type %d .\n",atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4],type); - // printf("The coordinates of the first: %f, %f, %f.\n", x[i1][0], x[i1][1], x[i1][2]); - // printf("The coordinates of the second: %f, %f, %f.\n", x[i2][0], x[i2][1], x[i2][2]); - // printf("The coordinates of the third: %f, %f, %f.\n", x[i3][0], x[i3][1], x[i3][2]); - // printf("The coordinates of the fourth: %f, %f, %f.\n", x[i4][0], x[i4][1], x[i4][2]); - printf("The angles are: %f / %f / %f equilibrium: %f.\n", bend_angle[0], bend_angle[1], bend_angle[2],chi[type]); - printf("The energy of the improper: %f with prefactor %f.\n", eimproper,(1.0/6.0)*k[type]); - printf("The sum of the angles: %f.\n", angle_summer); - */ + if (eflag) eimproper = (1.0/6.0) *k[type] * powint(angle_summer,6); - /* Force calculation acting on all atoms. - Calculate the derivatives of the potential. */ - angfac = k[type] * powint(angle_summer,5); + /* Force calculation acting on all atoms. + Calculate the derivatives of the potential. */ + angfac = k[type] * powint(angle_summer,5); - f1[0] = 0.0; f1[1] = 0.0; f1[2] = 0.0; - f3[0] = 0.0; f3[1] = 0.0; f3[2] = 0.0; - f4[0] = 0.0; f4[1] = 0.0; f4[2] = 0.0; + f1[0] = 0.0; f1[1] = 0.0; f1[2] = 0.0; + f3[0] = 0.0; f3[1] = 0.0; f3[2] = 0.0; + f4[0] = 0.0; f4[1] = 0.0; f4[2] = 0.0; - /* Take a loop over the three angles, defined by each triad: */ - for (icomb = 0; icomb < 3; icomb ++) + /* Take a loop over the three angles, defined by each triad: */ + for (icomb = 0; icomb < 3; icomb ++) { - /* Calculate the squares of the distances. */ - cjiji = bvec1n[icomb] * bvec1n[icomb]; ckjkj = bvec2n[icomb] * bvec2n[icomb]; + /* Calculate the squares of the distances. */ + cjiji = bvec1n[icomb] * bvec1n[icomb]; ckjkj = bvec2n[icomb] * bvec2n[icomb]; - ckjji = bvec2x[icomb] * bvec1x[icomb] - + bvec2y[icomb] * bvec1y[icomb] - + bvec2z[icomb] * bvec1z[icomb] ; + ckjji = bvec2x[icomb] * bvec1x[icomb] + + bvec2y[icomb] * bvec1y[icomb] + + bvec2z[icomb] * bvec1z[icomb] ; - cfact1 = angfac / (sqrt(ckjkj * cjiji)); - cfact2 = ckjji / ckjkj; - cfact3 = ckjji / cjiji; + cfact1 = angfac / (sqrt(ckjkj * cjiji)); + cfact2 = ckjji / ckjkj; + cfact3 = ckjji / cjiji; - /* Calculate the force acted on the third atom of the angle. */ - fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; - fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; - fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; + /* Calculate the force acted on the third atom of the angle. */ + fkx = cfact2 * bvec2x[icomb] - bvec1x[icomb]; + fky = cfact2 * bvec2y[icomb] - bvec1y[icomb]; + fkz = cfact2 * bvec2z[icomb] - bvec1z[icomb]; - /* Calculate the force acted on the first atom of the angle. */ - fix = bvec2x[icomb] - cfact3 * bvec1x[icomb]; - fiy = bvec2y[icomb] - cfact3 * bvec1y[icomb]; - fiz = bvec2z[icomb] - cfact3 * bvec1z[icomb]; + /* Calculate the force acted on the first atom of the angle. */ + fix = bvec2x[icomb] - cfact3 * bvec1x[icomb]; + fiy = bvec2y[icomb] - cfact3 * bvec1y[icomb]; + fiz = bvec2z[icomb] - cfact3 * bvec1z[icomb]; - /* Finally, calculate the force acted on the middle atom of the angle.*/ - fjx = - fix - fkx; fjy = - fiy - fky; fjz = - fiz - fkz; + /* Finally, calculate the force acted on the middle atom of the angle.*/ + fjx = - fix - fkx; fjy = - fiy - fky; fjz = - fiz - fkz; - /* Consider the appropriate scaling of the forces: */ - fix *= cfact1; fiy *= cfact1; fiz *= cfact1; - fjx *= cfact1; fjy *= cfact1; fjz *= cfact1; - fkx *= cfact1; fky *= cfact1; fkz *= cfact1; + /* Consider the appropriate scaling of the forces: */ + fix *= cfact1; fiy *= cfact1; fiz *= cfact1; + fjx *= cfact1; fjy *= cfact1; fjz *= cfact1; + fkx *= cfact1; fky *= cfact1; fkz *= cfact1; - if (at1[icomb] == i1) {f1[0] += fix; f1[1] += fiy; f1[2] += fiz;} - else if (at2[icomb] == i1) {f1[0] += fjx; f1[1] += fjy; f1[2] += fjz;} - else if (at3[icomb] == i1) {f1[0] += fkx; f1[1] += fky; f1[2] += fkz;} + if (at1[icomb] == i1) {f1[0] += fix; f1[1] += fiy; f1[2] += fiz;} + else if (at2[icomb] == i1) {f1[0] += fjx; f1[1] += fjy; f1[2] += fjz;} + else if (at3[icomb] == i1) {f1[0] += fkx; f1[1] += fky; f1[2] += fkz;} - if (at1[icomb] == i3) {f3[0] += fix; f3[1] += fiy; f3[2] += fiz;} - else if (at2[icomb] == i3) {f3[0] += fjx; f3[1] += fjy; f3[2] += fjz;} - else if (at3[icomb] == i3) {f3[0] += fkx; f3[1] += fky; f3[2] += fkz;} + if (at1[icomb] == i3) {f3[0] += fix; f3[1] += fiy; f3[2] += fiz;} + else if (at2[icomb] == i3) {f3[0] += fjx; f3[1] += fjy; f3[2] += fjz;} + else if (at3[icomb] == i3) {f3[0] += fkx; f3[1] += fky; f3[2] += fkz;} - if (at1[icomb] == i4) {f4[0] += fix; f4[1] += fiy; f4[2] += fiz;} - else if (at2[icomb] == i4) {f4[0] += fjx; f4[1] += fjy; f4[2] += fjz;} - else if (at3[icomb] == i4) {f4[0] += fkx; f4[1] += fky; f4[2] += fkz;} + if (at1[icomb] == i4) {f4[0] += fix; f4[1] += fiy; f4[2] += fiz;} + else if (at2[icomb] == i4) {f4[0] += fjx; f4[1] += fjy; f4[2] += fjz;} + else if (at3[icomb] == i4) {f4[0] += fkx; f4[1] += fky; f4[2] += fkz;} - /* Store the contribution to the global arrays: */ - /* Take the id of the atom from the at1[icomb] element, i1 = at1[icomb]. */ - if (newton_bond || at1[icomb] < nlocal) { - f[at1[icomb]][0] += fix; - f[at1[icomb]][1] += fiy; - f[at1[icomb]][2] += fiz; - } - /* Take the id of the atom from the at2[icomb] element, i2 = at2[icomb]. */ - if (newton_bond || at2[icomb] < nlocal) { - f[at2[icomb]][0] += fjx; - f[at2[icomb]][1] += fjy; - f[at2[icomb]][2] += fjz; - } - /* Take the id of the atom from the at3[icomb] element, i3 = at3[icomb]. */ - if (newton_bond || at3[icomb] < nlocal) { - f[at3[icomb]][0] += fkx; - f[at3[icomb]][1] += fky; - f[at3[icomb]][2] += fkz; - } + /* Store the contribution to the global arrays: */ + /* Take the id of the atom from the at1[icomb] element, i1 = at1[icomb]. */ + if (newton_bond || at1[icomb] < nlocal) { + f[at1[icomb]][0] += fix; + f[at1[icomb]][1] += fiy; + f[at1[icomb]][2] += fiz; + } + /* Take the id of the atom from the at2[icomb] element, i2 = at2[icomb]. */ + if (newton_bond || at2[icomb] < nlocal) { + f[at2[icomb]][0] += fjx; + f[at2[icomb]][1] += fjy; + f[at2[icomb]][2] += fjz; + } + /* Take the id of the atom from the at3[icomb] element, i3 = at3[icomb]. */ + if (newton_bond || at3[icomb] < nlocal) { + f[at3[icomb]][0] += fkx; + f[at3[icomb]][1] += fky; + f[at3[icomb]][2] += fkz; + } } - if (evflag) ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f1,f3,f4, - vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z); + if (evflag) ev_tally(i1,i2,i3,i4,nlocal,newton_bond,eimproper,f1,f3,f4, + vb1x,vb1y,vb1z,vb2x,vb2y,vb2z,vb3x,vb3y,vb3z); } } @@ -285,31 +274,32 @@ void ImproperRing::allocate() void ImproperRing ::coeff(int narg, char **arg) { - /* Check whether there exist sufficient number of arguments. - 0: type of improper to be applied to - 1: energetic constant - 2: equilibrium angle in degrees */ - if (narg != 3) error->all(FLERR,"Incorrect args for RING improper coefficients"); - if (!allocated) allocate(); + /* Check whether there exist sufficient number of arguments. + 0: type of improper to be applied to + 1: energetic constant + 2: equilibrium angle in degrees */ + if (narg != 3) error->all(FLERR,"Incorrect args for improper coefficients" + utils::errorurl(21)); + if (!allocated) allocate(); - int ilo,ihi; - utils::bounds(FLERR,arg[0],1,atom->nimpropertypes,ilo,ihi,error); + int ilo,ihi; + utils::bounds(FLERR,arg[0],1,atom->nimpropertypes,ilo,ihi,error); - double k_one = utils::numeric(FLERR,arg[1],false,lmp); - double chi_one = utils::numeric(FLERR,arg[2],false,lmp); + double k_one = utils::numeric(FLERR,arg[1],false,lmp); + double chi_one = utils::numeric(FLERR,arg[2],false,lmp); - int count = 0; - for (int i = ilo; i <= ihi; i++) { - /* Read the k parameter in kcal/mol. */ - k[i] = k_one; - /* "chi_one" stores the equilibrium angle in degrees. - Convert it to radians and store its cosine. */ - chi[i] = cos((chi_one/180.0)*MY_PI); - setflag[i] = 1; - count++; - } + int count = 0; + for (int i = ilo; i <= ihi; i++) { + /* Read the k parameter in kcal/mol. */ + k[i] = k_one; + /* "chi_one" stores the equilibrium angle in degrees. + Convert it to radians and store its cosine. */ + chi[i] = cos((chi_one/180.0)*MY_PI); + setflag[i] = 1; + count++; + } - if (count == 0) error->all(FLERR,"Incorrect args for improper coefficients" + utils::errorurl(21)); + if (count == 0) + error->all(FLERR,"Incorrect args for improper coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- diff --git a/src/EXTRA-PAIR/pair_beck.cpp b/src/EXTRA-PAIR/pair_beck.cpp index cd24609216..7cfa4810f0 100644 --- a/src/EXTRA-PAIR/pair_beck.cpp +++ b/src/EXTRA-PAIR/pair_beck.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "neigh_list.h" @@ -229,7 +230,9 @@ void PairBeck::coeff(int narg, char **arg) double PairBeck::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); AA[j][i] = AA[i][j]; BB[j][i] = BB[i][j]; diff --git a/src/EXTRA-PAIR/pair_born_coul_dsf.cpp b/src/EXTRA-PAIR/pair_born_coul_dsf.cpp index 6cd19ec54f..b7ca3ae841 100644 --- a/src/EXTRA-PAIR/pair_born_coul_dsf.cpp +++ b/src/EXTRA-PAIR/pair_born_coul_dsf.cpp @@ -19,10 +19,10 @@ #include "pair_born_coul_dsf.h" -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neighbor.h" #include "neigh_list.h" #include "math_const.h" @@ -30,6 +30,7 @@ #include "error.h" #include "math_special.h" +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -278,7 +279,7 @@ void PairBornCoulDSF::coeff(int narg, char **arg) void PairBornCoulDSF::init_style() { if (!atom->q_flag) - error->all(FLERR,"Pair style born/coul/dsf requires atom attribute q"); + error->all(FLERR, Error::NOLASTLINE, "Pair style born/coul/dsf requires atom attribute q"); neighbor->add_request(this); @@ -295,7 +296,9 @@ void PairBornCoulDSF::init_style() double PairBornCoulDSF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/EXTRA-PAIR/pair_born_coul_wolf.cpp b/src/EXTRA-PAIR/pair_born_coul_wolf.cpp index 8dce32ad21..24d6de0fd7 100644 --- a/src/EXTRA-PAIR/pair_born_coul_wolf.cpp +++ b/src/EXTRA-PAIR/pair_born_coul_wolf.cpp @@ -18,16 +18,18 @@ #include "pair_born_coul_wolf.h" -#include + #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neighbor.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" #include "error.h" +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -294,7 +296,9 @@ void PairBornCoulWolf::init_style() double PairBornCoulWolf::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/EXTRA-PAIR/pair_born_gauss.cpp b/src/EXTRA-PAIR/pair_born_gauss.cpp index 0cd2102c58..b670289727 100644 --- a/src/EXTRA-PAIR/pair_born_gauss.cpp +++ b/src/EXTRA-PAIR/pair_born_gauss.cpp @@ -19,6 +19,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -215,7 +216,9 @@ void PairBornGauss::coeff(int narg, char **arg) double PairBornGauss::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); if (offset_flag) { double dr = cut[i][j] - r0[i][j]; diff --git a/src/EXTRA-PAIR/pair_buck_mdf.cpp b/src/EXTRA-PAIR/pair_buck_mdf.cpp index 3c93c0f5b3..c40a940351 100644 --- a/src/EXTRA-PAIR/pair_buck_mdf.cpp +++ b/src/EXTRA-PAIR/pair_buck_mdf.cpp @@ -18,15 +18,16 @@ #include "pair_buck_mdf.h" -#include -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; @@ -250,7 +251,9 @@ void PairBuckMDF::coeff(int narg, char **arg) double PairBuckMDF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); rhoinv[i][j] = 1.0/rho[i][j]; buck1[i][j] = a[i][j]/rho[i][j]; diff --git a/src/EXTRA-PAIR/pair_dispersion_d3.cpp b/src/EXTRA-PAIR/pair_dispersion_d3.cpp index d66148828c..1004a5f99a 100644 --- a/src/EXTRA-PAIR/pair_dispersion_d3.cpp +++ b/src/EXTRA-PAIR/pair_dispersion_d3.cpp @@ -26,6 +26,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -1420,7 +1421,9 @@ void PairDispersionD3::set_funcpar(std::string &functional_name) double PairDispersionD3::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); r0ab[j][i] = r0ab[i][j]; diff --git a/src/EXTRA-PAIR/pair_e3b.cpp b/src/EXTRA-PAIR/pair_e3b.cpp index cc81cee03f..b0ae56d86b 100644 --- a/src/EXTRA-PAIR/pair_e3b.cpp +++ b/src/EXTRA-PAIR/pair_e3b.cpp @@ -22,6 +22,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -601,7 +602,9 @@ void PairE3B::presetParam(const int flag, bool &repeatFlag, double &bondL) //pair.cpp::init uses this to set cutsq array, used for neighboring, etc double PairE3B::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/EXTRA-PAIR/pair_lennard_mdf.cpp b/src/EXTRA-PAIR/pair_lennard_mdf.cpp index b56b7407f3..3bb2afcbfa 100644 --- a/src/EXTRA-PAIR/pair_lennard_mdf.cpp +++ b/src/EXTRA-PAIR/pair_lennard_mdf.cpp @@ -19,15 +19,16 @@ #include "pair_lennard_mdf.h" -#include -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; @@ -251,7 +252,9 @@ void PairLennardMDF::coeff(int narg, char **arg) double PairLennardMDF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cut_inner_sq[i][j] = cut_inner[i][j]*cut_inner[i][j]; diff --git a/src/EXTRA-PAIR/pair_momb.cpp b/src/EXTRA-PAIR/pair_momb.cpp index def4037157..c898590cba 100644 --- a/src/EXTRA-PAIR/pair_momb.cpp +++ b/src/EXTRA-PAIR/pair_momb.cpp @@ -19,16 +19,18 @@ #include "pair_momb.h" -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "memory.h" #include "error.h" #include "citeme.h" +#include + using namespace LAMMPS_NS; static const char cite_momb[] = @@ -252,7 +254,9 @@ void PairMomb::coeff(int narg, char **arg) double PairMomb::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); morse1[i][j] = 2.0*d0[i][j]*alpha[i][j]; diff --git a/src/EXTRA-PAIR/pair_morse_smooth_linear.cpp b/src/EXTRA-PAIR/pair_morse_smooth_linear.cpp index 9d3b3d4dc5..a3ede5f2ed 100644 --- a/src/EXTRA-PAIR/pair_morse_smooth_linear.cpp +++ b/src/EXTRA-PAIR/pair_morse_smooth_linear.cpp @@ -14,15 +14,16 @@ #include "pair_morse_smooth_linear.h" -#include -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; @@ -217,7 +218,9 @@ void PairMorseSmoothLinear::coeff(int narg, char **arg) double PairMorseSmoothLinear::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); morse1[i][j] = 2.0*d0[i][j]*alpha[i][j]; double alpha_dr = -alpha[i][j] * (cut[i][j] - r0[i][j]); diff --git a/src/EXTRA-PAIR/pair_nm_cut.cpp b/src/EXTRA-PAIR/pair_nm_cut.cpp index d3c7dca54d..a8f0687849 100644 --- a/src/EXTRA-PAIR/pair_nm_cut.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut.cpp @@ -21,6 +21,7 @@ #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" @@ -237,7 +238,9 @@ void PairNMCut::coeff(int narg, char **arg) double PairNMCut::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); nm[i][j] = nn[i][j]*mm[i][j]; e0nm[i][j] = e0[i][j]/(nn[i][j]-mm[i][j]); diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp index 1fb98e3f4b..bc229cacce 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_cut.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -276,7 +277,9 @@ void PairNMCutCoulCut::init_style() double PairNMCutCoulCut::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul[i][j]); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp b/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp index cd36d4a262..488a312bbc 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_long.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "ewald_const.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "memory.h" @@ -42,7 +43,6 @@ PairNMCutCoulLong::PairNMCutCoulLong(LAMMPS *lmp) : Pair(lmp) { ewaldflag = pppmflag = 1; ftable = nullptr; - qdist = 0.0; } /* ---------------------------------------------------------------------- */ @@ -318,11 +318,11 @@ void PairNMCutCoulLong::init_style() double PairNMCutCoulLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); - // include TIP4P qdist in full cutoff, qdist = 0.0 if not TIP4P - - double cut = MAX(cut_lj[i][j],cut_coul+2.0*qdist); + double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; nm[i][j] = nn[i][j]*mm[i][j]; diff --git a/src/EXTRA-PAIR/pair_nm_cut_coul_long.h b/src/EXTRA-PAIR/pair_nm_cut_coul_long.h index 1e1d61ff90..563ebd8abd 100644 --- a/src/EXTRA-PAIR/pair_nm_cut_coul_long.h +++ b/src/EXTRA-PAIR/pair_nm_cut_coul_long.h @@ -50,7 +50,6 @@ class PairNMCutCoulLong : public Pair { double cut_coul, cut_coulsq; double **e0, **r0, **nn, **mm; double **nm, **e0nm, **r0n, **r0m, **offset; - double qdist; // TIP4P distance from O site to negative charge double g_ewald; void allocate(); diff --git a/src/EXTRA-PAIR/pair_pedone.cpp b/src/EXTRA-PAIR/pair_pedone.cpp index 3f97c76a7d..a620895d15 100644 --- a/src/EXTRA-PAIR/pair_pedone.cpp +++ b/src/EXTRA-PAIR/pair_pedone.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -226,7 +227,9 @@ void PairPedone::coeff(int narg, char **arg) double PairPedone::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); pedone1[i][j] = 2.0 * d0[i][j] * alpha[i][j]; pedone2[i][j] = 12.0 * c0[i][j]; diff --git a/src/EXTRA-PAIR/pair_wf_cut.cpp b/src/EXTRA-PAIR/pair_wf_cut.cpp index bb1978ff8c..67057c1707 100644 --- a/src/EXTRA-PAIR/pair_wf_cut.cpp +++ b/src/EXTRA-PAIR/pair_wf_cut.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_special.h" #include "memory.h" @@ -230,12 +231,14 @@ void PairWFCut::coeff(int narg, char **arg) double PairWFCut::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); nm[i][j] = nu[i][j]*mu[i][j]; e0nm[i][j] = epsilon[i][j]*2.0*nu[i][j]*powint(cut[i][j]/sigma[i][j],2*mu[i][j]) - *powint((1+2.0*nu[i][j])/(2.0*nu[i][j])/(MathSpecial::powint(cut[i][j]/sigma[i][j],2*mu[i][j])-1.0), - 2*nu[i][j]+1); + *powint((1+2.0*nu[i][j])/(2.0*nu[i][j]) + /(MathSpecial::powint(cut[i][j]/sigma[i][j],2*mu[i][j])-1.0),2*nu[i][j]+1); rcmu[i][j] = powint(cut[i][j],2*mu[i][j]); sigma_mu[i][j] = powint(sigma[i][j], 2*mu[i][j]); diff --git a/src/FEP/pair_morse_soft.cpp b/src/FEP/pair_morse_soft.cpp index e13defefa6..661acaf10f 100644 --- a/src/FEP/pair_morse_soft.cpp +++ b/src/FEP/pair_morse_soft.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "neigh_list.h" @@ -225,7 +226,9 @@ void PairMorseSoft::settings(int narg, char **arg) double PairMorseSoft::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); morse1[i][j] = 2.0 * d0[i][j] * alpha[i][j]; diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index 3e916a6571..4528da87cd 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -232,7 +233,9 @@ void PairSWGPU::init_style() double PairSWGPU::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax; cutghost[j][i] = cutmax; diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index 9ba94548c1..10502190fd 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -236,7 +237,9 @@ void PairTersoffGPU::init_style() double PairTersoffGPU::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax; cutghost[j][i] = cutmax; diff --git a/src/GPU/pair_tersoff_mod_gpu.cpp b/src/GPU/pair_tersoff_mod_gpu.cpp index 1bb09c1403..96e64a271f 100644 --- a/src/GPU/pair_tersoff_mod_gpu.cpp +++ b/src/GPU/pair_tersoff_mod_gpu.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -237,7 +238,9 @@ void PairTersoffMODGPU::init_style() double PairTersoffMODGPU::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax; cutghost[j][i] = cutmax; diff --git a/src/GPU/pair_tersoff_zbl_gpu.cpp b/src/GPU/pair_tersoff_zbl_gpu.cpp index 8d5e05ce4c..cab2a0f0ed 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.cpp +++ b/src/GPU/pair_tersoff_zbl_gpu.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "force.h" #include "gpu_extra.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neigh_request.h" @@ -255,7 +256,9 @@ void PairTersoffZBLGPU::init_style() double PairTersoffZBLGPU::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax; cutghost[j][i] = cutmax; diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 38ad2b3c57..9693f670e7 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -22,6 +22,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "gpu_extra.h" #include "memory.h" #include "neigh_list.h" @@ -234,8 +235,10 @@ void PairVashishtaGPU::init_style() double PairVashishtaGPU::init_one(int i, int j) { - if (!gpu_allocated) { allocate(); } - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (!gpu_allocated) allocate(); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax; cutghost[j][i] = cutmax; diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index 593aed827c..47fe71e872 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -197,7 +197,7 @@ void PPPMGPU::compute(int eflag, int vflag) if (!success) error->one(FLERR,"Insufficient memory on accelerator"); if (flag != 0) - error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } // convert atoms from box to lamda coords diff --git a/src/INTEL/pair_snap_intel.cpp b/src/INTEL/pair_snap_intel.cpp index 7b388206b4..416f83bd06 100644 --- a/src/INTEL/pair_snap_intel.cpp +++ b/src/INTEL/pair_snap_intel.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -424,7 +425,9 @@ void PairSNAPIntel::init_style() double PairSNAPIntel::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); scale[j][i] = scale[i][j]; return (radelem[map[i]] + radelem[map[j]])*rcutfac; diff --git a/src/INTEL/pppm_disp_intel.cpp b/src/INTEL/pppm_disp_intel.cpp index 8053036112..3af670d325 100644 --- a/src/INTEL/pppm_disp_intel.cpp +++ b/src/INTEL/pppm_disp_intel.cpp @@ -723,7 +723,7 @@ void PPPMDispIntel::particle_map_intel(double delx, double dely, double delz, int nthr = comm->nthreads; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; @@ -777,7 +777,7 @@ void PPPMDispIntel::particle_map_intel(double delx, double dely, double delz, } } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/INTEL/pppm_intel.cpp b/src/INTEL/pppm_intel.cpp index 8d46cc28e9..1ebfc29b99 100644 --- a/src/INTEL/pppm_intel.cpp +++ b/src/INTEL/pppm_intel.cpp @@ -356,7 +356,7 @@ void PPPMIntel::particle_map(IntelBuffers *buffers) int flag = 0; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); #if defined(_OPENMP) #pragma omp parallel LMP_DEFAULT_NONE \ @@ -404,7 +404,7 @@ void PPPMIntel::particle_map(IntelBuffers *buffers) } } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } diff --git a/src/INTERLAYER/pair_drip.cpp b/src/INTERLAYER/pair_drip.cpp index 2800bd604d..37989aa94e 100644 --- a/src/INTERLAYER/pair_drip.cpp +++ b/src/INTERLAYER/pair_drip.cpp @@ -26,6 +26,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -136,7 +137,9 @@ void PairDRIP::coeff(int narg, char **arg) double PairDRIP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); int itype = map[i]; int jtype = map[j]; diff --git a/src/INTERLAYER/pair_ilp_graphene_hbn.cpp b/src/INTERLAYER/pair_ilp_graphene_hbn.cpp index a3e3a833c3..5cddbc5edf 100644 --- a/src/INTERLAYER/pair_ilp_graphene_hbn.cpp +++ b/src/INTERLAYER/pair_ilp_graphene_hbn.cpp @@ -25,6 +25,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "interlayer_taper.h" #include "memory.h" #include "my_page.h" @@ -185,8 +186,11 @@ void PairILPGrapheneHBN::coeff(int narg, char **arg) double PairILPGrapheneHBN::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); - if (!offset_flag) error->all(FLERR, "Must use 'pair_modify shift yes' with this pair style"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); + if (!offset_flag) + error->all(FLERR, Error::NOLASTLINE, "Must use 'pair_modify shift yes' with this pair style"); if (offset_flag && (cut_global > 0.0)) { int iparam_ij = elem2param[map[i]][map[j]]; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp index 6bc3a6dde7..be6cefa62a 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_full.cpp @@ -27,6 +27,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "interlayer_taper.h" #include "memory.h" #include "my_page.h" @@ -164,8 +165,11 @@ void PairKolmogorovCrespiFull::coeff(int narg, char **arg) double PairKolmogorovCrespiFull::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); - if (!offset_flag) error->all(FLERR, "Must use 'pair_modify shift yes' with this pair style"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); + if (!offset_flag) + error->all(FLERR, Error::NOLASTLINE, "Must use 'pair_modify shift yes' with this pair style"); if (offset_flag && (cut_global > 0.0)) { int iparam_ij = elem2param[map[i]][map[j]]; diff --git a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp index fa0fe9cad1..08bf44b37d 100644 --- a/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp +++ b/src/INTERLAYER/pair_kolmogorov_crespi_z.cpp @@ -27,6 +27,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -245,7 +246,7 @@ void PairKolmogorovCrespiZ::coeff(int narg, char **arg) void PairKolmogorovCrespiZ::init_style() { if (force->newton_pair == 0) - error->all(FLERR, "Pair style kolmogorov/crespi/z requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style kolmogorov/crespi/z requires newton pair on"); neighbor->add_request(this); } @@ -256,8 +257,11 @@ void PairKolmogorovCrespiZ::init_style() double PairKolmogorovCrespiZ::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); - if (!offset_flag) error->all(FLERR, "Must use 'pair_modify shift yes' with this pair style"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); + if (!offset_flag) + error->all(FLERR, Error::NOLASTLINE, "Must use 'pair_modify shift yes' with this pair style"); if (offset_flag && (cut_global > 0.0)) { int iparam_ij = elem2param[map[i]][map[j]]; diff --git a/src/INTERLAYER/pair_lebedeva_z.cpp b/src/INTERLAYER/pair_lebedeva_z.cpp index ff9f9dedaa..58842e805d 100644 --- a/src/INTERLAYER/pair_lebedeva_z.cpp +++ b/src/INTERLAYER/pair_lebedeva_z.cpp @@ -29,6 +29,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" @@ -253,9 +254,11 @@ void PairLebedevaZ::init_style() double PairLebedevaZ::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); if (!offset_flag) - error->all(FLERR,"Must use 'pair_modify shift yes' with this pair style"); + error->all(FLERR, Error::NOLASTLINE, "Must use 'pair_modify shift yes' with this pair style"); if (offset_flag && (cut_global > 0.0)) { int iparam_ij = elem2param[map[i]][map[j]]; diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index f7dd01be49..48b4d2eec2 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -86,7 +86,7 @@ void KimInit::command(int narg, char **arg) if ((narg < 2) || (narg > 3)) error->all(FLERR, "Illegal 'kim init' command"); if (domain->box_exist) - error->all(FLERR, "Must use 'kim init' command before simulation box is defined"); + error->all(FLERR, "Must use 'kim init' command before simulation box is defined" + utils::errorurl(33)); char *model_name = utils::strdup(arg[0]); char *user_units = utils::strdup(arg[1]); diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 93ba759de4..6876dbe6dc 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -64,6 +64,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neigh_request.h" @@ -621,7 +622,9 @@ double PairKIM::init_one(int i, int j) // This is called once of each (unordered) i,j pair for each // "run ...", "minimize ...", etc. read from input - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return kim_global_influence_distance; } diff --git a/src/KOKKOS/fix_shake_kokkos.cpp b/src/KOKKOS/fix_shake_kokkos.cpp index 52826d7b04..05873120d7 100644 --- a/src/KOKKOS/fix_shake_kokkos.cpp +++ b/src/KOKKOS/fix_shake_kokkos.cpp @@ -257,8 +257,8 @@ void FixShakeKokkos::pre_neighbor() nlist = h_nlist(); if (h_error_flag() == 1) { - error->one(FLERR,"Shake atoms missing on proc " - "{} at step {}",comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms missing on proc {} at step {}{}", + comm->me,update->ntimestep, utils::errorurl(5)); } } diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index fc38cdf19a..64f4025ffb 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -22,6 +22,7 @@ #include "atom_masks.h" #include "error.h" #include "force.h" +#include "info.h" #include "kokkos.h" #include "memory_kokkos.h" #include "neigh_list.h" @@ -483,7 +484,9 @@ void PairTableKokkos::settings(int narg, char **arg) template double PairTableKokkos::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); tabindex[j][i] = tabindex[i][j]; diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index 517c408945..2b04c3aa75 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "fix.h" #include "force.h" +#include "info.h" #include "kokkos.h" #include "kokkos.h" #include "kokkos_few.h" @@ -1159,7 +1160,9 @@ void PairTableRXKokkos::coeff(int narg, char **arg) template double PairTableRXKokkos::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); tabindex[j][i] = tabindex[i][j]; diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 34c3d7579e..84bff03c80 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -1138,7 +1138,7 @@ void PPPMKokkos::particle_map() k_flag.template sync(); if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); copymode = 1; Kokkos::parallel_for(Kokkos::RangePolicy(0,nlocal),*this); @@ -1147,7 +1147,7 @@ void PPPMKokkos::particle_map() k_flag.template modify(); k_flag.template sync(); if (k_flag.h_view()) - error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } template diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index 72e35ae9f3..2cdeb74ec0 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -1442,7 +1442,7 @@ void MSM::particle_map() int flag = 0; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR, Error::NOLASTLINE, "Non-numeric box dimensions - simulation unstable"); + error->one(FLERR, Error::NOLASTLINE, "Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); for (int i = 0; i < nlocal; i++) { @@ -1466,8 +1466,8 @@ void MSM::particle_map() } if (flag) - error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM{}", - utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/msm_cg.cpp b/src/KSPACE/msm_cg.cpp index 60aebc0f60..9ba52a68d5 100644 --- a/src/KSPACE/msm_cg.cpp +++ b/src/KSPACE/msm_cg.cpp @@ -310,7 +310,7 @@ void MSMCG::particle_map() int i; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); for (int j = 0; j < num_charged; j++) { i = is_charged[j]; @@ -335,7 +335,7 @@ void MSMCG::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute MSM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index e9abe539c1..22ba32d3c6 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "ewald_const.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "memory.h" @@ -296,7 +297,9 @@ void PairBornCoulLong::coeff(int narg, char **arg) double PairBornCoulLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index f3b7a91c0e..b9c8e2a6f3 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -19,6 +19,7 @@ #include "error.h" #include "ewald_const.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "memory.h" @@ -292,7 +293,9 @@ void PairBuckCoulLong::coeff(int narg, char **arg) double PairBuckCoulLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index e1dac0a61b..188b01b2e3 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -23,6 +23,7 @@ #include "error.h" #include "ewald_const.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_extra.h" #include "memory.h" @@ -274,7 +275,9 @@ void PairBuckLongCoulLong::init_style() double PairBuckLongCoulLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); if (ewald_order&(1<<6)) cut_buck[i][j] = cut_buck_global; else cut_buck[i][j] = cut_buck_read[i][j]; diff --git a/src/KSPACE/pair_coul_streitz.cpp b/src/KSPACE/pair_coul_streitz.cpp index 5949745953..055d98309b 100644 --- a/src/KSPACE/pair_coul_streitz.cpp +++ b/src/KSPACE/pair_coul_streitz.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "memory.h" @@ -162,7 +163,9 @@ double PairCoulStreitz::init_one(int i, int j) { scale[j][i] = scale[i][j]; - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cut_coul; } diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 611e29360b..8eaa60ac92 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -1803,7 +1803,7 @@ void PPPM::particle_map() int flag = 0; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); for (int i = 0; i < nlocal; i++) { @@ -1830,7 +1830,7 @@ void PPPM::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_cg.cpp b/src/KSPACE/pppm_cg.cpp index 5e244c8a37..fe0176bf13 100644 --- a/src/KSPACE/pppm_cg.cpp +++ b/src/KSPACE/pppm_cg.cpp @@ -278,7 +278,7 @@ void PPPMCG::particle_map() double **x = atom->x; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; for (int j = 0; j < num_charged; j++) { @@ -304,7 +304,7 @@ void PPPMCG::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 8ff2ae2635..f2882582bb 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -4227,7 +4227,7 @@ void PPPMDisp::particle_map(double delx, double dely, double delz, int nlocal = atom->nlocal; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; for (int i = 0; i < nlocal; i++) { @@ -4252,7 +4252,7 @@ void PPPMDisp::particle_map(double delx, double dely, double delz, flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPMDisp" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index a07387443b..1417aca4a3 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -71,7 +71,7 @@ void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz, int nlocal = atom->nlocal; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; for (int i = 0; i < nlocal; i++) { @@ -100,7 +100,7 @@ void PPPMDispTIP4P::particle_map_c(double delx, double dely, double delz, flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index 4d0fb7f20a..9681351ec1 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -674,7 +674,7 @@ void PPPMStagger::particle_map() int nlocal = atom->nlocal; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; for (int i = 0; i < nlocal; i++) { @@ -699,7 +699,7 @@ void PPPMStagger::particle_map() flag = 1; } - if (flag) error->one(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag) error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 0ece29768e..631eebc65c 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -68,7 +68,7 @@ void PPPMTIP4P::particle_map() int nlocal = atom->nlocal; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; for (int i = 0; i < nlocal; i++) { @@ -98,7 +98,7 @@ void PPPMTIP4P::particle_map() int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/LEPTON/pair_lepton.cpp b/src/LEPTON/pair_lepton.cpp index e55a77a583..c9f45d8ea1 100644 --- a/src/LEPTON/pair_lepton.cpp +++ b/src/LEPTON/pair_lepton.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -216,7 +217,8 @@ void PairLepton::settings(int narg, char **arg) void PairLepton::coeff(int narg, char **arg) { - if (narg < 3 || narg > 4) error->all(FLERR, "Incorrect number of args for pair coefficients" + utils::errorurl(21)); + if (narg < 3 || narg > 4) + error->all(FLERR, "Incorrect number of args for pair coefficients" + utils::errorurl(21)); if (!allocated) allocate(); int ilo, ihi, jlo, jhi; @@ -277,7 +279,9 @@ void PairLepton::coeff(int narg, char **arg) double PairLepton::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); offset[i][j] = 0.0; if (offset_flag) { diff --git a/src/MACHDYN/pair_smd_hertz.cpp b/src/MACHDYN/pair_smd_hertz.cpp index 32b488ef03..fcdaae76bd 100644 --- a/src/MACHDYN/pair_smd_hertz.cpp +++ b/src/MACHDYN/pair_smd_hertz.cpp @@ -34,6 +34,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -252,37 +253,37 @@ void PairHertz::settings(int narg, char **arg) { ------------------------------------------------------------------------- */ void PairHertz::coeff(int narg, char **arg) { - if (narg != 3) - error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); - if (!allocated) - allocate(); + if (narg != 3) + error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); + if (!allocated) + allocate(); - int ilo, ihi, jlo, jhi; - utils::bounds(FLERR,arg[0], 1, atom->ntypes, ilo, ihi, error); - utils::bounds(FLERR,arg[1], 1, atom->ntypes, jlo, jhi, error); + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR,arg[0], 1, atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR,arg[1], 1, atom->ntypes, jlo, jhi, error); - double bulkmodulus_one = utils::numeric(FLERR,arg[2],false,lmp); + double bulkmodulus_one = utils::numeric(FLERR,arg[2],false,lmp); - // set short-range force constant - double kn_one = 0.0; - if (domain->dimension == 3) { - kn_one = (16. / 15.) * bulkmodulus_one; //assuming poisson ratio = 1/4 for 3d - } else { - kn_one = 0.251856195 * (2. / 3.) * bulkmodulus_one; //assuming poisson ratio = 1/3 for 2d - } + // set short-range force constant + double kn_one = 0.0; + if (domain->dimension == 3) { + kn_one = (16. / 15.) * bulkmodulus_one; //assuming poisson ratio = 1/4 for 3d + } else { + kn_one = 0.251856195 * (2. / 3.) * bulkmodulus_one; //assuming poisson ratio = 1/3 for 2d + } - int count = 0; - for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo, i); j <= jhi; j++) { - bulkmodulus[i][j] = bulkmodulus_one; - kn[i][j] = kn_one; - setflag[i][j] = 1; - count++; - } - } + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + bulkmodulus[i][j] = bulkmodulus_one; + kn[i][j] = kn_one; + setflag[i][j] = 1; + count++; + } + } - if (count == 0) - error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); + if (count == 0) + error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- @@ -291,26 +292,27 @@ void PairHertz::coeff(int narg, char **arg) { double PairHertz::init_one(int i, int j) { - if (!allocated) - allocate(); + if (!allocated) + allocate(); - if (setflag[i][j] == 0) - error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); - bulkmodulus[j][i] = bulkmodulus[i][j]; - kn[j][i] = kn[i][j]; + bulkmodulus[j][i] = bulkmodulus[i][j]; + kn[j][i] = kn[i][j]; - // cutoff = sum of max I,J radii for - // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen + // cutoff = sum of max I,J radii for + // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen - double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; - cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); - cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); + double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; + cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); + cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); - if (comm->me == 0) { - printf("cutoff for pair smd/hertz = %f\n", cutoff); - } - return cutoff; + if (comm->me == 0) { + printf("cutoff for pair smd/hertz = %f\n", cutoff); + } + return cutoff; } /* ---------------------------------------------------------------------- diff --git a/src/MACHDYN/pair_smd_tlsph.cpp b/src/MACHDYN/pair_smd_tlsph.cpp index a1c8fbf1ea..72ea1b4d5f 100644 --- a/src/MACHDYN/pair_smd_tlsph.cpp +++ b/src/MACHDYN/pair_smd_tlsph.cpp @@ -34,6 +34,7 @@ #include "fix.h" #include "force.h" #include "group.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neighbor.h" @@ -1553,10 +1554,11 @@ double PairTlsph::init_one(int i, int j) { allocate(); if (setflag[i][j] == 0) - error->all(FLERR, "All pair coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); if (force->newton == 1) - error->all(FLERR, "Pair style tlsph requires newton off"); + error->all(FLERR, Error::NOLASTLINE, "Pair style tlsph requires newton off"); // cutoff = sum of max I,J radii for // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen diff --git a/src/MACHDYN/pair_smd_triangulated_surface.cpp b/src/MACHDYN/pair_smd_triangulated_surface.cpp index da9d5faa12..c50b7700f6 100644 --- a/src/MACHDYN/pair_smd_triangulated_surface.cpp +++ b/src/MACHDYN/pair_smd_triangulated_surface.cpp @@ -34,6 +34,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -334,37 +335,37 @@ void PairTriSurf::settings(int narg, char **arg) { ------------------------------------------------------------------------- */ void PairTriSurf::coeff(int narg, char **arg) { - if (narg != 3) - error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); - if (!allocated) - allocate(); + if (narg != 3) + error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); + if (!allocated) + allocate(); - int ilo, ihi, jlo, jhi; - utils::bounds(FLERR,arg[0], 1,atom->ntypes, ilo, ihi, error); - utils::bounds(FLERR,arg[1], 1,atom->ntypes, jlo, jhi, error); + int ilo, ihi, jlo, jhi; + utils::bounds(FLERR,arg[0], 1,atom->ntypes, ilo, ihi, error); + utils::bounds(FLERR,arg[1], 1,atom->ntypes, jlo, jhi, error); - double bulkmodulus_one = utils::numeric(FLERR,arg[2],false,lmp); + double bulkmodulus_one = utils::numeric(FLERR,arg[2],false,lmp); - // set short-range force constant - double kn_one = 0.0; - if (domain->dimension == 3) { - kn_one = (16. / 15.) * bulkmodulus_one; //assuming poisson ratio = 1/4 for 3d - } else { - kn_one = 0.251856195 * (2. / 3.) * bulkmodulus_one; //assuming poisson ratio = 1/3 for 2d - } + // set short-range force constant + double kn_one = 0.0; + if (domain->dimension == 3) { + kn_one = (16. / 15.) * bulkmodulus_one; //assuming poisson ratio = 1/4 for 3d + } else { + kn_one = 0.251856195 * (2. / 3.) * bulkmodulus_one; //assuming poisson ratio = 1/3 for 2d + } - int count = 0; - for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo, i); j <= jhi; j++) { - bulkmodulus[i][j] = bulkmodulus_one; - kn[i][j] = kn_one; - setflag[i][j] = 1; - count++; - } - } + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo, i); j <= jhi; j++) { + bulkmodulus[i][j] = bulkmodulus_one; + kn[i][j] = kn_one; + setflag[i][j] = 1; + count++; + } + } - if (count == 0) - error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); + if (count == 0) + error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- @@ -373,26 +374,26 @@ void PairTriSurf::coeff(int narg, char **arg) { double PairTriSurf::init_one(int i, int j) { - if (!allocated) - allocate(); + if (!allocated) + allocate(); - if (setflag[i][j] == 0) - error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); - bulkmodulus[j][i] = bulkmodulus[i][j]; - kn[j][i] = kn[i][j]; + bulkmodulus[j][i] = bulkmodulus[i][j]; + kn[j][i] = kn[i][j]; - // cutoff = sum of max I,J radii for - // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen + // cutoff = sum of max I,J radii for + // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen - double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; - cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); - cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); + double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; + cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); + cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); - if (comm->me == 0) { - printf("cutoff for pair smd/smd/tri_surface = %f\n", cutoff); - } - return cutoff; + if (comm->me == 0) utils::logmesg(lmp, "cutoff for pair smd/smd/tri_surface = {}\n", cutoff); + + return cutoff; } /* ---------------------------------------------------------------------- diff --git a/src/MACHDYN/pair_smd_ulsph.cpp b/src/MACHDYN/pair_smd_ulsph.cpp index 20897a7852..7cbd8c1192 100644 --- a/src/MACHDYN/pair_smd_ulsph.cpp +++ b/src/MACHDYN/pair_smd_ulsph.cpp @@ -29,6 +29,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -932,385 +933,385 @@ void PairULSPH::settings(int narg, char **arg) { ------------------------------------------------------------------------- */ void PairULSPH::coeff(int narg, char **arg) { - int ioffset, iarg, iNextKwd, itype, jtype; - std::string s, t; + int ioffset, iarg, iNextKwd, itype, jtype; + std::string s, t; - if (narg < 3) utils::missing_cmd_args(FLERR, "pair ulsph", error); + if (narg < 3) utils::missing_cmd_args(FLERR, "pair ulsph", error); - if (!allocated) allocate(); + if (!allocated) allocate(); + + /* + * if parameters are give in i,i form, i.e., no a cross interaction, set material parameters + */ + + if (utils::inumeric(FLERR, arg[0], false, lmp) == utils::inumeric(FLERR, arg[1], false, lmp)) { + + itype = utils::inumeric(FLERR, arg[0],false,lmp); + eos[itype] = viscosity[itype] = strength[itype] = NONE; + + if (comm->me == 0) { + printf("\n>>========>>========>>========>>========>>========>>========>>========>>========\n"); + printf("...SMD / ULSPH PROPERTIES OF PARTICLE TYPE %d\n\n", itype); + } + + /* + * read parameters which are common -- regardless of material / eos model + */ + + ioffset = 2; + if (strcmp(arg[ioffset], "*COMMON") != 0) error->all(FLERR, "common keyword missing!"); + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *COMMON"); + + if (iNextKwd - ioffset != 5 + 1) + error->all(FLERR, "expected 5 arguments following *COMMON but got {}\n", iNextKwd - ioffset - 1); + + Lookup[REFERENCE_DENSITY][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[REFERENCE_SOUNDSPEED][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Q1[itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + Lookup[HEAT_CAPACITY][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); + Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); + + Lookup[BULK_MODULUS][itype] = Lookup[REFERENCE_SOUNDSPEED][itype] * Lookup[REFERENCE_SOUNDSPEED][itype] + * Lookup[REFERENCE_DENSITY][itype]; + + if (comm->me == 0) { + printf("material unspecific properties for SMD/ULSPH definition of particle type %d:\n", itype); + printf(FORMAT1, "reference density", Lookup[REFERENCE_DENSITY][itype]); + printf(FORMAT1, "reference speed of sound", Lookup[REFERENCE_SOUNDSPEED][itype]); + printf(FORMAT1, "linear viscosity coefficient", Q1[itype]); + printf(FORMAT1, "heat capacity [energy / (mass * temperature)]", Lookup[HEAT_CAPACITY][itype]); + printf(FORMAT1, "bulk modulus", Lookup[BULK_MODULUS][itype]); + printf(FORMAT1, "hourglass control amplitude", Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype]); + } + + /* + * read following material cards + */ + + while (true) { + if (strcmp(arg[iNextKwd], "*END") == 0) { + break; + } + + ioffset = iNextKwd; + if (strcmp(arg[ioffset], "*EOS_TAIT") == 0) { /* - * if parameters are give in i,i form, i.e., no a cross interaction, set material parameters + * Tait EOS */ - if (utils::inumeric(FLERR, arg[0], false, lmp) == utils::inumeric(FLERR, arg[1], false, lmp)) { - - itype = utils::inumeric(FLERR, arg[0],false,lmp); - eos[itype] = viscosity[itype] = strength[itype] = NONE; - - if (comm->me == 0) { - printf("\n>>========>>========>>========>>========>>========>>========>>========>>========\n"); - printf("...SMD / ULSPH PROPERTIES OF PARTICLE TYPE %d\n\n", itype); - } - - /* - * read parameters which are common -- regardless of material / eos model - */ - - ioffset = 2; - if (strcmp(arg[ioffset], "*COMMON") != 0) error->all(FLERR, "common keyword missing!"); - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *COMMON"); - - if (iNextKwd - ioffset != 5 + 1) - error->all(FLERR, "expected 5 arguments following *COMMON but got {}\n", iNextKwd - ioffset - 1); - - Lookup[REFERENCE_DENSITY][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[REFERENCE_SOUNDSPEED][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Q1[itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - Lookup[HEAT_CAPACITY][itype] = utils::numeric(FLERR, arg[ioffset + 4],false,lmp); - Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype] = utils::numeric(FLERR, arg[ioffset + 5],false,lmp); - - Lookup[BULK_MODULUS][itype] = Lookup[REFERENCE_SOUNDSPEED][itype] * Lookup[REFERENCE_SOUNDSPEED][itype] - * Lookup[REFERENCE_DENSITY][itype]; - - if (comm->me == 0) { - printf("material unspecific properties for SMD/ULSPH definition of particle type %d:\n", itype); - printf(FORMAT1, "reference density", Lookup[REFERENCE_DENSITY][itype]); - printf(FORMAT1, "reference speed of sound", Lookup[REFERENCE_SOUNDSPEED][itype]); - printf(FORMAT1, "linear viscosity coefficient", Q1[itype]); - printf(FORMAT1, "heat capacity [energy / (mass * temperature)]", Lookup[HEAT_CAPACITY][itype]); - printf(FORMAT1, "bulk modulus", Lookup[BULK_MODULUS][itype]); - printf(FORMAT1, "hourglass control amplitude", Lookup[HOURGLASS_CONTROL_AMPLITUDE][itype]); - } - - /* - * read following material cards - */ - - while (true) { - if (strcmp(arg[iNextKwd], "*END") == 0) { - break; - } - - ioffset = iNextKwd; - if (strcmp(arg[ioffset], "*EOS_TAIT") == 0) { - - /* - * Tait EOS - */ - - eos[itype] = EOS_TAIT; - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_TAIT"); - - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *EOS_TAIT but got {}\n", iNextKwd - ioffset - 1); - - Lookup[EOS_TAIT_EXPONENT][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "Tait EOS"); - printf(FORMAT1, "Exponent", Lookup[EOS_TAIT_EXPONENT][itype]); - } - } // end Tait EOS - - else if (strcmp(arg[ioffset], "*EOS_PERFECT_GAS") == 0) { - - /* - * Perfect Gas EOS - */ - - eos[itype] = EOS_PERFECT_GAS; - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_PERFECT_GAS"); - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *EOS_PERFECT_GAS but got {}\n", iNextKwd - ioffset - 1); - - Lookup[EOS_PERFECT_GAS_GAMMA][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "Perfect Gas EOS"); - printf(FORMAT1, "Heat Capacity Ratio Gamma", Lookup[EOS_PERFECT_GAS_GAMMA][itype]); - } - } // end Perfect Gas EOS - else if (strcmp(arg[ioffset], "*EOS_LINEAR") == 0) { - - /* - * Linear EOS - */ - - eos[itype] = EOS_LINEAR; - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_LINEAR"); - if (iNextKwd - ioffset != 0 + 1) - error->all(FLERR, "expected 0 arguments following *EOS_LINEAR but got {}\n", iNextKwd - ioffset - 1); - - if (comm->me == 0) { - printf(FORMAT2, "Linear EOS"); - printf(FORMAT1, "Bulk modulus", Lookup[BULK_MODULUS][itype]); - } - } // end Linear EOS - else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR_PLASTIC") == 0) { - - if (!velocity_gradient) { - error->all(FLERR, "A strength model was requested but *VELOCITY_GRADIENT is not set"); - } - - /* - * linear elastic / ideal plastic material model with strength - */ - - strength[itype] = STRENGTH_LINEAR_PLASTIC; - velocity_gradient_required = true; - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR_PLASTIC"); - if (iNextKwd - ioffset != 3 + 1) - error->all(FLERR, "expected 3 arguments following *STRENGTH_LINEAR_PLASTIC but got {}\n", iNextKwd - ioffset - 1); - - Lookup[SHEAR_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - Lookup[YIELD_STRENGTH][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); - Lookup[HARDENING_PARAMETER][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "linear elastic / ideal plastic material mode"); - printf(FORMAT1, "yield_strength", Lookup[YIELD_STRENGTH][itype]); - printf(FORMAT1, "constant hardening parameter", Lookup[HARDENING_PARAMETER][itype]); - printf(FORMAT1, "shear modulus", Lookup[SHEAR_MODULUS][itype]); - } - } // end *STRENGTH_LINEAR_PLASTIC - else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR") == 0) { - - if (!velocity_gradient) { - error->all(FLERR, "A strength model was requested but *VELOCITY_GRADIENT is not set"); - } - - /* - * linear elastic / ideal plastic material model with strength - */ - - strength[itype] = STRENGTH_LINEAR; - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR"); - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *STRENGTH_LINEAR but got {}\n", iNextKwd - ioffset - 1); - - Lookup[SHEAR_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "linear elastic strength model"); - printf(FORMAT1, "shear modulus", Lookup[SHEAR_MODULUS][itype]); - } - } // end *STRENGTH_LINEAR - else if (strcmp(arg[ioffset], "*VISCOSITY_NEWTON") == 0) { - - if (!velocity_gradient) { - error->all(FLERR, "A viscosity model was requested but *VELOCITY_GRADIENT is not set"); - } - - /* - * linear elastic / ideal plastic material model with strength - */ - - viscosity[itype] = VISCOSITY_NEWTON; - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *VISCOSITY_NEWTON"); - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *VISCOSITY_NEWTON but got {}\n", iNextKwd - ioffset - 1); - - Lookup[VISCOSITY_MU][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "Newton viscosity model"); - printf(FORMAT1, "viscosity mu", Lookup[VISCOSITY_MU][itype]); - } - } // end *STRENGTH_VISCOSITY_NEWTON - - else if (strcmp(arg[ioffset], "*ARTIFICIAL_PRESSURE") == 0) { - - /* - * use Monaghan's artificial pressure to prevent particle clumping - */ - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *ARTIFICIAL_PRESSURE"); - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *ARTIFICIAL_PRESSURE but got {}\n", iNextKwd - ioffset - 1); - - artificial_pressure[itype][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "Artificial Pressure is enabled."); - printf(FORMAT1, "Artificial Pressure amplitude", artificial_pressure[itype][itype]); - } - } // end *ARTIFICIAL_PRESSURE - - else if (strcmp(arg[ioffset], "*ARTIFICIAL_STRESS") == 0) { - - /* - * use Monaghan's artificial stress to prevent particle clumping - */ - - t = string("*"); - iNextKwd = -1; - for (iarg = ioffset + 1; iarg < narg; iarg++) { - s = string(arg[iarg]); - if (s.compare(0, t.length(), t) == 0) { - iNextKwd = iarg; - break; - } - } - - if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *ARTIFICIAL_STRESS"); - if (iNextKwd - ioffset != 1 + 1) - error->all(FLERR, "expected 1 arguments following *ARTIFICIAL_STRESS but got {}\n", iNextKwd - ioffset - 1); - - artificial_stress[itype][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); - - if (comm->me == 0) { - printf(FORMAT2, "Artificial Stress is enabled."); - printf(FORMAT1, "Artificial Stress amplitude", artificial_stress[itype][itype]); - } - } // end *ARTIFICIAL_STRESS - - else error->all(FLERR, "unknown *KEYWORD: {}", arg[ioffset]); - } - - /* - * copy data which is looked up in inner pairwise loops from slow maps to fast arrays - */ - - rho0[itype] = Lookup[REFERENCE_DENSITY][itype]; - c0_type[itype] = Lookup[REFERENCE_SOUNDSPEED][itype]; - setflag[itype][itype] = 1; - - /* - * error checks - */ - - if ((viscosity[itype] != NONE) && (strength[itype] != NONE)) - error->all(FLERR, "cannot have both a strength and viscosity model for particle type {}", itype); - - if (eos[itype] == NONE) - error->all(FLERR, "must specify an EOS for particle type {}", itype); - - } else { - /* - * we are reading a cross-interaction line for particle types i, j - */ - - itype = utils::inumeric(FLERR, arg[0],false,lmp); - jtype = utils::inumeric(FLERR, arg[1],false,lmp); - - if (strcmp(arg[2], "*CROSS") != 0) - error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, *CROSS keyword is missing", - itype, jtype); - - if (setflag[itype][itype] != 1) - error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, properties of type {} have not yet been specified", itype, jtype, itype); - - if (setflag[jtype][jtype] != 1) - error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, properties of type {} have not yet been specified", itype, jtype, jtype); - - setflag[itype][jtype] = 1; - setflag[jtype][itype] = 1; - - if ((artificial_pressure[itype][itype] > 0.0) && (artificial_pressure[jtype][jtype] > 0.0)) { - artificial_pressure[itype][jtype] = 0.5 * (artificial_pressure[itype][itype] + artificial_pressure[jtype][jtype]); - artificial_pressure[jtype][itype] = artificial_pressure[itype][jtype]; - } else { - artificial_pressure[itype][jtype] = artificial_pressure[jtype][itype] = 0.0; - } - - if ((artificial_stress[itype][itype] > 0.0) && (artificial_stress[jtype][jtype] > 0.0)) { - artificial_stress[itype][jtype] = 0.5 * (artificial_stress[itype][itype] + artificial_stress[jtype][jtype]); - artificial_stress[jtype][itype] = artificial_stress[itype][jtype]; - } else { - artificial_stress[itype][jtype] = artificial_stress[jtype][itype] = 0.0; - } - - if (comm->me == 0) { - printf(">>========>>========>>========>>========>>========>>========>>========>>========\n"); - } - + eos[itype] = EOS_TAIT; + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_TAIT"); + + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *EOS_TAIT but got {}\n", iNextKwd - ioffset - 1); + + Lookup[EOS_TAIT_EXPONENT][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "Tait EOS"); + printf(FORMAT1, "Exponent", Lookup[EOS_TAIT_EXPONENT][itype]); + } + } // end Tait EOS + + else if (strcmp(arg[ioffset], "*EOS_PERFECT_GAS") == 0) { + + /* + * Perfect Gas EOS + */ + + eos[itype] = EOS_PERFECT_GAS; + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_PERFECT_GAS"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *EOS_PERFECT_GAS but got {}\n", iNextKwd - ioffset - 1); + + Lookup[EOS_PERFECT_GAS_GAMMA][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "Perfect Gas EOS"); + printf(FORMAT1, "Heat Capacity Ratio Gamma", Lookup[EOS_PERFECT_GAS_GAMMA][itype]); + } + } // end Perfect Gas EOS + else if (strcmp(arg[ioffset], "*EOS_LINEAR") == 0) { + + /* + * Linear EOS + */ + + eos[itype] = EOS_LINEAR; + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *EOS_LINEAR"); + if (iNextKwd - ioffset != 0 + 1) + error->all(FLERR, "expected 0 arguments following *EOS_LINEAR but got {}\n", iNextKwd - ioffset - 1); + + if (comm->me == 0) { + printf(FORMAT2, "Linear EOS"); + printf(FORMAT1, "Bulk modulus", Lookup[BULK_MODULUS][itype]); + } + } // end Linear EOS + else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR_PLASTIC") == 0) { + + if (!velocity_gradient) { + error->all(FLERR, "A strength model was requested but *VELOCITY_GRADIENT is not set"); + } + + /* + * linear elastic / ideal plastic material model with strength + */ + + strength[itype] = STRENGTH_LINEAR_PLASTIC; + velocity_gradient_required = true; + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR_PLASTIC"); + if (iNextKwd - ioffset != 3 + 1) + error->all(FLERR, "expected 3 arguments following *STRENGTH_LINEAR_PLASTIC but got {}\n", iNextKwd - ioffset - 1); + + Lookup[SHEAR_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + Lookup[YIELD_STRENGTH][itype] = utils::numeric(FLERR, arg[ioffset + 2],false,lmp); + Lookup[HARDENING_PARAMETER][itype] = utils::numeric(FLERR, arg[ioffset + 3],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "linear elastic / ideal plastic material mode"); + printf(FORMAT1, "yield_strength", Lookup[YIELD_STRENGTH][itype]); + printf(FORMAT1, "constant hardening parameter", Lookup[HARDENING_PARAMETER][itype]); + printf(FORMAT1, "shear modulus", Lookup[SHEAR_MODULUS][itype]); + } + } // end *STRENGTH_LINEAR_PLASTIC + else if (strcmp(arg[ioffset], "*STRENGTH_LINEAR") == 0) { + + if (!velocity_gradient) { + error->all(FLERR, "A strength model was requested but *VELOCITY_GRADIENT is not set"); + } + + /* + * linear elastic / ideal plastic material model with strength + */ + + strength[itype] = STRENGTH_LINEAR; + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *STRENGTH_LINEAR"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *STRENGTH_LINEAR but got {}\n", iNextKwd - ioffset - 1); + + Lookup[SHEAR_MODULUS][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "linear elastic strength model"); + printf(FORMAT1, "shear modulus", Lookup[SHEAR_MODULUS][itype]); + } + } // end *STRENGTH_LINEAR + else if (strcmp(arg[ioffset], "*VISCOSITY_NEWTON") == 0) { + + if (!velocity_gradient) { + error->all(FLERR, "A viscosity model was requested but *VELOCITY_GRADIENT is not set"); + } + + /* + * linear elastic / ideal plastic material model with strength + */ + + viscosity[itype] = VISCOSITY_NEWTON; + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *VISCOSITY_NEWTON"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *VISCOSITY_NEWTON but got {}\n", iNextKwd - ioffset - 1); + + Lookup[VISCOSITY_MU][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "Newton viscosity model"); + printf(FORMAT1, "viscosity mu", Lookup[VISCOSITY_MU][itype]); + } + } // end *STRENGTH_VISCOSITY_NEWTON + + else if (strcmp(arg[ioffset], "*ARTIFICIAL_PRESSURE") == 0) { + + /* + * use Monaghan's artificial pressure to prevent particle clumping + */ + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *ARTIFICIAL_PRESSURE"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *ARTIFICIAL_PRESSURE but got {}\n", iNextKwd - ioffset - 1); + + artificial_pressure[itype][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "Artificial Pressure is enabled."); + printf(FORMAT1, "Artificial Pressure amplitude", artificial_pressure[itype][itype]); + } + } // end *ARTIFICIAL_PRESSURE + + else if (strcmp(arg[ioffset], "*ARTIFICIAL_STRESS") == 0) { + + /* + * use Monaghan's artificial stress to prevent particle clumping + */ + + t = string("*"); + iNextKwd = -1; + for (iarg = ioffset + 1; iarg < narg; iarg++) { + s = string(arg[iarg]); + if (s.compare(0, t.length(), t) == 0) { + iNextKwd = iarg; + break; + } + } + + if (iNextKwd < 0) error->all(FLERR, "no *KEYWORD terminates *ARTIFICIAL_STRESS"); + if (iNextKwd - ioffset != 1 + 1) + error->all(FLERR, "expected 1 arguments following *ARTIFICIAL_STRESS but got {}\n", iNextKwd - ioffset - 1); + + artificial_stress[itype][itype] = utils::numeric(FLERR, arg[ioffset + 1],false,lmp); + + if (comm->me == 0) { + printf(FORMAT2, "Artificial Stress is enabled."); + printf(FORMAT1, "Artificial Stress amplitude", artificial_stress[itype][itype]); + } + } // end *ARTIFICIAL_STRESS + + else error->all(FLERR, "unknown *KEYWORD: {}", arg[ioffset]); + } + + /* + * copy data which is looked up in inner pairwise loops from slow maps to fast arrays + */ + + rho0[itype] = Lookup[REFERENCE_DENSITY][itype]; + c0_type[itype] = Lookup[REFERENCE_SOUNDSPEED][itype]; + setflag[itype][itype] = 1; + + /* + * error checks + */ + + if ((viscosity[itype] != NONE) && (strength[itype] != NONE)) + error->all(FLERR, "cannot have both a strength and viscosity model for particle type {}", itype); + + if (eos[itype] == NONE) + error->all(FLERR, "must specify an EOS for particle type {}", itype); + + } else { + /* + * we are reading a cross-interaction line for particle types i, j + */ + + itype = utils::inumeric(FLERR, arg[0],false,lmp); + jtype = utils::inumeric(FLERR, arg[1],false,lmp); + + if (strcmp(arg[2], "*CROSS") != 0) + error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, *CROSS keyword is missing", + itype, jtype); + + if (setflag[itype][itype] != 1) + error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, properties of type {} have not yet been specified", itype, jtype, itype); + + if (setflag[jtype][jtype] != 1) + error->all(FLERR, "ulsph cross interaction between particle type {} and {} requested, however, properties of type {} have not yet been specified", itype, jtype, jtype); + + setflag[itype][jtype] = 1; + setflag[jtype][itype] = 1; + + if ((artificial_pressure[itype][itype] > 0.0) && (artificial_pressure[jtype][jtype] > 0.0)) { + artificial_pressure[itype][jtype] = 0.5 * (artificial_pressure[itype][itype] + artificial_pressure[jtype][jtype]); + artificial_pressure[jtype][itype] = artificial_pressure[itype][jtype]; + } else { + artificial_pressure[itype][jtype] = artificial_pressure[jtype][itype] = 0.0; + } + + if ((artificial_stress[itype][itype] > 0.0) && (artificial_stress[jtype][jtype] > 0.0)) { + artificial_stress[itype][jtype] = 0.5 * (artificial_stress[itype][itype] + artificial_stress[jtype][jtype]); + artificial_stress[jtype][itype] = artificial_stress[itype][jtype]; + } else { + artificial_stress[itype][jtype] = artificial_stress[jtype][itype] = 0.0; + } + + if (comm->me == 0) { + printf(">>========>>========>>========>>========>>========>>========>>========>>========\n"); + } + + } } /* ---------------------------------------------------------------------- @@ -1319,17 +1320,19 @@ void PairULSPH::coeff(int narg, char **arg) { double PairULSPH::init_one(int i, int j) { - if (!allocated) allocate(); + if (!allocated) allocate(); - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); // cutoff = sum of max I,J radii for // dynamic/dynamic & dynamic/frozen interactions, but not frozen/frozen - double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; - cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); - cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); - return cutoff; + double cutoff = maxrad_dynamic[i] + maxrad_dynamic[j]; + cutoff = MAX(cutoff, maxrad_frozen[i] + maxrad_dynamic[j]); + cutoff = MAX(cutoff, maxrad_dynamic[i] + maxrad_frozen[j]); + return cutoff; } /* ---------------------------------------------------------------------- diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 4a3c3351ba..705fa34f8b 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -27,6 +27,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "my_page.h" @@ -259,7 +260,9 @@ void PairAIREBO::init_style() double PairAIREBO::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); // convert to C,H types diff --git a/src/MANYBODY/pair_atm.cpp b/src/MANYBODY/pair_atm.cpp index 3d7e5e2600..03f11c1625 100644 --- a/src/MANYBODY/pair_atm.cpp +++ b/src/MANYBODY/pair_atm.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -269,7 +270,7 @@ void PairATM::coeff(int narg, char **arg) void PairATM::init_style() { if (force->newton_pair == 0) - error->all(FLERR,"Pair style ATM requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style ATM requires newton pair on"); // need a full neighbor list @@ -283,7 +284,9 @@ void PairATM::init_style() double PairATM::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); // set all 6 symmetric permutations of I,J,K types to same nu value diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index ae50736455..a158b91f03 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -42,6 +42,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "neigh_list.h" @@ -437,7 +438,9 @@ void PairBOP::init_style() double PairBOP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); int itype = map[i]; int jtype = map[j]; diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 609e4efcf8..f3cd29b43d 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -26,6 +26,7 @@ #include "error.h" #include "force.h" #include "group.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "math_special.h" @@ -466,11 +467,11 @@ void PairComb::coeff(int narg, char **arg) void PairComb::init_style() { if (atom->tag_enable == 0) - error->all(FLERR,"Pair style COMB requires atom IDs"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB requires atom IDs"); if (force->newton_pair == 0) - error->all(FLERR,"Pair style COMB requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB requires newton pair on"); if (!atom->q_flag) - error->all(FLERR,"Pair style COMB requires atom attribute q"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB requires atom attribute q"); // ptr to QEQ fix @@ -509,7 +510,9 @@ void PairComb::init_style() double PairComb::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 3a02ed73b1..bc74bf6361 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -25,6 +25,7 @@ #include "error.h" #include "force.h" #include "group.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "math_special.h" @@ -208,11 +209,11 @@ void PairComb3::coeff(int narg, char **arg) void PairComb3::init_style() { if (atom->tag_enable == 0) - error->all(FLERR,"Pair style COMB3 requires atom IDs"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB3 requires atom IDs"); if (force->newton_pair == 0) - error->all(FLERR,"Pair style COMB3 requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB3 requires newton pair on"); if (!atom->q_flag) - error->all(FLERR,"Pair style COMB3 requires atom attribute q"); + error->all(FLERR, Error::NOLASTLINE, "Pair style COMB3 requires atom attribute q"); // need a full neighbor list neighbor->add_request(this, NeighConst::REQ_FULL | NeighConst::REQ_GHOST); @@ -243,7 +244,9 @@ void PairComb3::init_style() double PairComb3::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cutghost[j][i] = cutghost[i][j] = cutmax; return cutmax; } diff --git a/src/MANYBODY/pair_edip.cpp b/src/MANYBODY/pair_edip.cpp index 1eac053ebd..b94e743f8e 100644 --- a/src/MANYBODY/pair_edip.cpp +++ b/src/MANYBODY/pair_edip.cpp @@ -27,6 +27,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -740,7 +741,8 @@ void PairEDIP::coeff(int narg, char **arg) void PairEDIP::init_style() { - if (force->newton_pair == 0) error->all(FLERR, "Pair style edip requires newton pair on"); + if (force->newton_pair == 0) + error->all(FLERR, Error::NOLASTLINE, "Pair style edip requires newton pair on"); // need a full neighbor list @@ -753,7 +755,9 @@ void PairEDIP::init_style() double PairEDIP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_edip_multi.cpp b/src/MANYBODY/pair_edip_multi.cpp index 32e21861f3..e8bca44ac4 100644 --- a/src/MANYBODY/pair_edip_multi.cpp +++ b/src/MANYBODY/pair_edip_multi.cpp @@ -25,6 +25,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_extra.h" #include "memory.h" #include "neigh_list.h" @@ -570,7 +571,9 @@ void PairEDIPMulti::init_style() double PairEDIPMulti::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_extep.cpp b/src/MANYBODY/pair_extep.cpp index 607106b4ce..6915ee81cb 100644 --- a/src/MANYBODY/pair_extep.cpp +++ b/src/MANYBODY/pair_extep.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" @@ -498,7 +499,9 @@ void PairExTeP::init_style() double PairExTeP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutmax ; cutghost[j][i] = cutghost[i][j]; diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp index 471896851a..5255cf4905 100644 --- a/src/MANYBODY/pair_gw.cpp +++ b/src/MANYBODY/pair_gw.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" @@ -279,9 +280,9 @@ void PairGW::coeff(int narg, char **arg) void PairGW::init_style() { if (atom->tag_enable == 0) - error->all(FLERR,"Pair style GW requires atom IDs"); + error->all(FLERR, Error::NOLASTLINE, "Pair style GW requires atom IDs"); if (force->newton_pair == 0) - error->all(FLERR,"Pair style GW requires newton pair on"); + error->all(FLERR, Error::NOLASTLINE, "Pair style GW requires newton pair on"); // need a full neighbor list @@ -294,7 +295,9 @@ void PairGW::init_style() double PairGW::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index 75fd0f441e..3e8020c3af 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -20,13 +20,14 @@ #include "pair_lcbop.h" #include "atom.h" -#include "force.h" #include "comm.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "my_page.h" -#include "memory.h" #include "error.h" +#include "force.h" +#include "info.h" +#include "memory.h" +#include "my_page.h" +#include "neigh_list.h" +#include "neighbor.h" #include #include @@ -180,7 +181,9 @@ void PairLCBOP::init_style() double PairLCBOP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); // cut3rebo = 3 SR distances diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index 51e554694c..db7e6ea080 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -208,7 +209,9 @@ void PairNb3bHarmonic::init_style() double PairNb3bHarmonic::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index 535fb766bc..bdda442497 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -26,6 +26,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_extra.h" #include "memory.h" #include "neigh_list.h" @@ -529,7 +530,9 @@ void PairPolymorphic::init_style() double PairPolymorphic::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_rebomos.cpp b/src/MANYBODY/pair_rebomos.cpp index b8f3c6fde5..d912c37290 100644 --- a/src/MANYBODY/pair_rebomos.cpp +++ b/src/MANYBODY/pair_rebomos.cpp @@ -33,6 +33,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_special.h" #include "memory.h" #include "my_page.h" @@ -242,7 +243,9 @@ void PairREBOMoS::init_style() double PairREBOMoS::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); // convert to Mo,S types diff --git a/src/MANYBODY/pair_sw.cpp b/src/MANYBODY/pair_sw.cpp index a28e523831..0c864bf292 100644 --- a/src/MANYBODY/pair_sw.cpp +++ b/src/MANYBODY/pair_sw.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -334,7 +335,9 @@ void PairSW::init_style() double PairSW::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index e3c8c83416..f0d52d3075 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "math_special.h" @@ -405,7 +406,9 @@ void PairTersoff::init_style() double PairTersoff::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_tersoff_table.cpp b/src/MANYBODY/pair_tersoff_table.cpp index b2aec2653c..3e26682300 100644 --- a/src/MANYBODY/pair_tersoff_table.cpp +++ b/src/MANYBODY/pair_tersoff_table.cpp @@ -27,6 +27,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -750,7 +751,9 @@ void PairTersoffTable::init_style() double PairTersoffTable::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_threebody_table.cpp b/src/MANYBODY/pair_threebody_table.cpp index 20b26edbfa..1fa771a6d0 100644 --- a/src/MANYBODY/pair_threebody_table.cpp +++ b/src/MANYBODY/pair_threebody_table.cpp @@ -22,6 +22,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -263,7 +264,9 @@ void PairThreebodyTable::init_style() double PairThreebodyTable::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp index 79df1f36d7..a65bce917f 100644 --- a/src/MANYBODY/pair_vashishta.cpp +++ b/src/MANYBODY/pair_vashishta.cpp @@ -23,6 +23,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" @@ -278,7 +279,9 @@ void PairVashishta::init_style() double PairVashishta::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MISC/pair_agni.cpp b/src/MISC/pair_agni.cpp index cbc6cf6c92..041302b702 100644 --- a/src/MISC/pair_agni.cpp +++ b/src/MISC/pair_agni.cpp @@ -21,8 +21,9 @@ #include "atom.h" #include "citeme.h" #include "comm.h" -#include "force.h" #include "error.h" +#include "force.h" +#include "info.h" #include "math_const.h" #include "math_special.h" #include "memory.h" @@ -254,7 +255,9 @@ void PairAGNI::init_style() double PairAGNI::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/MISC/pair_srp.cpp b/src/MISC/pair_srp.cpp index 1fe19bc30c..65397aa22a 100644 --- a/src/MISC/pair_srp.cpp +++ b/src/MISC/pair_srp.cpp @@ -35,6 +35,7 @@ Please contact Timothy Sirk for questions (tim.sirk@us.army.mil). #include "error.h" #include "fix_srp.h" #include "force.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -394,19 +395,19 @@ void PairSRP::settings(int narg, char **arg) void PairSRP::coeff(int narg, char **arg) { if (narg < 3 || narg > 4) - error->all(FLERR,"PairSRP: Incorrect args for pair coeff"); + error->all(FLERR,"Incorrect args for pair coefficients" + utils::errorurl(21)); if (!allocated) allocate(); if (btype_str.size() > 0) { btype = utils::expand_type_int(FLERR, btype_str, Atom::BOND, lmp); if ((btype > atom->nbondtypes) || (btype <= 0)) - error->all(FLERR,"Invalid bond type {} for pair style srp", btype); + error->all(FLERR, Error::NOLASTLINE, "Invalid bond type {} for pair style srp", btype); } if (bptype_str.size() > 0) bptype = utils::expand_type_int(FLERR, bptype_str, Atom::ATOM, lmp); if ((bptype < 1) || (bptype > atom->ntypes)) - error->all(FLERR,"Invalid bond particle type {} for pair style srp", bptype); + error->all(FLERR, Error::NOLASTLINE, "Invalid bond particle type {} for pair style srp", bptype); // reset cutoffs if explicitly set if (allocated) { @@ -493,7 +494,9 @@ void PairSRP::init_style() double PairSRP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"PairSRP: All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; a0[j][i] = a0[i][j]; diff --git a/src/ML-IAP/pair_mliap.cpp b/src/ML-IAP/pair_mliap.cpp index b72e9bd481..b379501c4d 100644 --- a/src/ML-IAP/pair_mliap.cpp +++ b/src/ML-IAP/pair_mliap.cpp @@ -35,6 +35,7 @@ #include "atom.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neighbor.h" @@ -357,7 +358,10 @@ void PairMLIAP::init_style() double PairMLIAP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); + double cutmax = sqrt(descriptor->cutsq[map[i]][map[j]]); cutghost[i][j] = cutghost[j][i] = 2.0 * cutmax + neighbor->skin; return cutmax; diff --git a/src/ML-PACE/pair_pace.cpp b/src/ML-PACE/pair_pace.cpp index e9bd25f9d7..56dd34916f 100644 --- a/src/ML-PACE/pair_pace.cpp +++ b/src/ML-PACE/pair_pace.cpp @@ -31,6 +31,7 @@ Copyright 2021 Yury Lysogorskiy^1, Cas van der Oord^2, Anton Bochkarev^1, #include "atom.h" #include "comm.h" #include "error.h" +#include "info.h" #include "force.h" #include "math_const.h" #include "memory.h" @@ -387,7 +388,9 @@ void PairPACE::init_style() double PairPACE::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); //cutoff from the basis set's radial functions settings scale[j][i] = scale[i][j]; return aceimpl->basis_set->radial_functions->cut(map[i], map[j]); diff --git a/src/ML-PACE/pair_pace_extrapolation.cpp b/src/ML-PACE/pair_pace_extrapolation.cpp index ec42d232af..957e53d0ad 100644 --- a/src/ML-PACE/pair_pace_extrapolation.cpp +++ b/src/ML-PACE/pair_pace_extrapolation.cpp @@ -27,6 +27,7 @@ Copyright 2022 Yury Lysogorskiy^1, Anton Bochkarev^1, Matous Mrovec^1, Ralf Drau #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -439,7 +440,9 @@ void PairPACEExtrapolation::init_style() double PairPACEExtrapolation::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); //cutoff from the basis set's radial functions settings scale[j][i] = scale[i][j]; return aceimpl->basis_set->radial_functions->cut(map[i], map[j]); diff --git a/src/ML-POD/pair_pod.cpp b/src/ML-POD/pair_pod.cpp index f76191328f..6762653413 100644 --- a/src/ML-POD/pair_pod.cpp +++ b/src/ML-POD/pair_pod.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_special.h" #include "memory.h" @@ -335,7 +336,9 @@ void PairPOD::init_style() double PairPOD::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); double rcut = 0.0; rcut = fastpodptr->rcut; diff --git a/src/ML-SNAP/pair_snap.cpp b/src/ML-SNAP/pair_snap.cpp index 5011256dd2..3e7d1aaa42 100644 --- a/src/ML-SNAP/pair_snap.cpp +++ b/src/ML-SNAP/pair_snap.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -453,10 +454,11 @@ void PairSNAP::init_style() double PairSNAP::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); scale[j][i] = scale[i][j]; - return (radelem[map[i]] + - radelem[map[j]])*rcutfac; + return (radelem[map[i]] + radelem[map[j]])*rcutfac; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOFFF/pair_buck6d_coul_gauss_dsf.cpp b/src/MOFFF/pair_buck6d_coul_gauss_dsf.cpp index ced0528ac6..a4fcfa4ebd 100644 --- a/src/MOFFF/pair_buck6d_coul_gauss_dsf.cpp +++ b/src/MOFFF/pair_buck6d_coul_gauss_dsf.cpp @@ -25,6 +25,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -327,7 +328,9 @@ void PairBuck6dCoulGaussDSF::init_style() double PairBuck6dCoulGaussDSF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/MOFFF/pair_buck6d_coul_gauss_long.cpp b/src/MOFFF/pair_buck6d_coul_gauss_long.cpp index 72919312e5..6bb6357775 100644 --- a/src/MOFFF/pair_buck6d_coul_gauss_long.cpp +++ b/src/MOFFF/pair_buck6d_coul_gauss_long.cpp @@ -24,6 +24,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "memory.h" #include "neigh_list.h" @@ -365,7 +366,9 @@ void PairBuck6dCoulGaussLong::init_style() double PairBuck6dCoulGaussLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j],cut_coul); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/OPENMP/domain_omp.cpp b/src/OPENMP/domain_omp.cpp index 32eebe45e9..668a26ce78 100644 --- a/src/OPENMP/domain_omp.cpp +++ b/src/OPENMP/domain_omp.cpp @@ -55,7 +55,7 @@ void DomainOMP::pbc() #endif // clang-format on for (int i = 0; i < n3; i++) if (!std::isfinite(coord[i])) flag = 1; - if (flag) error->one(FLERR, "Non-numeric atom coords - simulation unstable"); + if (flag) error->one(FLERR, "Non-numeric atom coords - simulation unstable" + utils::errorurl(6)); auto *_noalias const x = (dbl3_t *) atom->x[0]; auto *_noalias const v = (dbl3_t *) atom->v[0]; diff --git a/src/OPENMP/msm_cg_omp.cpp b/src/OPENMP/msm_cg_omp.cpp index 111d2bf4e4..008d27f99a 100644 --- a/src/OPENMP/msm_cg_omp.cpp +++ b/src/OPENMP/msm_cg_omp.cpp @@ -330,7 +330,7 @@ void MSMCGOMP::particle_map() int i; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR, Error::NOLASTLINE, "Non-numeric box dimensions - simulation unstable"); + error->one(FLERR, Error::NOLASTLINE, "Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); // XXX: O(N). is it worth to add OpenMP here? for (int j = 0; j < num_charged; j++) { @@ -357,8 +357,8 @@ void MSMCGOMP::particle_map() } if (flag) - error->one(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute MSM{}", - utils::errorurl(4)); + error->one(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute MSM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_disp_omp.cpp b/src/OPENMP/pppm_disp_omp.cpp index 6fceca6a14..e7f8d1c360 100644 --- a/src/OPENMP/pppm_disp_omp.cpp +++ b/src/OPENMP/pppm_disp_omp.cpp @@ -358,7 +358,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, const int nzhi_out = nzhi_o; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions. Simulation unstable."); + error->one(FLERR,"Non-numeric box dimensions. Simulation unstable."+utils::errorurl(6)); int flag = 0; #if defined(_OPENMP) @@ -388,7 +388,7 @@ void PPPMDispOMP::particle_map(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_disp_tip4p_omp.cpp b/src/OPENMP/pppm_disp_tip4p_omp.cpp index d3a9c9528c..7cadbbb2ac 100644 --- a/src/OPENMP/pppm_disp_tip4p_omp.cpp +++ b/src/OPENMP/pppm_disp_tip4p_omp.cpp @@ -354,7 +354,7 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, const int nzhi_out = nzhi_o; if (!std::isfinite(boxlo[0]) || !std::isfinite(boxlo[1]) || !std::isfinite(boxlo[2])) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; #if defined(_OPENMP) @@ -392,7 +392,9 @@ void PPPMDispTIP4POMP::particle_map_c(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) + error->all(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- @@ -460,7 +462,9 @@ void PPPMDispTIP4POMP::particle_map(double dxinv, double dyinv, int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM"); + if (flag_all) + error->all(FLERR, Error::NOLASTLINE, + "Out of range atoms - cannot compute PPPM", utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/pppm_tip4p_omp.cpp b/src/OPENMP/pppm_tip4p_omp.cpp index 640b7d4d35..e2cf98b0d2 100644 --- a/src/OPENMP/pppm_tip4p_omp.cpp +++ b/src/OPENMP/pppm_tip4p_omp.cpp @@ -350,7 +350,7 @@ void PPPMTIP4POMP::particle_map() const int nlocal = atom->nlocal; if (!std::isfinite(boxlox) || !std::isfinite(boxloy) || !std::isfinite(boxloz)) - error->one(FLERR,"Non-numeric box dimensions - simulation unstable"); + error->one(FLERR,"Non-numeric box dimensions - simulation unstable" + utils::errorurl(6)); int flag = 0; #if defined(_OPENMP) @@ -388,7 +388,7 @@ void PPPMTIP4POMP::particle_map() int flag_all; MPI_Allreduce(&flag,&flag_all,1,MPI_INT,MPI_SUM,world); - if (flag_all) error->all(FLERR,"Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); + if (flag_all) error->all(FLERR, Error::NOLASTLINE, "Out of range atoms - cannot compute PPPM" + utils::errorurl(4)); } /* ---------------------------------------------------------------------- diff --git a/src/OPENMP/reaxff_forces_omp.cpp b/src/OPENMP/reaxff_forces_omp.cpp index ce8ad0716f..e27460c425 100644 --- a/src/OPENMP/reaxff_forces_omp.cpp +++ b/src/OPENMP/reaxff_forces_omp.cpp @@ -37,6 +37,7 @@ #include using namespace LAMMPS_NS; +using utils::errorurl; namespace ReaxFF { /* ---------------------------------------------------------------------- */ @@ -182,8 +183,8 @@ namespace ReaxFF { if (End_Index(i, bonds) > comp) system->error_ptr->one(FLERR, fmt::format("step {}: bondchk failed: " - "i={} end(i)={} str(i+1)={}\n", - step,i,End_Index(i,bonds),comp)); + "i={} end(i)={} str(i+1)={}{}", + step,i,End_Index(i,bonds),comp,errorurl(18))); } } @@ -207,8 +208,9 @@ namespace ReaxFF { if (End_Index(Hindex, hbonds) > comp) system->error_ptr->one(FLERR, fmt::format("step {}: hbondchk failed: " - "H={} end(H)={} str(H+1)={}\n", - step, Hindex,End_Index(Hindex,hbonds),comp)); + "H={} end(H)={} str(H+1)={}{}", + step, Hindex,End_Index(Hindex,hbonds),comp, + errorurl(18))); } } } diff --git a/src/PERI/pair_peri_eps.cpp b/src/PERI/pair_peri_eps.cpp index fccfee60c7..c0732d48e4 100644 --- a/src/PERI/pair_peri_eps.cpp +++ b/src/PERI/pair_peri_eps.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "fix_peri_neigh.h" #include "force.h" +#include "info.h" #include "lattice.h" #include "math_const.h" #include "math_special.h" @@ -397,7 +398,9 @@ void PairPeriEPS::coeff(int narg, char **arg) double PairPeriEPS::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); bulkmodulus[j][i] = bulkmodulus[i][j]; shearmodulus[j][i] = shearmodulus[i][j]; diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index 34420b6ef2..b7b7e6577a 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "fix_peri_neigh.h" #include "force.h" +#include "info.h" #include "lattice.h" #include "math_const.h" #include "memory.h" @@ -341,7 +342,9 @@ void PairPeriLPS::coeff(int narg, char **arg) double PairPeriLPS::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); bulkmodulus[j][i] = bulkmodulus[i][j]; shearmodulus[j][i] = shearmodulus[i][j]; diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index 85c16f6ff8..0bacb3a2f0 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "fix_peri_neigh.h" #include "force.h" +#include "info.h" #include "lattice.h" #include "memory.h" #include "neigh_list.h" @@ -278,7 +279,9 @@ void PairPeriPMB::coeff(int narg, char **arg) double PairPeriPMB::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); kspring[j][i] = kspring[i][j]; alpha[j][i] = alpha[i][j]; diff --git a/src/PERI/pair_peri_ves.cpp b/src/PERI/pair_peri_ves.cpp index 24f6deb2d8..d814ce6f05 100644 --- a/src/PERI/pair_peri_ves.cpp +++ b/src/PERI/pair_peri_ves.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "fix_peri_neigh.h" #include "force.h" +#include "info.h" #include "lattice.h" #include "memory.h" #include "neigh_list.h" @@ -385,7 +386,9 @@ void PairPeriVES::coeff(int narg, char **arg) double PairPeriVES::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); bulkmodulus[j][i] = bulkmodulus[i][j]; shearmodulus[j][i] = shearmodulus[i][j]; diff --git a/src/PHONON/dynamical_matrix.cpp b/src/PHONON/dynamical_matrix.cpp index a0199747c4..bdcf9c36f3 100644 --- a/src/PHONON/dynamical_matrix.cpp +++ b/src/PHONON/dynamical_matrix.cpp @@ -112,7 +112,7 @@ void DynamicalMatrix::command(int narg, char **arg) MPI_Comm_rank(world,&me); if (domain->box_exist == 0) - error->all(FLERR,"Dynamical_matrix command before simulation box is defined"); + error->all(FLERR,"Dynamical_matrix command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) error->all(FLERR,"Illegal dynamical_matrix command"); lmp->init(); diff --git a/src/PHONON/third_order.cpp b/src/PHONON/third_order.cpp index 378905bd29..e1d9161ef1 100644 --- a/src/PHONON/third_order.cpp +++ b/src/PHONON/third_order.cpp @@ -118,7 +118,7 @@ void ThirdOrder::command(int narg, char **arg) MPI_Comm_rank(world,&me); if (domain->box_exist == 0) - error->all(FLERR,"third_order command before simulation box is defined"); + error->all(FLERR,"third_order command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) error->all(FLERR,"Illegal third_order command"); // request a full neighbor list for use by this command diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index bbfb4d8a0b..8c54dc96cb 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -336,7 +336,8 @@ void FixQEq::init() MPI_Allreduce(&qsum_local,&qsum,1,MPI_DOUBLE,MPI_SUM,world); if ((comm->me == 0) && (fabs(qsum) > QSUMSMALL)) - error->warning(FLERR,"Fix {} group is not charge neutral, net charge = {:.8}", style, qsum); + error->warning(FLERR,"Fix {} group is not charge neutral, net charge = {:.8}{}", + style, qsum, utils::errorurl(29)); } /* ---------------------------------------------------------------------- */ diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index b36d9e79aa..dd48b836fd 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -30,6 +30,7 @@ #include "error.h" #include "fix_reaxff.h" #include "force.h" +#include "info.h" #include "memory.h" #include "modify.h" #include "neigh_list.h" @@ -442,7 +443,9 @@ void PairReaxFF::setup() double PairReaxFF::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cutghost[i][j] = cutghost[j][i] = cutmax; return cutmax; diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index 2c7d13766f..df853642b4 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -52,7 +52,7 @@ void Hyper::command(int narg, char **arg) // error checks if (domain->box_exist == 0) - error->all(FLERR,"Hyper command before simulation box is defined"); + error->all(FLERR,"Hyper command before simulation box is defined" + utils::errorurl(33)); if (narg < 4) error->all(FLERR,"Illegal hyper command"); diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 4b242965c8..a65fc9a58f 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -113,7 +113,7 @@ NEB::~NEB() void NEB::command(int narg, char **arg) { if (domain->box_exist == 0) - error->universe_all(FLERR, "NEB command before simulation box is defined"); + error->universe_all(FLERR, "NEB command before simulation box is defined" + utils::errorurl(33)); if (narg < 6) error->universe_all(FLERR, "Illegal NEB command: missing argument(s)"); diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 91150d8a38..493fb4da54 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -60,7 +60,7 @@ void PRD::command(int narg, char **arg) // error checks if (domain->box_exist == 0) - error->all(FLERR,"PRD command before simulation box is defined"); + error->all(FLERR,"PRD command before simulation box is defined" + utils::errorurl(33)); if (universe->nworlds != universe->nprocs && atom->map_style == Atom::MAP_NONE) error->all(FLERR,"Cannot use PRD with multi-processor replicas " diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 38ddfceb84..14f816b15e 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -74,7 +74,7 @@ void TAD::command(int narg, char **arg) // error checks if (domain->box_exist == 0) - error->all(FLERR,"Tad command before simulation box is defined"); + error->all(FLERR,"Tad command before simulation box is defined" + utils::errorurl(33)); if (universe->nworlds == 1) error->all(FLERR,"Cannot use TAD with a single replica for NEB"); if (universe->nworlds != universe->nprocs) diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index 77bc45e6e3..a7416418be 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -64,7 +64,7 @@ void Temper::command(int narg, char **arg) if (universe->nworlds == 1) error->universe_all(FLERR,"More than one processor partition required for temper command"); if (domain->box_exist == 0) - error->universe_all(FLERR,"Temper command before simulation box is defined"); + error->universe_all(FLERR,"Temper command before simulation box is defined" + utils::errorurl(33)); if (narg != 6 && narg != 7) error->universe_all(FLERR,"Illegal temper command"); int nsteps = utils::inumeric(FLERR,arg[0],false,lmp); diff --git a/src/REPLICA/temper_grem.cpp b/src/REPLICA/temper_grem.cpp index c4509791c3..9ef0fe8a4a 100644 --- a/src/REPLICA/temper_grem.cpp +++ b/src/REPLICA/temper_grem.cpp @@ -66,7 +66,7 @@ void TemperGrem::command(int narg, char **arg) if (universe->nworlds == 1) error->universe_all(FLERR,"More than one processor partition required for temper/grem command"); if (domain->box_exist == 0) - error->universe_all(FLERR,"Temper/grem command before simulation box is defined"); + error->universe_all(FLERR,"Temper/grem command before simulation box is defined" + utils::errorurl(33)); if (narg != 7 && narg != 8) error->universe_all(FLERR,"Illegal temper/grem command"); int nsteps = utils::inumeric(FLERR,arg[0],false,lmp); diff --git a/src/REPLICA/temper_npt.cpp b/src/REPLICA/temper_npt.cpp index aa72047fe7..4c04ecfe7b 100644 --- a/src/REPLICA/temper_npt.cpp +++ b/src/REPLICA/temper_npt.cpp @@ -66,7 +66,7 @@ void TemperNPT::command(int narg, char **arg) if (universe->nworlds == 1) error->universe_all(FLERR,"More than one processor partition required for temper/npt command"); if (domain->box_exist == 0) - error->universe_all(FLERR,"Temper/npt command before simulation box is defined"); + error->universe_all(FLERR,"Temper/npt command before simulation box is defined" + utils::errorurl(33)); if (narg != 7 && narg != 8) error->universe_all(FLERR,"Illegal temper/npt command"); int nsteps = utils::inumeric(FLERR,arg[0],false,lmp); diff --git a/src/RHEO/pair_rheo.cpp b/src/RHEO/pair_rheo.cpp index 5e06c45a3c..0fdd711ba5 100644 --- a/src/RHEO/pair_rheo.cpp +++ b/src/RHEO/pair_rheo.cpp @@ -28,6 +28,7 @@ #include "fix_rheo.h" #include "fix_rheo_pressure.h" #include "force.h" +#include "info.h" #include "math_extra.h" #include "memory.h" #include "modify.h" @@ -451,7 +452,7 @@ void PairRHEO::settings(int narg, char **arg) void PairRHEO::coeff(int narg, char **arg) { - if (narg != 2) error->all(FLERR, "Incorrect number of args for pair_style rheo coefficients"); + if (narg != 2) error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); if (!allocated) allocate(); int ilo, ihi, jlo, jhi; @@ -466,7 +467,7 @@ void PairRHEO::coeff(int narg, char **arg) } } - if (count == 0) error->all(FLERR, "Incorrect args for pair rheo coefficients"); + if (count == 0) error->all(FLERR, "Incorrect args for pair coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- @@ -527,7 +528,9 @@ void PairRHEO::setup() double PairRHEO::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair rheo coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, "All pair rheo coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); return cutk; } diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 41708823bb..89b8ffd942 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -596,8 +596,8 @@ void FixShake::pre_neighbor() atom1 = atom->map(shake_atom[i][0]); atom2 = atom->map(shake_atom[i][1]); if (atom1 == -1 || atom2 == -1) - error->one(FLERR,"Shake atoms {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} missing on proc {} at step {}{}",shake_atom[i][0], + shake_atom[i][1],comm->me,update->ntimestep,utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); if (i <= atom1 && i <= atom2) { @@ -611,9 +611,9 @@ void FixShake::pre_neighbor() atom2 = atom->map(shake_atom[i][1]); atom3 = atom->map(shake_atom[i][2]); if (atom1 == -1 || atom2 == -1 || atom3 == -1) - error->one(FLERR,"Shake atoms {} {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],shake_atom[i][2], - comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} {} missing on proc {} at step {}{}",shake_atom[i][0], + shake_atom[i][1],shake_atom[i][2],comm->me,update->ntimestep, + utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); atom3 = domain->closest_image(i, atom3); @@ -630,9 +630,9 @@ void FixShake::pre_neighbor() atom3 = atom->map(shake_atom[i][2]); atom4 = atom->map(shake_atom[i][3]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) - error->one(FLERR,"Shake atoms {} {} {} {} missing on proc {} at step {}",shake_atom[i][0], - shake_atom[i][1],shake_atom[i][2], - shake_atom[i][3],comm->me,update->ntimestep); + error->one(FLERR,"Shake atoms {} {} {} {} missing on proc {} at step {}{}", + shake_atom[i][0],shake_atom[i][1],shake_atom[i][2],shake_atom[i][3], + comm->me,update->ntimestep,utils::errorurl(5)); atom1 = domain->closest_image(i, atom1); atom2 = domain->closest_image(i, atom2); atom3 = domain->closest_image(i, atom3); diff --git a/src/SMTBQ/pair_smatb.cpp b/src/SMTBQ/pair_smatb.cpp index 0b97a62c32..f0449f8619 100644 --- a/src/SMTBQ/pair_smatb.cpp +++ b/src/SMTBQ/pair_smatb.cpp @@ -20,6 +20,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "info.h" #include "force.h" #include "memory.h" #include "neigh_list.h" @@ -352,7 +353,8 @@ double PairSMATB::init_one(int i, int j) cutOffStart[i][j] = MIN(cutOffStart[i][i], cutOffStart[j][j]); cutOffEnd[i][j] = MAX(cutOffEnd[i][i], cutOffEnd[j][j]); - error->all(FLERR, "All pair coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); } double es = cutOffEnd[i][j] - cutOffStart[i][j]; diff --git a/src/SMTBQ/pair_smatb_single.cpp b/src/SMTBQ/pair_smatb_single.cpp index fb72971c90..b509955a5e 100644 --- a/src/SMTBQ/pair_smatb_single.cpp +++ b/src/SMTBQ/pair_smatb_single.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -296,7 +297,9 @@ void PairSMATBSingle::init_style() double PairSMATBSingle::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); //calculating the polynomial linking to zero double es = cutOffEnd - cutOffStart; diff --git a/src/SMTBQ/pair_smtbq.cpp b/src/SMTBQ/pair_smtbq.cpp index 78ac34aea4..6d5008c637 100644 --- a/src/SMTBQ/pair_smtbq.cpp +++ b/src/SMTBQ/pair_smtbq.cpp @@ -47,6 +47,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "math_extra.h" #include "math_special.h" @@ -306,7 +307,9 @@ void PairSMTBQ::init_style() double PairSMTBQ::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); return cutmax; } diff --git a/src/SPH/pair_sph_heatconduction.cpp b/src/SPH/pair_sph_heatconduction.cpp index 0bff61d190..bb163c0eff 100644 --- a/src/SPH/pair_sph_heatconduction.cpp +++ b/src/SPH/pair_sph_heatconduction.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -204,9 +205,10 @@ void PairSPHHeatConduction::coeff(int narg, char **arg) double PairSPHHeatConduction::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/heatconduction coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/heatconduction coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; alpha[j][i] = alpha[i][j]; diff --git a/src/SPH/pair_sph_idealgas.cpp b/src/SPH/pair_sph_idealgas.cpp index 97cbda2ab3..fc4bd6a9da 100644 --- a/src/SPH/pair_sph_idealgas.cpp +++ b/src/SPH/pair_sph_idealgas.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -30,7 +31,9 @@ using namespace LAMMPS_NS; PairSPHIdealGas::PairSPHIdealGas(LAMMPS *lmp) : Pair(lmp) { if ((atom->esph_flag != 1) || (atom->rho_flag != 1) || (atom->vest_flag != 1)) - error->all(FLERR, "Pair sph/idealgas requires atom attributes energy, density, and velocity estimates, e.g. in atom_style sph"); + error->all(FLERR, Error::NOLASTLINE, + "Pair sph/idealgas requires atom attributes energy, density, and velocity estimates," + " e.g. in atom_style sph"); restartinfo = 0; single_enable = 0; @@ -211,8 +214,7 @@ void PairSPHIdealGas::settings(int narg, char **/*arg*/) void PairSPHIdealGas::coeff(int narg, char **arg) { - if (narg != 4) - error->all(FLERR,"Incorrect number of args for pair_style sph/idealgas coefficients"); + if (narg != 4) error->all(FLERR,"Incorrect args for pair coefficients" + utils::errorurl(21)); if (!allocated) allocate(); @@ -233,8 +235,7 @@ void PairSPHIdealGas::coeff(int narg, char **arg) } } - if (count == 0) - error->all(FLERR,"Incorrect args for pair sph/idealgas coefficients"); + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients" + utils::errorurl(21)); } /* ---------------------------------------------------------------------- @@ -243,9 +244,10 @@ void PairSPHIdealGas::coeff(int narg, char **arg) double PairSPHIdealGas::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/idealgas coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/idealgas coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_lj.cpp b/src/SPH/pair_sph_lj.cpp index 6f05c45638..533cd06a29 100644 --- a/src/SPH/pair_sph_lj.cpp +++ b/src/SPH/pair_sph_lj.cpp @@ -18,6 +18,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -256,7 +257,9 @@ void PairSPHLJ::coeff(int narg, char **arg) double PairSPHLJ::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/lj coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/lj coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; @@ -265,30 +268,6 @@ double PairSPHLJ::init_one(int i, int j) return cut[i][j]; } -/*double PairSPHLJ::LJEOS2(double rho, double e, double cv) { - - - double T = e / cv; - if (T < 1.e-2) T = 1.e-2; - //printf("%f %f\n", T, rho); - double iT = 0.1e1 / T; - //double itpow1_4 = exp(0.25 * log(iT)); //pow(iT, 0.1e1 / 0.4e1); - double itpow1_4 = pow(iT, 0.1e1 / 0.4e1); - double x = rho * itpow1_4; - double xsq = x * x; - double xpow3 = xsq * x; - double xpow4 = xsq * xsq; - double xpow9 = xpow3 * xpow3 * xpow3; - - - return (0.1e1 + rho * (0.3629e1 + 0.7264e1 * x + 0.104925e2 * xsq + 0.11460e2 - * xpow3 + 0.21760e1 * xpow9 - itpow1_4 * itpow1_4 * (0.5369e1 + 0.13160e2 - * x + 0.18525e2 * xsq - 0.17076e2 * xpow3 + 0.9320e1 * xpow4) + iT - * (-0.3492e1 + 0.18698e2 * x - 0.35505e2 * xsq + 0.31816e2 * xpow3 - - 0.11195e2 * xpow4)) * itpow1_4) * rho * T; -}*/ - - /* --------------------------------------------------------------------------------------------- */ /* Lennard-Jones EOS, Francis H. Ree diff --git a/src/SPH/pair_sph_rhosum.cpp b/src/SPH/pair_sph_rhosum.cpp index 97062b16c1..e4c2b7c918 100644 --- a/src/SPH/pair_sph_rhosum.cpp +++ b/src/SPH/pair_sph_rhosum.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "domain.h" #include "error.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "neighbor.h" @@ -30,7 +31,8 @@ using namespace LAMMPS_NS; PairSPHRhoSum::PairSPHRhoSum(LAMMPS *lmp) : Pair(lmp) { if (atom->rho_flag != 1) - error->all(FLERR, "Pair sph/rhosum requires atom attribute density, e.g. in atom_style sph"); + error->all(FLERR, Error::NOLASTLINE, + "Pair sph/rhosum requires atom attribute density, e.g. in atom_style sph"); restartinfo = 0; @@ -206,7 +208,7 @@ void PairSPHRhoSum::allocate() void PairSPHRhoSum::settings(int narg, char **arg) { if (narg != 1) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Illegal number of arguments for pair_style sph/rhosum"); nstep = utils::inumeric(FLERR,arg[0],false,lmp); } @@ -247,9 +249,10 @@ void PairSPHRhoSum::coeff(int narg, char **arg) double PairSPHRhoSum::init_one(int i, int j) { - if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/rhosum coeffs are not set"); - } + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/rhosum coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_taitwater.cpp b/src/SPH/pair_sph_taitwater.cpp index 442ac833cb..892146f367 100644 --- a/src/SPH/pair_sph_taitwater.cpp +++ b/src/SPH/pair_sph_taitwater.cpp @@ -19,6 +19,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -264,7 +265,9 @@ void PairSPHTaitwater::coeff(int narg, char **arg) double PairSPHTaitwater::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR, "All pair sph/taitwater coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/taitwater coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; diff --git a/src/SPH/pair_sph_taitwater_morris.cpp b/src/SPH/pair_sph_taitwater_morris.cpp index 48493a1e09..e05b7c1283 100644 --- a/src/SPH/pair_sph_taitwater_morris.cpp +++ b/src/SPH/pair_sph_taitwater_morris.cpp @@ -19,6 +19,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -31,7 +32,8 @@ using namespace LAMMPS_NS; PairSPHTaitwaterMorris::PairSPHTaitwaterMorris(LAMMPS *lmp) : Pair(lmp) { if ((atom->esph_flag != 1) || (atom->rho_flag != 1) || (atom->vest_flag != 1)) - error->all(FLERR, "Pair sph/taitwater/morris requires atom attributes energy, density, and velocity estimates, e.g. in atom_style sph"); + error->all(FLERR, Error::NOLASTLINE, "Pair sph/taitwater/morris requires atom attributes " + "energy, density, and velocity estimates, e.g. in atom_style sph"); restartinfo = 0; first = 1; @@ -214,7 +216,7 @@ void PairSPHTaitwaterMorris::allocate() void PairSPHTaitwaterMorris::settings(int narg, char **/*arg*/) { if (narg != 0) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Illegal number of arguments for pair_style sph/taitwater/morris"); } @@ -265,7 +267,9 @@ void PairSPHTaitwaterMorris::coeff(int narg, char **arg) double PairSPHTaitwaterMorris::init_one(int i, int j) { if (setflag[i][j] == 0) { - error->all(FLERR,"All pair sph/taitwater/morris coeffs are not set"); + error->all(FLERR, Error::NOLASTLINE, + "All pair sph/taitwater/morris coeffs are not set. Status:\n" + + Info::get_pair_coeff_status(lmp)); } cut[j][i] = cut[i][j]; diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 00b92b906a..34d5a37b17 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -95,7 +95,7 @@ NEBSpin::~NEBSpin() void NEBSpin::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"NEBSpin command before simulation box is defined"); + error->all(FLERR,"NEBSpin command before simulation box is defined" + utils::errorurl(33)); if (narg < 6) error->universe_all(FLERR,"Illegal NEBSpin command"); diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 8e5c125895..867a3dbe8e 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -28,6 +28,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -127,7 +128,9 @@ void PairSpinDipoleCut::coeff(int narg, char **arg) double PairSpinDipoleCut::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cut_spin_long[j][i] = cut_spin_long[i][j]; diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index 8f03c37b7c..12f278cfb2 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -24,6 +24,7 @@ #include "error.h" #include "ewald_const.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "memory.h" @@ -140,7 +141,9 @@ void PairSpinDipoleLong::init_style() double PairSpinDipoleLong::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); cut_spin_long[j][i] = cut_spin_long[i][j]; diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 6dec238163..1170413fe0 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -28,6 +28,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -135,7 +136,9 @@ void PairSpinDmi::coeff(int narg, char **arg) double PairSpinDmi::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); DM[j][i] = DM[i][j]; v_dmx[j][i] = v_dmx[i][j]; diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index b0c9edef27..a807e303a5 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -27,6 +27,7 @@ #include "atom.h" #include "comm.h" #include "error.h" +#include "info.h" #include "force.h" #include "memory.h" #include "neigh_list.h" @@ -143,7 +144,9 @@ void PairSpinExchange::coeff(int narg, char **arg) double PairSpinExchange::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); J1_mag[j][i] = J1_mag[i][j]; J1_mech[j][i] = J1_mech[i][j]; diff --git a/src/SPIN/pair_spin_exchange_biquadratic.cpp b/src/SPIN/pair_spin_exchange_biquadratic.cpp index 7c50659b45..24e75f9c2c 100644 --- a/src/SPIN/pair_spin_exchange_biquadratic.cpp +++ b/src/SPIN/pair_spin_exchange_biquadratic.cpp @@ -28,6 +28,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -153,7 +154,9 @@ void PairSpinExchangeBiquadratic::coeff(int narg, char **arg) double PairSpinExchangeBiquadratic::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); J1_mag[j][i] = J1_mag[i][j]; J1_mech[j][i] = J1_mech[i][j]; diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 3d22a652b3..daba2564d6 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -28,6 +28,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -130,7 +131,9 @@ void PairSpinMagelec::coeff(int narg, char **arg) double PairSpinMagelec::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status\n" + Info::get_pair_coeff_status(lmp)); ME[j][i] = ME[i][j]; ME_mech[j][i] = ME_mech[i][j]; diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index a9ed7d6966..320bc001a4 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -28,6 +28,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -135,7 +136,9 @@ void PairSpinNeel::coeff(int narg, char **arg) double PairSpinNeel::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); g1[j][i] = g1[i][j]; g1_mech[j][i] = g1_mech[i][j]; diff --git a/src/TALLY/compute_force_tally.cpp b/src/TALLY/compute_force_tally.cpp index 6b09cac785..5dd3d1958d 100644 --- a/src/TALLY/compute_force_tally.cpp +++ b/src/TALLY/compute_force_tally.cpp @@ -182,7 +182,7 @@ double ComputeForceTally::compute_scalar() error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum accumulated forces across procs @@ -201,7 +201,7 @@ void ComputeForceTally::compute_peratom() error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_heat_flux_tally.cpp b/src/TALLY/compute_heat_flux_tally.cpp index 65b66db7d0..5c53328b32 100644 --- a/src/TALLY/compute_heat_flux_tally.cpp +++ b/src/TALLY/compute_heat_flux_tally.cpp @@ -69,7 +69,8 @@ ComputeHeatFluxTally::~ComputeHeatFluxTally() void ComputeHeatFluxTally::init() { if (force->pair == nullptr) - error->all(FLERR, "Trying to use compute heat/flux/tally without pair style"); + error->all(FLERR, Error::NOLASTLINE, + "Trying to use compute heat/flux/tally without pair style"); else force->pair->add_tally_callback(this); @@ -205,10 +206,11 @@ void ComputeHeatFluxTally::compute_vector() { invoked_vector = update->ntimestep; if ((did_setup != invoked_vector) || (update->eflag_global != invoked_vector)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_heat_flux_virial_tally.cpp b/src/TALLY/compute_heat_flux_virial_tally.cpp index a87732c15e..20b287dde4 100644 --- a/src/TALLY/compute_heat_flux_virial_tally.cpp +++ b/src/TALLY/compute_heat_flux_virial_tally.cpp @@ -191,10 +191,11 @@ double ComputeHeatFluxVirialTally::compute_scalar() invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum heat flux across procs double hflux = 0.0; @@ -213,10 +214,11 @@ void ComputeHeatFluxVirialTally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_pe_mol_tally.cpp b/src/TALLY/compute_pe_mol_tally.cpp index e5ddb57568..1aecc1165f 100644 --- a/src/TALLY/compute_pe_mol_tally.cpp +++ b/src/TALLY/compute_pe_mol_tally.cpp @@ -126,10 +126,11 @@ void ComputePEMolTally::compute_vector() { invoked_vector = update->ntimestep; if ((did_setup != invoked_vector) || (update->eflag_global != invoked_vector)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // sum accumulated energies across procs diff --git a/src/TALLY/compute_pe_tally.cpp b/src/TALLY/compute_pe_tally.cpp index d77cfe2646..6fde2126f7 100644 --- a/src/TALLY/compute_pe_tally.cpp +++ b/src/TALLY/compute_pe_tally.cpp @@ -167,10 +167,11 @@ double ComputePETally::compute_scalar() { invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // sum accumulated energies across procs @@ -186,10 +187,11 @@ void ComputePETally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Energy was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Energy was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Energy was not tallied by pair style"); + error->warning(FLERR, "Energy was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/TALLY/compute_stress_tally.cpp b/src/TALLY/compute_stress_tally.cpp index c16e046dcf..3f264a92ce 100644 --- a/src/TALLY/compute_stress_tally.cpp +++ b/src/TALLY/compute_stress_tally.cpp @@ -202,10 +202,11 @@ double ComputeStressTally::compute_scalar() { invoked_scalar = update->ntimestep; if ((did_setup != invoked_scalar) || (update->eflag_global != invoked_scalar)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // sum accumulated forces across procs @@ -225,10 +226,11 @@ void ComputeStressTally::compute_peratom() { invoked_peratom = update->ntimestep; if ((did_setup != invoked_peratom) || (update->eflag_global != invoked_peratom)) - error->all(FLERR, Error::NOLASTLINE, "Stress was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Stress was not tallied on needed timestep" + utils::errorurl(22)); if ((comm->me == 0) && !force->pair->did_tally_callback()) - error->warning(FLERR, "Stress was not tallied by pair style"); + error->warning(FLERR, "Stress was not tallied by pair style" + utils::errorurl(11)); // collect contributions from ghost atoms diff --git a/src/VTK/dump_vtk.cpp b/src/VTK/dump_vtk.cpp index b59ec5beba..11cf79328c 100644 --- a/src/VTK/dump_vtk.cpp +++ b/src/VTK/dump_vtk.cpp @@ -224,7 +224,8 @@ void DumpVTK::init_style() error->all(FLERR,"Could not find dump vtk fix ID {}", id_fix[i]); } else { if (nevery % fix[i]->peratom_freq) - error->all(FLERR,"Dump vtk and fix ID {} not called at compatible times", id_fix[i]); + error->all(FLERR,"Dump vtk and fix ID {} not called at compatible times{}", id_fix[i], + utils::errorurl(7)); } } @@ -1810,7 +1811,8 @@ int DumpVTK::parse_fields(int narg, char **arg) if (argi.get_dim() > 0 && ifix->size_peratom_cols == 0) error->all(FLERR,"Dump vtk fix {} does not compute per-atom array",aname); if (argi.get_dim() > 0 && argi.get_index1() > ifix->size_peratom_cols) - error->all(FLERR,"Dump vtk fix {} vector is accessed out-of-range",aname); + error->all(FLERR,"Dump vtk fix {} vector is accessed out-of-range{}", + aname, utils::errorurl(20)); field2index[ATTRIBUTES+iarg] = add_fix(aname); name[ATTRIBUTES+iarg] = arg[iarg]; @@ -1850,7 +1852,8 @@ int DumpVTK::parse_fields(int narg, char **arg) if (!flag || !cols) error->all(FLERR,"Property double array {} for dump vtk does not exist",aname); if (argindex[ATTRIBUTES+iarg] > atom->dcols[n]) - error->all(FLERR,"Dump vtk property array {} is accessed out-of-range",aname); + error->all(FLERR,"Dump vtk property array {} is accessed out-of-range{}",aname, + utils::errorurl(20)); } field2index[ATTRIBUTES+iarg] = add_custom(aname,1); name[ATTRIBUTES+iarg] = arg[iarg]; @@ -1873,7 +1876,8 @@ int DumpVTK::parse_fields(int narg, char **arg) if (flag || !cols) error->all(FLERR,"Property integer array {} for dump vtk does not exist",aname); if (argindex[ATTRIBUTES+iarg] > atom->icols[n]) - error->all(FLERR,"Dump vtk property array {} is accessed out-of-range",aname); + error->all(FLERR,"Dump vtk property array {} is accessed out-of-range{}",aname, + utils::errorurl(20)); } field2index[ATTRIBUTES+iarg] = add_custom(aname,0); name[ATTRIBUTES+iarg] = arg[iarg]; diff --git a/src/angle.cpp b/src/angle.cpp index ccb53dc84f..2bbe8eb129 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "suffix.h" @@ -70,9 +71,13 @@ Angle::~Angle() void Angle::init() { - if (!allocated && atom->nangletypes) error->all(FLERR, "Angle coeffs are not set"); + if (!allocated && atom->nangletypes) + error->all(FLERR, Error::NOLASTLINE, + "Angle coeffs are not set. Status:\n" + Info::get_angle_coeff_status(lmp)); for (int i = 1; i <= atom->nangletypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All angle coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All angle coeffs are not set. Status:\n" + Info::get_angle_coeff_status(lmp)); init_style(); } diff --git a/src/angle_write.cpp b/src/angle_write.cpp index 1c1601d002..4a328a9c98 100644 --- a/src/angle_write.cpp +++ b/src/angle_write.cpp @@ -43,11 +43,11 @@ void AngleWrite::command(int narg, char **arg) // sanity checks if (domain->box_exist == 0) - error->all(FLERR, "Angle_write command before simulation box is defined"); + error->all(FLERR, "Angle_write command before simulation box is defined" + utils::errorurl(33)); if (atom->avec->angles_allow == 0) error->all(FLERR, "Angle_write command when no angles allowed"); auto angle = force->angle; - if (angle == nullptr) error->all(FLERR, "Angle_write command before an angle_style is defined"); + if (angle == nullptr) error->all(FLERR, "Angle_write command before an angle_style is defined" + utils::errorurl(33)); if (angle && (force->angle->writedata == 0)) error->all(FLERR, "Angle style must support writing coeffs to data file for angle_write"); diff --git a/src/atom.cpp b/src/atom.cpp index a3775fda7d..0e0b1350ac 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -836,13 +836,15 @@ void Atom::modify_params(int narg, char **arg) if (strcmp(arg[iarg],"id") == 0) { if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "atom_modify id", error); if (domain->box_exist) - error->all(FLERR, idx, "Atom_modify id command after simulation box is defined"); + error->all(FLERR, idx, "Atom_modify id command after simulation box is defined" + + utils::errorurl(34)); tag_enable = utils::logical(FLERR,arg[iarg+1],false,lmp); iarg += 2; } else if (strcmp(arg[iarg],"map") == 0) { if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "atom_modify map", error); if (domain->box_exist) - error->all(FLERR, idx, "Atom_modify map command after simulation box is defined"); + error->all(FLERR, idx, "Atom_modify map command after simulation box is defined" + + utils::errorurl(34)); if (strcmp(arg[iarg+1],"array") == 0) map_user = MAP_ARRAY; else if (strcmp(arg[iarg+1],"hash") == 0) map_user = MAP_HASH; else if (strcmp(arg[iarg+1],"yes") == 0) map_user = MAP_YES; diff --git a/src/balance.cpp b/src/balance.cpp index 3e45efed49..22a0938b3c 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -113,7 +113,7 @@ Balance::~Balance() void Balance::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, -1, "Balance command before simulation box is defined"); + error->all(FLERR, -1, "Balance command before simulation box is defined" + utils::errorurl(33)); if (comm->me == 0) utils::logmesg(lmp,"Balancing ...\n"); @@ -377,8 +377,8 @@ void Balance::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms) - error->all(FLERR,"Lost atoms via balance: original {} current {}"+utils::errorurl(8), - atom->natoms,natoms); + error->all(FLERR,Error::NOLASTLINE,"Lost atoms via balance: original {} current {}" + +utils::errorurl(8),atom->natoms,natoms); // imbfinal = final imbalance // set disable = 1, so weights no longer migrate with atoms diff --git a/src/bond.cpp b/src/bond.cpp index d42dd6fd24..802ac2b6c1 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neighbor.h" #include "safe_pointers.h" @@ -80,9 +81,13 @@ Bond::~Bond() void Bond::init() { - if (!allocated && atom->nbondtypes) error->all(FLERR, "Bond coeffs are not set"); + if (!allocated && atom->nbondtypes) + error->all(FLERR, Error::NOLASTLINE, + "Bond coeffs are not set. Status:\n" + Info::get_bond_coeff_status(lmp)); for (int i = 1; i <= atom->nbondtypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All bond coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All bond coeffs are not set. Status:\n" + Info::get_bond_coeff_status(lmp)); init_style(); } diff --git a/src/change_box.cpp b/src/change_box.cpp index 2a82fb9f5f..f10d6be0d7 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -45,7 +45,7 @@ void ChangeBox::command(int narg, char **arg) int i; if (domain->box_exist == 0) - error->all(FLERR,"Change_box command before simulation box is defined"); + error->all(FLERR,"Change_box command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) utils::missing_cmd_args(FLERR, "change_box", error); if (comm->me == 0) utils::logmesg(lmp,"Changing box ...\n"); @@ -378,8 +378,8 @@ void ChangeBox::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,"Lost atoms via change_box: original {} " - "current {}"+utils::errorurl(8),atom->natoms,natoms); + error->warning(FLERR,"Lost atoms via change_box: original {} current {}"+utils::errorurl(8), + atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index a1d595a086..7e6d1d41a9 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -56,7 +56,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : fchunk(nullptr), varatom(nullptr), id_fix(nullptr), fixstore(nullptr), lockfix(nullptr), chunk(nullptr), exclude(nullptr), hash(nullptr) { - if (narg < 4) error->all(FLERR, "Illegal compute chunk/atom command"); + if (narg < 4) utils::missing_cmd_args(FLERR, "compute chunk/atom", error); peratom_flag = 1; scalar_flag = 1; @@ -101,7 +101,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : which = ArgInfo::BINSPHERE; ncoord = 1; iarg = 4; - if (iarg + 6 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 6 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom bin/sphere", error); sorigin_user[0] = utils::numeric(FLERR, arg[iarg], false, lmp); sorigin_user[1] = utils::numeric(FLERR, arg[iarg + 1], false, lmp); sorigin_user[2] = utils::numeric(FLERR, arg[iarg + 2], false, lmp); @@ -126,7 +126,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : cdim1 = 0; cdim2 = 1; } - if (iarg + 5 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 5 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom bin/cylinder", error); corigin_user[dim[0]] = 0.0; corigin_user[cdim1] = utils::numeric(FLERR, arg[iarg], false, lmp); corigin_user[cdim2] = utils::numeric(FLERR, arg[iarg + 1], false, lmp); @@ -151,7 +151,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : cfvid = argi.copy_name(); if ((which == ArgInfo::UNKNOWN) || (which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, 3, "Invalid compute chunk/atom argument {}", arg[3]); iarg = 4; } @@ -178,40 +178,42 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : while (iarg < narg) { if (strcmp(arg[iarg], "region") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom region", error); if (!domain->get_region_by_id(arg[iarg + 1])) - error->all(FLERR, "Region {} for compute chunk/atom does not exist", arg[iarg + 1]); + error->all(FLERR, iarg + 1, "Region {} for compute chunk/atom does not exist", + arg[iarg + 1]); idregion = utils::strdup(arg[iarg + 1]); regionflag = 1; iarg += 2; } else if (strcmp(arg[iarg], "nchunk") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom nchunk", error); if (strcmp(arg[iarg + 1], "once") == 0) nchunkflag = ONCE; else if (strcmp(arg[iarg + 1], "every") == 0) nchunkflag = EVERY; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg + 1, "Unknown compute chunk/atom nchunk argument {}", arg[iarg + 1]); nchunksetflag = 1; iarg += 2; } else if (strcmp(arg[iarg], "limit") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom limit", error); limit = utils::inumeric(FLERR, arg[iarg + 1], false, lmp); - if (limit < 0) error->all(FLERR, "Illegal compute chunk/atom command"); + if (limit < 0) + error->all(FLERR, iarg + 1, "Illegal compute chunk/atom limit value {}", limit); if (limit && !compress) limitfirst = 1; iarg += 2; if (limit) { - if (iarg > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom limit", error); if (strcmp(arg[iarg], "max") == 0) limitstyle = LIMITMAX; else if (strcmp(arg[iarg], "exact") == 0) limitstyle = LIMITEXACT; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg, "Unknown compute chunk/atom limit keyword {}", arg[iarg]); iarg++; } } else if (strcmp(arg[iarg], "ids") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom ids", error); if (strcmp(arg[iarg + 1], "once") == 0) idsflag = ONCE; else if (strcmp(arg[iarg + 1], "nfreq") == 0) @@ -219,14 +221,14 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg + 1], "every") == 0) idsflag = EVERY; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg + 1, "Unknown compute chunk/atom ids argument {}", arg[iarg + 1]); iarg += 2; } else if (strcmp(arg[iarg], "compress") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom compress", error); compress = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; } else if (strcmp(arg[iarg], "discard") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom discard", error); if (strcmp(arg[iarg + 1], "mixed") == 0) discard = MIXED; else if (strcmp(arg[iarg + 1], "no") == 0) @@ -234,11 +236,12 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg + 1], "yes") == 0) discard = YESDISCARD; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg + 1, "Unknown compute chunk/atom discard argument {}", + arg[iarg + 1]); discardsetflag = 1; iarg += 2; } else if (strcmp(arg[iarg], "bound") == 0) { - if (iarg + 4 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 4 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom bound", error); int idim = 0; if (strcmp(arg[iarg + 1], "x") == 0) idim = 0; @@ -247,7 +250,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg + 1], "z") == 0) idim = 2; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg + 1, "Unknown compute chunk/atom bound argument {}", arg[iarg + 1]); minflag[idim] = COORD; if (strcmp(arg[iarg + 2], "lower") == 0) minflag[idim] = LOWER; @@ -260,7 +263,7 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : maxvalue[idim] = utils::numeric(FLERR, arg[iarg + 3], false, lmp); iarg += 4; } else if (strcmp(arg[iarg], "units") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom units", error); if (strcmp(arg[iarg + 1], "box") == 0) scaleflag = BOX; else if (strcmp(arg[iarg + 1], "lattice") == 0) @@ -268,14 +271,14 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg + 1], "reduced") == 0) scaleflag = REDUCED; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg + 1, "Unknown compute chunk/atom units argument {}", arg[iarg + 1]); iarg += 2; } else if (strcmp(arg[iarg], "pbc") == 0) { - if (iarg + 2 > narg) error->all(FLERR, "Illegal compute chunk/atom command"); + if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, "compute chunk/atom pbc", error); pbcflag = utils::logical(FLERR, arg[iarg + 1], false, lmp); iarg += 2; } else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg, "Unknown compute chunk/atom keyword {}", arg[iarg]); } // set nchunkflag and discard to default values if not explicitly set @@ -309,74 +312,82 @@ ComputeChunkAtom::ComputeChunkAtom(LAMMPS *lmp, int narg, char **arg) : // error checks if (which == ArgInfo::MOLECULE && !atom->molecule_flag) - error->all(FLERR, "Compute chunk/atom molecule for non-molecular system"); + error->all(FLERR, Error::NOLASTLINE, "Compute chunk/atom molecule for non-molecular system"); if (!binflag && discard == MIXED) - error->all(FLERR, - "Compute chunk/atom without bins " - "cannot use discard mixed"); + error->all(FLERR, Error::NOLASTLINE, + "Compute chunk/atom without bins cannot use discard mixed"); if (which == ArgInfo::BIN1D && delta[0] <= 0.0) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/1d command"); if (which == ArgInfo::BIN2D && (delta[0] <= 0.0 || delta[1] <= 0.0)) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/2d command"); if (which == ArgInfo::BIN2D && (dim[0] == dim[1])) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/2d command"); if (which == ArgInfo::BIN3D && (delta[0] <= 0.0 || delta[1] <= 0.0 || delta[2] <= 0.0)) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/3d command"); if (which == ArgInfo::BIN3D && (dim[0] == dim[1] || dim[1] == dim[2] || dim[0] == dim[2])) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/3d command"); if (which == ArgInfo::BINSPHERE) { if (domain->dimension == 2 && sorigin_user[2] != 0.0) - error->all(FLERR, "Compute chunk/atom sphere z origin must be 0.0 for 2d"); + error->all(FLERR, Error::NOLASTLINE, "Compute chunk/atom sphere z origin must be 0.0 for 2d"); if (sradmin_user < 0.0 || sradmin_user >= sradmax_user || nsbin < 1) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/sphere command"); } if (which == ArgInfo::BINCYLINDER) { - if (delta[0] <= 0.0) error->all(FLERR, "Illegal compute chunk/atom command"); + if (delta[0] <= 0.0) + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/cylinder command"); if (domain->dimension == 2 && dim[0] != 2) - error->all(FLERR, "Compute chunk/atom cylinder axis must be z for 2d"); + error->all(FLERR, Error::NOLASTLINE, "Compute chunk/atom cylinder axis must be z for 2d"); if (cradmin_user < 0.0 || cradmin_user >= cradmax_user || ncbin < 1) - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, Error::NOLASTLINE, "Illegal compute chunk/atom bin/cylinder command"); } if (which == ArgInfo::COMPUTE) { cchunk = modify->get_compute_by_id(cfvid); - if (!cchunk) error->all(FLERR, "Compute ID {} for compute chunk /atom does not exist", cfvid); + if (!cchunk) + error->all(FLERR, 3, "Compute ID {} for compute chunk /atom does not exist", cfvid); if (cchunk->peratom_flag == 0) - error->all(FLERR, "Compute chunk/atom compute does not calculate per-atom values"); + error->all(FLERR, 3, "Compute chunk/atom compute {} does not calculate per-atom values", + cfvid); if ((argindex == 0) && (cchunk->size_peratom_cols != 0)) - error->all(FLERR, "Compute chunk/atom compute does not calculate a per-atom vector"); + error->all(FLERR, 3, "Compute chunk/atom compute {} does not calculate a per-atom vector", + cfvid); if (argindex && (cchunk->size_peratom_cols == 0)) - error->all(FLERR, "Compute chunk/atom compute does not calculate a per-atom array"); + error->all(FLERR, 3, "Compute chunk/atom compute {} does not calculate a per-atom array", + cfvid); if (argindex && argindex > cchunk->size_peratom_cols) - error->all(FLERR, "Compute chunk/atom compute array is accessed out-of-range"); + error->all(FLERR, 3, "Compute chunk/atom compute {} array is accessed out-of-range{}", cfvid, + utils::errorurl(20)); } if (which == ArgInfo::FIX) { fchunk = modify->get_fix_by_id(cfvid); - if (!fchunk) error->all(FLERR, "Fix ID {} for compute chunk/atom does not exist", cfvid); + if (!fchunk) error->all(FLERR, 3, "Fix ID {} for compute chunk/atom does not exist", cfvid); if (fchunk->peratom_flag == 0) - error->all(FLERR, "Compute chunk/atom fix does not calculate per-atom values"); + error->all(FLERR, 3, "Compute chunk/atom fix {} does not calculate per-atom values", cfvid); if (argindex == 0 && fchunk->size_peratom_cols != 0) - error->all(FLERR, "Compute chunk/atom fix does not calculate a per-atom vector"); + error->all(FLERR, 3, "Compute chunk/atom fix {} does not calculate a per-atom vector", cfvid); if (argindex && fchunk->size_peratom_cols == 0) - error->all(FLERR, "Compute chunk/atom fix does not calculate a per-atom array"); + error->all(FLERR, 3, "Compute chunk/atom fix {} does not calculate a per-atom array", cfvid); if (argindex && argindex > fchunk->size_peratom_cols) - error->all(FLERR, "Compute chunk/atom fix array is accessed out-of-range"); + error->all(FLERR, 3, "Compute chunk/atom fix {} array is accessed out-of-range{}", cfvid, + utils::errorurl(20)); } if (which == ArgInfo::VARIABLE) { int ivariable = input->variable->find(cfvid); - if (ivariable < 0) error->all(FLERR, "Variable name for compute chunk/atom does not exist"); + if (ivariable < 0) + error->all(FLERR, 3, "Variable name {} for compute chunk/atom does not exist", cfvid); if (input->variable->atomstyle(ivariable) == 0) - error->all(FLERR, "Compute chunk/atom variable is not atom-style variable"); + error->all(FLERR, 3, "Compute chunk/atom variable {} is not atom-style variable", cfvid); } // setup scaling if (binflag) { if (domain->triclinic == 1 && scaleflag != REDUCED) - error->all(FLERR, "Compute chunk/atom for triclinic boxes requires units reduced"); + error->all(FLERR, Error::NOLASTLINE, + "Compute chunk/atom for triclinic boxes requires units reduced"); } if (scaleflag == LATTICE) { @@ -512,20 +523,27 @@ void ComputeChunkAtom::init() if (regionflag) { region = domain->get_region_by_id(idregion); - if (!region) error->all(FLERR, "Region {} for compute chunk/atom does not exist", idregion); + if (!region) + error->all(FLERR, Error::NOLASTLINE, "Region {} for compute chunk/atom does not exist", + idregion); } // set compute,fix,variable if (which == ArgInfo::COMPUTE) { cchunk = modify->get_compute_by_id(cfvid); - if (!cchunk) error->all(FLERR, "Compute ID {} for compute chunk/atom does not exist", cfvid); + if (!cchunk) + error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for compute chunk/atom does not exist", + cfvid); } else if (which == ArgInfo::FIX) { fchunk = modify->get_fix_by_id(cfvid); - if (!fchunk) error->all(FLERR, "Fix ID {} for compute chunk/atom does not exist", cfvid); + if (!fchunk) + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute chunk/atom does not exist", + cfvid); } else if (which == ArgInfo::VARIABLE) { int ivariable = input->variable->find(cfvid); - if (ivariable < 0) error->all(FLERR, "Variable name for compute chunk/atom does not exist"); + if (ivariable < 0) + error->all(FLERR, Error::NOLASTLINE, "Variable name for compute chunk/atom does not exist"); vchunk = ivariable; } @@ -540,7 +558,8 @@ void ComputeChunkAtom::init() if (molecule[i] > maxone) maxone = molecule[i]; tagint maxall; MPI_Allreduce(&maxone, &maxall, 1, MPI_LMP_TAGINT, MPI_MAX, world); - if (maxall > MAXSMALLINT) error->all(FLERR, "Molecule IDs too large for compute chunk/atom"); + if (maxall > MAXSMALLINT) + error->all(FLERR, Error::NOLASTLINE, "Molecule IDs too large for compute chunk/atom"); } // for binning, if nchunkflag not already set, set it to ONCE or EVERY @@ -560,7 +579,7 @@ void ComputeChunkAtom::init() // can't check until now since nchunkflag may have been adjusted in init() if (idsflag == ONCE && nchunkflag != ONCE) - error->all(FLERR, "Compute chunk/atom ids once but nchunk is not once"); + error->all(FLERR, Error::NOLASTLINE, "Compute chunk/atom ids once but nchunk is not once"); // create/destroy fix STORE for persistent chunk IDs as needed // need to do this if idsflag = ONCE or locks will be used by other commands @@ -658,9 +677,8 @@ void ComputeChunkAtom::lock(Fix *fixptr, bigint startstep, bigint stopstep) } if (startstep != lockstart || stopstep != lockstop) - error->all(FLERR, - "Two fix commands using " - "same compute chunk/atom command in incompatible ways"); + error->all(FLERR, Error::NOLASTLINE, + "Two fix commands using same compute chunk/atom command in incompatible ways"); // set lock to last calling Fix, since it will be last to unlock() @@ -910,7 +928,9 @@ void ComputeChunkAtom::assign_chunk_ids() if (regionflag) { region = domain->get_region_by_id(idregion); - if (!region) error->all(FLERR, "Region {} for compute chunk/atom does not exist", idregion); + if (!region) + error->all(FLERR, Error::NOLASTLINE, "Region {} for compute chunk/atom does not exist", + idregion); region->prematch(); } @@ -989,9 +1009,9 @@ void ComputeChunkAtom::assign_chunk_ids() } else if (which == ArgInfo::FIX) { if (update->ntimestep % fchunk->peratom_freq) - error->all(FLERR, - "Fix used in compute chunk/atom not " - "computed at compatible time"); + error->all(FLERR, Error::NOLASTLINE, + "Fix {} used in compute chunk/atom not computed at compatible time{}", + fchunk->id, utils::errorurl(7)); if (argindex == 0) { double *vec = fchunk->vector_atom; @@ -1245,7 +1265,7 @@ int ComputeChunkAtom::setup_xyz_bins() hi = origin[m] - n * delta[m]; } - if (lo > hi) error->all(FLERR, "Invalid bin bounds in compute chunk/atom"); + if (lo > hi) error->all(FLERR, Error::NOLASTLINE, "Invalid bin bounds in compute chunk/atom"); offset[m] = lo; nlayers[m] = static_cast((hi - lo) * invdelta[m] + 0.5); @@ -1324,9 +1344,8 @@ int ComputeChunkAtom::setup_sphere_bins() if (periodicity[1] && sradmax > prd_half[1]) flag = 1; if (domain->dimension == 3 && periodicity[2] && sradmax > prd_half[2]) flag = 1; if (flag) - error->all(FLERR, - "Compute chunk/atom bin/sphere radius " - "is too large for periodic box"); + error->all(FLERR, Error::NOLASTLINE, + "Compute chunk/atom bin/sphere radius is too large for periodic box"); } sinvrad = nsbin / (sradmax - sradmin); @@ -1388,9 +1407,8 @@ int ComputeChunkAtom::setup_cylinder_bins() if (periodicity[cdim1] && sradmax > prd_half[cdim1]) flag = 1; if (periodicity[cdim2] && sradmax > prd_half[cdim2]) flag = 1; if (flag) - error->all(FLERR, - "Compute chunk/atom bin/cylinder radius " - "is too large for periodic box"); + error->all(FLERR, Error::NOLASTLINE, + "Compute chunk/atom bin/cylinder radius is too large for periodic box"); } cinvrad = ncbin / (cradmax - cradmin); @@ -2002,7 +2020,7 @@ void ComputeChunkAtom::atom2bincylinder() void ComputeChunkAtom::readdim(int narg, char **arg, int iarg, int idim) { - if (narg < iarg + 3) error->all(FLERR, "Illegal compute chunk/atom command"); + if (narg < iarg + 3) utils::missing_cmd_args(FLERR, "compute chunk/atom", error); if (strcmp(arg[iarg], "x") == 0) dim[idim] = 0; else if (strcmp(arg[iarg], "y") == 0) @@ -2010,10 +2028,10 @@ void ComputeChunkAtom::readdim(int narg, char **arg, int iarg, int idim) else if (strcmp(arg[iarg], "z") == 0) dim[idim] = 2; else - error->all(FLERR, "Illegal compute chunk/atom command"); + error->all(FLERR, iarg, "Illegal compute chunk/atom dimension {}", arg[iarg]); if (dim[idim] == 2 && domain->dimension == 2) - error->all(FLERR, "Cannot use compute chunk/atom bin z for 2d model"); + error->all(FLERR, iarg, "Cannot use compute chunk/atom bin z for 2d model"); if (strcmp(arg[iarg + 1], "lower") == 0) originflag[idim] = LOWER; diff --git a/src/compute_chunk_spread_atom.cpp b/src/compute_chunk_spread_atom.cpp index 53b8517c22..5c47b7770e 100644 --- a/src/compute_chunk_spread_atom.cpp +++ b/src/compute_chunk_spread_atom.cpp @@ -34,7 +34,7 @@ ComputeChunkSpreadAtom:: ComputeChunkSpreadAtom(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, narg, arg), idchunk(nullptr) { - if (narg < 5) error->all(FLERR,"Illegal compute chunk/spread/atom command"); + if (narg < 5) utils::missing_cmd_args(FLERR,"compute chunk/spread/atom", error); // ID of compute chunk/atom @@ -43,10 +43,12 @@ ComputeChunkSpreadAtom(LAMMPS *lmp, int narg, char **arg) : // expand args if any have wildcard character "*" - int iarg = 4; + const int ioffset = 4; + int iarg = ioffset; int expand = 0; char **earg; - int nargnew = utils::expand_args(FLERR,narg-iarg,&arg[iarg],1,earg,lmp); + int *amap = nullptr; + int nargnew = utils::expand_args(FLERR,narg-iarg,&arg[iarg],1,earg,lmp,&amap); if (earg != &arg[iarg]) expand = 1; arg = earg; @@ -60,11 +62,13 @@ ComputeChunkSpreadAtom(LAMMPS *lmp, int narg, char **arg) : value_t val; val.which = argi.get_type(); val.argindex = argi.get_index1(); + if (expand) val.iarg = amap[iarg] + ioffset; + else val.iarg = iarg + ioffset; val.id = argi.get_name(); val.val.c = nullptr; if ((val.which == ArgInfo::UNKNOWN) || (val.which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR,"Illegal compute chunk/spread/atom argument: {}", arg[iarg]); + error->all(FLERR, val.iarg, "Illegal compute chunk/spread/atom argument: {}", arg[iarg]); values.push_back(val); } @@ -84,41 +88,48 @@ ComputeChunkSpreadAtom(LAMMPS *lmp, int narg, char **arg) : if (val.which == ArgInfo::COMPUTE) { auto icompute = modify->get_compute_by_id(val.id); if (!icompute) - error->all(FLERR,"Compute ID {} for compute chunk/spread/atom does not exist", val.id); + error->all(FLERR, val.iarg, "Compute ID {} for compute chunk/spread/atom does not exist", + val.id); if (!utils::strmatch(icompute->style,"/chunk$")) - error->all(FLERR,"Compute chunk/spread/atom compute {} does not calculate per-chunk values", + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom compute {} does not calculate per-chunk values", val.id); if (val.argindex == 0) { if (!icompute->vector_flag) - error->all(FLERR,"Compute chunk/spread/atom compute {} does not calculate global vector", + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom compute {} does not calculate global vector", val.id); } else { if (!icompute->array_flag) - error->all(FLERR,"Compute chunk/spread/atom compute {} does not calculate global array", + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom compute {} does not calculate global array", val.id); if (val.argindex > icompute->size_array_cols) - error->all(FLERR,"Compute chunk/spread/atom compute {} array is accessed out-of-range", - val.id); + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom compute {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } val.val.c = icompute; } else if (val.which == ArgInfo::FIX) { auto ifix = modify->get_fix_by_id(val.id); if (!ifix) - error->all(FLERR,"Fix ID {} for compute chunk/spread/atom does not exist", val.id); + error->all(FLERR, val.iarg, + "Fix ID {} for compute chunk/spread/atom does not exist", val.id); if (val.argindex == 0) { if (!ifix->vector_flag) - error->all(FLERR,"Compute chunk/spread/atom {} fix does not calculate global vector", - val.id); + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom {} fix does not calculate global vector", val.id); } else { if (!ifix->array_flag) - error->all(FLERR,"Compute chunk/spread/atom {} fix does not calculate global array", - val.id); + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom {} fix does not calculate global array", val.id); if (val.argindex > ifix->size_array_cols) - error->all(FLERR,"Compute chunk/spread/atom fix {} array is accessed out-of-range", - val.id); + error->all(FLERR, val.iarg, + "Compute chunk/spread/atom fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } } } @@ -158,12 +169,14 @@ void ComputeChunkSpreadAtom::init() if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR,"Compute ID {} for compute chunk/spread/atom does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, + "Compute ID {} for compute chunk/spread/atom does not exist", val.id); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); if (!val.val.f) - error->all(FLERR,"Fix ID {} for compute chunk/spread/atom does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, + "Fix ID {} for compute chunk/spread/atom does not exist", val.id); } } } @@ -174,10 +187,12 @@ void ComputeChunkSpreadAtom::init_chunk() { cchunk = dynamic_cast(modify->get_compute_by_id(idchunk)); if (!cchunk) - error->all(FLERR,"Chunk/atom compute {} does not exist for compute chunk/spread/atom " + error->all(FLERR, Error::NOLASTLINE, + "Chunk/atom compute {} does not exist for compute chunk/spread/atom " "or is of invalid style", idchunk); if (strcmp(cchunk->style,"chunk/atom") != 0) - error->all(FLERR,"Compute chunk/spread/atom {} does not use chunk/atom compute", idchunk); + error->all(FLERR, Error::NOLASTLINE, + "Compute chunk/spread/atom {} does not use chunk/atom compute", idchunk); } /* ---------------------------------------------------------------------- */ @@ -273,8 +288,9 @@ void ComputeChunkSpreadAtom::compute_peratom() } else if (val.which == ArgInfo::FIX) { Fix *fix = val.val.f; if (update->ntimestep % fix->global_freq) - error->all(FLERR,"Fix {} used in compute chunk/spread/atom not computed at compatible time", - val.id); + error->all(FLERR, Error::NOLASTLINE, + "Fix {} used in compute chunk/spread/atom not computed at compatible time{}", + val.id, utils::errorurl(7)); if (val.argindex == 0) { int nfix = fix->size_vector; diff --git a/src/compute_chunk_spread_atom.h b/src/compute_chunk_spread_atom.h index 4ea88e89ec..7ec646d0e5 100644 --- a/src/compute_chunk_spread_atom.h +++ b/src/compute_chunk_spread_atom.h @@ -36,6 +36,7 @@ class ComputeChunkSpreadAtom : public Compute { struct value_t { int which; int argindex; + int iarg; std::string id; union { class Compute *c; diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index f968d0c014..b7bfc4a15e 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -37,16 +37,18 @@ ComputeGlobalAtom::ComputeGlobalAtom(LAMMPS *lmp, int narg, char **arg) : // process index arg - int iarg = 3; + const int ioffset = 3; + int iarg = ioffset; ArgInfo argi(arg[iarg]); reference.which = argi.get_type(); reference.argindex = argi.get_index1(); reference.id = argi.get_name(); + reference.iarg = iarg; if ((reference.which == ArgInfo::UNKNOWN) || (reference.which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR,"Illegal compute global/atom index property: {}", arg[iarg]); + error->all(FLERR, iarg, "Illegal compute global/atom index property: {}", arg[iarg]); iarg++; @@ -54,7 +56,8 @@ ComputeGlobalAtom::ComputeGlobalAtom(LAMMPS *lmp, int narg, char **arg) : int expand = 0; char **earg; - int nargnew = utils::expand_args(FLERR,narg-iarg,&arg[iarg],1,earg,lmp); + int *amap = nullptr; + int nargnew = utils::expand_args(FLERR,narg-iarg,&arg[iarg],1,earg,lmp,&amap); if (earg != &arg[iarg]) expand = 1; arg = earg; @@ -69,12 +72,14 @@ ComputeGlobalAtom::ComputeGlobalAtom(LAMMPS *lmp, int narg, char **arg) : value_t val; val.which = argi2.get_type(); val.argindex = argi2.get_index1(); + if (expand) val.iarg = amap[iarg] + ioffset; + else val.iarg = iarg + ioffset; val.id = argi2.get_name(); val.val.c = nullptr; if ((val.which == ArgInfo::UNKNOWN) || (val.which == ArgInfo::NONE) || (argi2.get_dim() > 1)) - error->all(FLERR,"Illegal compute global/atom global property: {}", arg[iarg]); + error->all(FLERR, val.iarg, "Illegal compute global/atom global property: {}", arg[iarg]); values.push_back(val); } @@ -91,85 +96,92 @@ ComputeGlobalAtom::ComputeGlobalAtom(LAMMPS *lmp, int narg, char **arg) : if (reference.which == ArgInfo::COMPUTE) { reference.val.c = modify->get_compute_by_id(reference.id); if (!reference.val.c) - error->all(FLERR,"Compute ID {} for compute global/atom index", reference.id); + error->all(FLERR,reference.iarg,"Compute ID {} for compute global/atom index",reference.id); if (!reference.val.c->peratom_flag) - error->all(FLERR,"Compute global/atom compute {} does not calculate a per-atom " - "vector or array", reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom compute {} does not calculate a " + "per-atom vector or array", reference.id); if ((reference.argindex == 0) && (reference.val.c->size_peratom_cols != 0)) - error->all(FLERR,"Compute global/atom compute {} does not calculate a per-atom " - "vector", reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom compute {} does not calculate a " + "per-atom vector", reference.id); if (reference.argindex && (reference.val.c->size_peratom_cols == 0)) - error->all(FLERR,"Compute global/atom compute does not calculate a per-atom " + error->all(FLERR, reference.iarg, "Compute global/atom compute does not calculate a per-atom " "array", reference.id); if (reference.argindex && (reference.argindex > reference.val.c->size_peratom_cols)) - error->all(FLERR, "Compute global/atom compute array {} is accessed out-of-range", - reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom compute array {} is accessed " + "out-of-range{}", reference.id, utils::errorurl(20)); } else if (reference.which == ArgInfo::FIX) { reference.val.f =modify->get_fix_by_id(reference.id); if (!reference.val.f) - error->all(FLERR,"Fix ID {} for compute global/atom does not exist", reference.id); + error->all(FLERR, reference.iarg, "Fix ID {} for compute global/atom does not exist", + reference.id); if (!reference.val.f->peratom_flag) - error->all(FLERR,"Compute global/atom fix {} does not calculate a per-atom vector " - "or array", reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom fix {} does not calculate a per-atom " + "vector or array", reference.id); if (reference.argindex == 0 && (reference.val.f->size_peratom_cols != 0)) - error->all(FLERR,"Compute global/atom fix {} does not calculate a per-atom vector", - reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom fix {} does not calculate a per-atom " + "vector", reference.id); if (reference.argindex && (reference.val.f->size_peratom_cols == 0)) - error->all(FLERR,"Compute global/atom fix {} does not calculate a per-atom array", - reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom fix {} does not calculate a per-atom " + "array", reference.id); if (reference.argindex && (reference.argindex > reference.val.f->size_peratom_cols)) - error->all(FLERR, "Compute global/atom fix {} array is accessed out-of-range", reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom fix {} array is accessed " + "out-of-range{}", reference.id, utils::errorurl(20)); } else if (reference.which == ArgInfo::VARIABLE) { reference.val.v = input->variable->find(reference.id.c_str()); if (reference.val.v < 0) - error->all(FLERR,"Variable name {} for compute global/atom index does not exist", - reference.id); + error->all(FLERR, reference.iarg, "Variable name {} for compute global/atom index does " + "not exist", reference.id); if (input->variable->atomstyle(reference.val.v) == 0) - error->all(FLERR,"Compute global/atom index variable {} is not atom-style variable", - reference.id); + error->all(FLERR, reference.iarg, "Compute global/atom index variable {} is not atom-style " + "variable", reference.id); } for (auto &val : values) { if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR,"Compute ID {} for compute global/atom does not exist", val.id); + error->all(FLERR, val.iarg, "Compute ID {} for compute global/atom does not exist", val.id); if (val.argindex == 0) { if (!val.val.c->vector_flag) - error->all(FLERR,"Compute ID {} for global/atom compute does not calculate " + error->all(FLERR, val.iarg, "Compute ID {} for global/atom compute does not calculate " "a global vector", val.id); } else { if (!val.val.c->array_flag) - error->all(FLERR,"Compute ID {} for global/atom compute does not calculate " + error->all(FLERR, val.iarg, "Compute ID {} for global/atom compute does not calculate " "a global array", val.id); if (val.argindex > val.val.c->size_array_cols) - error->all(FLERR,"Compute global/atom compute {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute global/atom compute {} array is accessed " + "out-of-range{}", val.id, utils::errorurl(20)); } } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR,"Fix ID {} for compute global/atom does not exist", val.id); + if (!val.val.f) + error->all(FLERR, val.iarg, "Fix ID {} for compute global/atom does not exist", val.id); if (val.argindex == 0) { if (!val.val.f->vector_flag) - error->all(FLERR,"Fix ID {} for compute global/atom compute does not calculate " - "a global vector", val.id); + error->all(FLERR, val.iarg, "Fix ID {} for compute global/atom compute does not " + "calculate a global vector", val.id); } else { if (!val.val.f->array_flag) - error->all(FLERR,"Fix ID {} for compute global/atom compute does not calculate " - "a global array", val.id); + error->all(FLERR, val.iarg, "Fix ID {} for compute global/atom compute does not " + "calculate a global array", val.id); if (val.argindex > val.val.f->size_array_cols) - error->all(FLERR,"Compute global/atom fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute global/atom fix {} array is accessed " + "out-of-range{}", val.id, utils::errorurl(20)); } } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR,"Variable name {} for compute global/atom does not exist", val.id); + error->all(FLERR, val.iarg, "Variable name {} for compute global/atom does not exist", + val.id); if (input->variable->vectorstyle(val.val.v) == 0) - error->all(FLERR,"Compute global/atom variable {} is not vector-style variable", val.id); + error->all(FLERR, val.iarg, "Compute global/atom variable {} is not vector-style variable", + val.id); } } @@ -203,33 +215,38 @@ void ComputeGlobalAtom::init() if (reference.which == ArgInfo::COMPUTE) { reference.val.c = modify->get_compute_by_id(reference.id); if (!reference.val.c) - error->all(FLERR,"Compute ID {} for compute global/atom index does not exist", reference.id); + error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for compute global/atom index does not " + "exist", reference.id); } else if (reference.which == ArgInfo::FIX) { reference.val.f = modify->get_fix_by_id(reference.id); if (reference.val.f) - error->all(FLERR,"Fix ID {} for compute global/atom index does not exist", reference.id); + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute global/atom index does not exist", + reference.id); } else if (reference.which == ArgInfo::VARIABLE) { reference.val.v = input->variable->find(reference.id.c_str()); if (reference.val.v < 0) - error->all(FLERR,"Variable name {} for compute global/atom index does not exist", - reference.id); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for compute global/atom index does " + "not exist", reference.id); } for (auto &val : values) { if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR,"Compute ID {} for compute global/atom does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for compute global/atom does not exist", + val.id); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); if (!val.val.f) - error->all(FLERR,"Fix ID {} for compute global/atom does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute global/atom does not exist", + val.id); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR,"Variable name {} for compute global/atom does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for compute global/atom does not " + "exist", val.id); } } } @@ -288,8 +305,8 @@ void ComputeGlobalAtom::compute_peratom() } else if (reference.which == ArgInfo::FIX) { if (update->ntimestep % reference.val.f->peratom_freq) - error->all(FLERR,"Fix {} used in compute global/atom not computed at compatible time", - reference.id); + error->all(FLERR, Error::NOLASTLINE, "Fix {} used in compute global/atom not computed at " + "compatible time{}", reference.id, utils::errorurl(7)); if (reference.argindex == 0) { double *fix_vector = reference.val.f->vector_atom; @@ -334,8 +351,8 @@ void ComputeGlobalAtom::compute_peratom() } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->peratom_freq) - error->all(FLERR,"Fix {} used in compute global/atom not computed at compatible time", - val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix {} used in compute global/atom not computed " + "at compatible time{}", val.id, utils::errorurl(7)); vmax = reference.val.f->size_vector; if (vmax > maxvector) { @@ -401,8 +418,8 @@ void ComputeGlobalAtom::compute_peratom() } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->peratom_freq) - error->all(FLERR,"Fix {} used in compute global/atom not computed at compatible time", - val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix {} used in compute global/atom not computed " + "at compatible time{}", val.id, utils::errorurl(7)); vmax = val.val.f->size_array_rows; if (vmax > maxvector) { diff --git a/src/compute_global_atom.h b/src/compute_global_atom.h index b8d49bf7a5..909be7b20b 100644 --- a/src/compute_global_atom.h +++ b/src/compute_global_atom.h @@ -36,6 +36,7 @@ class ComputeGlobalAtom : public Compute { struct value_t { int which; int argindex; + int iarg; std::string id; union { class Compute *c; diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 91a9cb531d..7843caecba 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -92,7 +92,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : nsub = utils::inumeric(FLERR,arg[iarg],false,lmp); ++iarg; if (nsub <= 0) - error->all(FLERR,"Illegal compute pressure command"); + error->all(FLERR, iarg, "Illegal compute pressure hybrid sub-style index {}", nsub); } } @@ -105,7 +105,8 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : } if (!pairhybrid) - error->all(FLERR,"Unrecognized pair style in compute pressure command"); + error->all(FLERR, iarg - (nsub ? 1 : 0), + "Unrecognized pair style {} in compute pressure command", pstyle); pairhybridflag = 1; } @@ -120,7 +121,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : pairflag = 1; bondflag = angleflag = dihedralflag = improperflag = 1; kspaceflag = fixflag = 1; - } else error->all(FLERR,"Illegal compute pressure command"); + } else error->all(FLERR, iarg, "Unknown compute pressure keyword {}", arg[iarg]); iarg++; } } @@ -128,7 +129,8 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : // error check if (keflag && id_temp == nullptr) - error->all(FLERR,"Compute pressure requires temperature ID to include kinetic energy"); + error->all(FLERR, Error::NOLASTLINE, + "Compute pressure requires temperature ID to include kinetic energy"); vector = new double[size_vector]; nvirial = 0; @@ -164,7 +166,8 @@ void ComputePressure::init() if (keflag) { temperature = modify->get_compute_by_id(id_temp); if (!temperature) - error->all(FLERR,"Could not find compute pressure temperature ID {}", id_temp); + error->all(FLERR, Error::NOLASTLINE, + "Could not find compute pressure temperature ID {}", id_temp); } // recheck if pair style with and without suffix exists @@ -178,7 +181,8 @@ void ComputePressure::init() } if (!pairhybrid) - error->all(FLERR,"Unrecognized pair style in compute pressure command"); + error->all(FLERR, Error::NOLASTLINE, + "Unrecognized pair style {} in compute pressure command", pstyle); } // detect contributions to virial @@ -235,7 +239,8 @@ double ComputePressure::compute_scalar() { invoked_scalar = update->ntimestep; if (update->vflag_global != invoked_scalar) - error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep" + + utils::errorurl(22)); // invoke temperature if it hasn't been already @@ -274,10 +279,11 @@ void ComputePressure::compute_vector() { invoked_vector = update->ntimestep; if (update->vflag_global != invoked_vector) - error->all(FLERR, Error::NOLASTLINE, "Virial was not tallied on needed timestep{}", utils::errorurl(22)); + error->all(FLERR, Error::NOLASTLINE, + "Virial was not tallied on needed timestep" + utils::errorurl(22)); if (force->kspace && kspace_virial && force->kspace->scalar_pressure_flag) - error->all(FLERR,"Must use 'kspace_modify pressure/scalar no' for " + error->all(FLERR, Error::NOLASTLINE, "Must use 'kspace_modify pressure/scalar no' for " "tensor components with kspace_style msm"); // invoke temperature if it hasn't been already diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index 6c4bafab4f..385e6f300b 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -79,7 +79,7 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : } else if (strcmp(style, "reduce/region") == 0) { if (narg < 6) utils::missing_cmd_args(FLERR, "compute reduce/region", error); if (!domain->get_region_by_id(arg[3])) - error->all(FLERR, "Region {} for compute reduce/region does not exist", arg[3]); + error->all(FLERR, 3, "Region {} for compute reduce/region does not exist", arg[3]); idregion = utils::strdup(arg[3]); iarg = 4; } @@ -105,7 +105,7 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg], "minabs") == 0) mode = MINABS; else - error->all(FLERR, "Unknown compute {} mode: {}", style, arg[iarg]); + error->all(FLERR, iarg, "Unknown compute {} mode: {}", style, arg[iarg]); iarg++; if (mode == SUM || mode == SUMSQ || mode == SUMABS) { @@ -124,9 +124,12 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : // expand args if any have wildcard character "*" + int ioffset = iarg; int expand = 0; char **earg; - int nargnew = utils::expand_args(FLERR, narg - iarg, &arg[iarg], 1, earg, lmp); + char **oarg = arg; + int *amap = nullptr; + int nargnew = utils::expand_args(FLERR, narg - iarg, &arg[iarg], 1, earg, lmp, &amap); if (earg != &arg[iarg]) expand = 1; arg = earg; @@ -140,6 +143,10 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : val.id = ""; val.val.c = nullptr; + if (expand) + val.iarg = amap[iarg] + ioffset; + else + val.iarg = iarg + ioffset; if (strcmp(arg[iarg], "x") == 0) { val.which = ArgInfo::X; @@ -180,7 +187,7 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : val.id = argi.get_name(); if ((val.which == ArgInfo::UNKNOWN) || (argi.get_dim() > 1)) - error->all(FLERR, "Illegal compute {} argument: {}", style, arg[iarg]); + error->all(FLERR, val.iarg, "Illegal compute {} argument: {}", style, arg[iarg]); if (val.which == ArgInfo::NONE) break; } @@ -196,31 +203,43 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : std::string mycmd = "compute "; mycmd += style; + // get argument offset if optional arguments are present + if (nvalues < nargnew) { + for (int i = 0; i < narg; ++i) { + if (strcmp(oarg[i], arg[nvalues]) == 0) ioffset = i - nvalues; + } + } for (int iarg = nvalues; iarg < nargnew; iarg++) { + int errptr = iarg + ioffset; if (strcmp(arg[iarg], "replace") == 0) { - if (iarg + 3 > narg) utils::missing_cmd_args(FLERR, mycmd + " replace", error); + if (iarg + 3 > nargnew) utils::missing_cmd_args(FLERR, mycmd + " replace", error); if (mode != MINN && mode != MAXX) - error->all(FLERR, "Compute {} replace requires min or max mode", style); + error->all(FLERR, errptr, "Compute {} replace requires min or max mode", style); int col1 = utils::inumeric(FLERR, arg[iarg + 1], false, lmp) - 1; int col2 = utils::inumeric(FLERR, arg[iarg + 2], false, lmp) - 1; if ((col1 < 0) || (col1 >= nvalues)) - error->all(FLERR, "Invalid compute {} replace first column index {}", style, col1); + error->all(FLERR, errptr + 1, "Invalid compute {} replace first column index {}", style, + col1); if ((col2 < 0) || (col2 >= nvalues)) - error->all(FLERR, "Invalid compute {} replace second column index {}", style, col2); - if (col1 == col2) error->all(FLERR, "Compute {} replace columns must be different"); + error->all(FLERR, errptr + 2, "Invalid compute {} replace second column index {}", style, + col2); + if (col1 == col2) error->all(FLERR, errptr, "Compute {} replace columns must be different"); if ((replace[col1] >= 0) || (replace[col2] >= 0)) - error->all(FLERR, "Compute {} replace column already used for another replacement"); + error->all(FLERR, errptr, "Compute {} replace column already used for another replacement"); replace[col1] = col2; iarg += 2; } else if (strcmp(arg[iarg], "inputs") == 0) { - if (iarg + 2 > narg) utils::missing_cmd_args(FLERR, mycmd + " inputs", error); + if (iarg + 2 > nargnew) utils::missing_cmd_args(FLERR, mycmd + " inputs", error); if (strcmp(arg[iarg + 1], "peratom") == 0) input_mode = PERATOM; else if (strcmp(arg[iarg + 1], "local") == 0) input_mode = LOCAL; + else + error->all(FLERR, errptr + 1, "Unknown compute {} inputs argument: {}", style, + arg[iarg + 1]); iarg += 1; } else - error->all(FLERR, "Unknown compute {} keyword: {}", style, arg[iarg]); + error->all(FLERR, errptr, "Unknown compute {} keyword: {}", style, arg[iarg]); } // delete replace list if not set @@ -244,72 +263,87 @@ ComputeReduce::ComputeReduce(LAMMPS *lmp, int narg, char **arg) : for (auto &val : values) { if (val.which == ArgInfo::X || val.which == ArgInfo::V || val.which == ArgInfo::F) { - if (input_mode == LOCAL) error->all(FLERR, "Compute {} inputs must be all local"); + if (input_mode == LOCAL) + error->all(FLERR, Error::NOPOINTER, "Compute {} inputs must be all local"); } else if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR, "Compute ID {} for compute {} does not exist", val.id, style); + error->all(FLERR, val.iarg, "Compute ID {} for compute {} does not exist", val.id, style); if (input_mode == PERATOM) { if (!val.val.c->peratom_flag) - error->all(FLERR, "Compute {} compute {} does not calculate per-atom values", style, - val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate per-atom values", + style, val.id); if (val.argindex == 0 && val.val.c->size_peratom_cols != 0) - error->all(FLERR, "Compute {} compute {} does not calculate a per-atom vector", style, - val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate a per-atom vector", + style, val.id); if (val.argindex && val.val.c->size_peratom_cols == 0) - error->all(FLERR, "Compute {} compute {} does not calculate a per-atom array", style, - val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate a per-atom array", + style, val.id); if (val.argindex && val.argindex > val.val.c->size_peratom_cols) - error->all(FLERR, "Compute {} compute {} array is accessed out-of-range", style, val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} array is accessed out-of-range{}", + style, val.id, utils::errorurl(20)); } else if (input_mode == LOCAL) { if (!val.val.c->local_flag) - error->all(FLERR, "Compute {} compute {} does not calculate local values", style, val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate local values", + style, val.id); if (val.argindex == 0 && val.val.c->size_local_cols != 0) - error->all(FLERR, "Compute {} compute {} does not calculate a local vector", style, - val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate a local vector", + style, val.id); if (val.argindex && val.val.c->size_local_cols == 0) - error->all(FLERR, "Compute {} compute {} does not calculate a local array", style, - val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} does not calculate a local array", + style, val.id); if (val.argindex && val.argindex > val.val.c->size_local_cols) - error->all(FLERR, "Compute {} compute {} array is accessed out-of-range", style, val.id); + error->all(FLERR, val.iarg, "Compute {} compute {} array is accessed out-of-range{}", + style, val.id, utils::errorurl(20)); } } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR, "Fix ID {} for compute {} does not exist", val.id, style); + if (!val.val.f) + error->all(FLERR, val.iarg, "Fix ID {} for compute {} does not exist", val.id, style); if (input_mode == PERATOM) { if (!val.val.f->peratom_flag) - error->all(FLERR, "Compute {} fix {} does not calculate per-atom values", style, val.id); - if (val.argindex == 0 && (val.val.f->size_peratom_cols != 0)) - error->all(FLERR, "Compute {} fix {} does not calculate a per-atom vector", style, + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate per-atom values", style, val.id); + if (val.argindex == 0 && (val.val.f->size_peratom_cols != 0)) + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate a per-atom vector", + style, val.id); if (val.argindex && (val.val.f->size_peratom_cols == 0)) - error->all(FLERR, "Compute {} fix {} does not calculate a per-atom array", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate a per-atom array", + style, val.id); if (val.argindex && (val.argindex > val.val.f->size_peratom_cols)) - error->all(FLERR, "Compute {} fix {} array is accessed out-of-range", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} array is accessed out-of-range{}", style, + val.id, utils::errorurl(20)); } else if (input_mode == LOCAL) { if (!val.val.f->local_flag) - error->all(FLERR, "Compute {} fix {} does not calculate local values", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate local values", style, + val.id); if (val.argindex == 0 && (val.val.f->size_local_cols != 0)) - error->all(FLERR, "Compute {} fix {} does not calculate a local vector", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate a local vector", style, + val.id); if (val.argindex && (val.val.f->size_local_cols == 0)) - error->all(FLERR, "Compute {} fix {} does not calculate a local array", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} does not calculate a local array", style, + val.id); if (val.argindex && (val.argindex > val.val.f->size_local_cols)) - error->all(FLERR, "Compute {} fix {} array is accessed out-of-range", style, val.id); + error->all(FLERR, val.iarg, "Compute {} fix {} array is accessed out-of-range{}", style, + val.id, utils::errorurl(20)); } } else if (val.which == ArgInfo::VARIABLE) { - if (input_mode == LOCAL) error->all(FLERR, "Compute {} inputs must be all local"); + if (input_mode == LOCAL) + error->all(FLERR, Error::NOPOINTER, "Compute {} inputs must be all local"); val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute {} does not exist", val.id, style); + error->all(FLERR, val.iarg, "Variable name {} for compute {} does not exist", val.id, + style); if (input->variable->atomstyle(val.val.v) == 0) - error->all(FLERR, "Compute {} variable {} is not atom-style variable", style, val.id); + error->all(FLERR, val.iarg, "Compute {} variable {} is not atom-style variable", style, + val.id); } } @@ -365,16 +399,20 @@ void ComputeReduce::init() if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR, "Compute ID {} for compute {} does not exist", val.id, style); + error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for compute {} does not exist", val.id, + style); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR, "Fix ID {} for compute {} does not exist", val.id, style); + if (!val.val.f) + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute {} does not exist", val.id, + style); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute {} does not exist", val.id, style); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for compute {} does not exist", + val.id, style); } } @@ -382,7 +420,9 @@ void ComputeReduce::init() if (idregion) { region = domain->get_region_by_id(idregion); - if (!region) error->all(FLERR, "Region {} for compute reduce/region does not exist", idregion); + if (!region) + error->all(FLERR, Error::NOLASTLINE, "Region {} for compute reduce/region does not exist", + idregion); } } @@ -586,7 +626,9 @@ double ComputeReduce::compute_one(int m, int flag) } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->peratom_freq) - error->all(FLERR, "Fix {} used in compute {} not computed at compatible time", val.id, style); + error->all(FLERR, Error::NOLASTLINE, + "Fix {} used in compute {} not computed at compatible time{}", val.id, style, + utils::errorurl(7)); if (input_mode == PERATOM) { if (aidx == 0) { diff --git a/src/compute_reduce.h b/src/compute_reduce.h index f8b652e00c..ce575a4368 100644 --- a/src/compute_reduce.h +++ b/src/compute_reduce.h @@ -41,6 +41,7 @@ class ComputeReduce : public Compute { struct value_t { int which; int argindex; + int iarg; std::string id; union { class Compute *c; diff --git a/src/compute_reduce_chunk.cpp b/src/compute_reduce_chunk.cpp index 9ba0e30a8d..133932bb63 100644 --- a/src/compute_reduce_chunk.cpp +++ b/src/compute_reduce_chunk.cpp @@ -52,15 +52,17 @@ ComputeReduceChunk::ComputeReduceChunk(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[4], "max") == 0) mode = MAXX; else - error->all(FLERR, "Unknown compute reduce/chunk mode: {}", arg[4]); + error->all(FLERR, 4, "Unknown compute reduce/chunk mode: {}", arg[4]); - int iarg = 5; + const int ioffset = 5; + int iarg = ioffset; // expand args if any have wildcard character "*" int expand = 0; char **earg; - int nargnew = utils::expand_args(FLERR, narg - iarg, &arg[iarg], 1, earg, lmp); + int *amap = nullptr; + int nargnew = utils::expand_args(FLERR, narg - iarg, &arg[iarg], 1, earg, lmp, &amap); if (earg != &arg[iarg]) expand = 1; arg = earg; @@ -74,11 +76,13 @@ ComputeReduceChunk::ComputeReduceChunk(LAMMPS *lmp, int narg, char **arg) : value_t val; val.which = argi.get_type(); val.argindex = argi.get_index1(); + if (expand) val.iarg = amap[iarg] + ioffset; + else val.iarg = iarg + ioffset; val.id = argi.get_name(); val.val.c = nullptr; if ((val.which == ArgInfo::UNKNOWN) || (val.which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR, "Illegal compute reduce/chunk argument: {}", arg[iarg]); + error->all(FLERR, val.iarg, "Illegal compute reduce/chunk argument: {}", arg[iarg]); values.push_back(val); } @@ -96,40 +100,46 @@ ComputeReduceChunk::ComputeReduceChunk(LAMMPS *lmp, int narg, char **arg) : if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR, "Compute ID {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, val.iarg, "Compute ID {} for compute reduce/chunk does not exist", + val.id); if (!val.val.c->peratom_flag) - error->all(FLERR, "Compute reduce/chunk compute {} does not calculate per-atom values", - val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk compute {} does not calculate per-atom " + "values", val.id); if ((val.argindex == 0) && (val.val.c->size_peratom_cols != 0)) - error->all(FLERR, "Compute reduce/chunk compute {} does not calculate a per-atom vector", - val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk compute {} does not calculate a " + "per-atom vector", val.id); if (val.argindex && (val.val.c->size_peratom_cols == 0)) - error->all(FLERR, "Compute reduce/chunk compute {} does not calculate a per-atom array", - val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk compute {} does not calculate a " + "per-atom array", val.id); if (val.argindex && (val.argindex > val.val.c->size_peratom_cols)) - error->all(FLERR, "Compute reduce/chunk compute array {} is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk compute array {} is accessed " + "out-of-range{}", val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); if (!val.val.f) - error->all(FLERR, "Fix ID {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, val.iarg, "Fix ID {} for compute reduce/chunk does not exist", val.id); if (!val.val.f->peratom_flag) - error->all(FLERR, "Compute reduce/chunk fix {} does not calculate per-atom values", val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk fix {} does not calculate per-atom " + "values", val.id); if ((val.argindex == 0) && (val.val.f->size_peratom_cols != 0)) - error->all(FLERR, "Compute reduce/chunk fix {} does not calculate a per-atom vector", - val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk fix {} does not calculate a per-atom " + "vector", val.id); if (val.argindex && (val.val.f->size_peratom_cols == 0)) - error->all(FLERR, "Compute reduce/chunk fix {} does not calculate a per-atom array", - val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk fix {} does not calculate a per-atom " + "array", val.id); if (val.argindex && (val.argindex > val.val.f->size_peratom_cols)) - error->all(FLERR, "Compute reduce/chunk fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute reduce/chunk fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, val.iarg, "Variable name {} for compute reduce/chunk does not exist", + val.id); if (input->variable->atomstyle(val.val.v) == 0) - error->all(FLERR, "Compute reduce/chunk variable is not atom-style variable"); + error->all(FLERR, val.iarg, "Compute reduce/chunk variable {} is not atom-style variable", + val.id); } } @@ -186,17 +196,20 @@ void ComputeReduceChunk::init() if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); if (!val.val.c) - error->all(FLERR, "Compute ID {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, + "Compute ID {} for compute reduce/chunk does not exist", val.id); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); if (!val.val.f) - error->all(FLERR, "Fix ID {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute reduce/chunk does not exist", + val.id); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute reduce/chunk does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for compute reduce/chunk does not " + "exist", val.id); } } } @@ -317,7 +330,8 @@ void ComputeReduceChunk::compute_one(int m, double *vchunk, int nstride) } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->peratom_freq) - error->all(FLERR, "Fix used in compute reduce/chunk not computed at compatible time"); + error->all(FLERR, Error::NOLASTLINE, "Fix used in compute reduce/chunk not computed at " + "compatible time{}", utils::errorurl(7)); if (val.argindex == 0) { double *vfix = val.val.f->vector_atom; diff --git a/src/compute_reduce_chunk.h b/src/compute_reduce_chunk.h index 4055956d2d..18cbe40526 100644 --- a/src/compute_reduce_chunk.h +++ b/src/compute_reduce_chunk.h @@ -38,6 +38,7 @@ class ComputeReduceChunk : public ComputeChunk { struct value_t { int which; int argindex; + int iarg; std::string id; union { class Compute *c; diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index 6347bfe4c9..bd02fff9f7 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -34,7 +34,7 @@ ComputeReduceRegion::ComputeReduceRegion(LAMMPS *lmp, int narg, char **arg) : ComputeReduce(lmp, narg, arg) { if (input_mode == LOCAL) - error->all(FLERR, "Compute reduce/region cannot use local data as input"); + error->all(FLERR, Error::NOPOINTER, "Compute reduce/region cannot use local data as input"); } /* ---------------------------------------------------------------------- @@ -129,7 +129,8 @@ double ComputeReduceRegion::compute_one(int m, int flag) } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->peratom_freq) - error->all(FLERR, "Fix {} used in compute {} not computed at compatible time", val.id, style); + error->all(FLERR, Error::NOLASTLINE, "Fix {} used in compute {} not computed at compatible" + " time{}", val.id, style, utils::errorurl(7)); if (aidx == 0) { double *fix_vector = val.val.f->vector_atom; diff --git a/src/compute_slice.cpp b/src/compute_slice.cpp index 9851c430c4..8a44d2bc8e 100644 --- a/src/compute_slice.cpp +++ b/src/compute_slice.cpp @@ -34,9 +34,10 @@ ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, nar nstop = utils::inumeric(FLERR, arg[4], false, lmp); nskip = utils::inumeric(FLERR, arg[5], false, lmp); - if (nstart < 1) error->all(FLERR, "Invalid compute slice nstart value {} < 1", nstart); - if (nstop < nstart) error->all(FLERR, "Invalid compute slice nstop value {} < {}", nstop, nstart); - if (nskip < 1) error->all(FLERR, "Invalid compute slice nskip value < 1: {}", nskip); + if (nstart < 1) error->all(FLERR, 3, "Invalid compute slice nstart value {} < 1", nstart); + if (nstop < nstart) + error->all(FLERR, 4, "Invalid compute slice nstop value {} < {}", nstop, nstart); + if (nskip < 1) error->all(FLERR, 5, "Invalid compute slice nskip value < 1: {}", nskip); // parse values @@ -47,11 +48,12 @@ ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, nar value_t val; val.which = argi.get_type(); val.argindex = argi.get_index1(); + val.iarg = iarg; val.id = argi.get_name(); val.val.c = nullptr; if ((val.which == ArgInfo::UNKNOWN) || (val.which == ArgInfo::NONE) || (argi.get_dim() > 1)) - error->all(FLERR, "Illegal compute slice argument: {}", arg[iarg]); + error->all(FLERR, iarg, "Illegal compute slice argument: {}", arg[iarg]); values.push_back(val); } @@ -61,49 +63,63 @@ ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) : Compute(lmp, nar for (auto &val : values) { if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); - if (!val.val.c) error->all(FLERR, "Compute ID {} for compute slice does not exist", val.id); + if (!val.val.c) + error->all(FLERR, val.iarg, "Compute ID {} for compute slice does not exist", val.id); if (val.val.c->vector_flag) { if (val.argindex) - error->all(FLERR, "Compute slice compute {} does not calculate a global array", val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} does not calculate a global array", + val.id); if (nstop > val.val.c->size_vector) - error->all(FLERR, "Compute slice compute {} vector is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.val.c->array_flag) { if (val.argindex == 0) - error->all(FLERR, "Compute slice compute {} does not calculate a global vector", val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} does not calculate a global vector", + val.id); if (val.argindex > val.val.c->size_array_cols) - error->all(FLERR, "Compute slice compute {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nstop > val.val.c->size_array_rows) - error->all(FLERR, "Compute slice compute {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else { - error->all(FLERR, "Compute slice compute {} does not calculate global vector or array", - val.id); + error->all(FLERR, val.iarg, "Compute slice compute {} does not calculate global vector or " + "array", val.id); } } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR, "Fix ID {} for compute slice does not exist", val.id); + if (!val.val.f) + error->all(FLERR, val.iarg, "Fix ID {} for compute slice does not exist", val.id); if (val.val.f->vector_flag) { if (val.argindex) - error->all(FLERR, "Compute slice fix {} does not calculate a global array", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} does not calculate a global array", + val.id); if (nstop > val.val.f->size_vector) - error->all(FLERR, "Compute slice fix {} vector is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.val.f->array_flag) { if (val.argindex == 0) - error->all(FLERR, "Compute slice fix {} does not calculate a global vector", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} does not calculate a global vector", + val.id); if (val.argindex > val.val.f->size_array_cols) - error->all(FLERR, "Compute slice fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nstop > val.val.f->size_array_rows) - error->all(FLERR, "Compute slice fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else { - error->all(FLERR, "Compute slice fix {} does not calculate global vector or array", val.id); + error->all(FLERR, val.iarg, "Compute slice fix {} does not calculate global vector or " + "array", val.id); } } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute slice does not exist", val.id); + error->all(FLERR, val.iarg, "Variable name {} for compute slice does not exist", val.id); if (val.argindex == 0 && input->variable->vectorstyle(val.val.v) == 0) - error->all(FLERR, "Compute slice variable {} is not vector-style variable", val.id); + error->all(FLERR, val.iarg, "Compute slice variable {} is not vector-style variable", + val.id); if (val.argindex) - error->all(FLERR, "Compute slice vector variable {} cannot be indexed", val.id); + error->all(FLERR, val.iarg, "Compute slice vector variable {} cannot be indexed", val.id); } } @@ -195,14 +211,18 @@ void ComputeSlice::init() for (auto &val : values) { if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); - if (!val.val.c) error->all(FLERR, "Compute ID {} for compute slice does not exist", val.id); + if (!val.val.c) + error->all(FLERR, Error::NOLASTLINE, "Compute ID {} for compute slice does not exist", + val.id); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR, "Fix ID {} for compute slice does not exist", val.id); + if (!val.val.f) + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for compute slice does not exist", val.id); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, "Variable name {} for compute slice does not exist", val.id); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for compute slice does not exist", + val.id); } } } @@ -267,7 +287,8 @@ void ComputeSlice::extract_one(int m, double *vec, int stride) } else if (val.which == ArgInfo::FIX) { if (update->ntimestep % val.val.f->global_freq) - error->all(FLERR, "Fix {} used in compute slice not computed at compatible time", val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix {} used in compute slice not computed at " + "compatible time{}", val.id, utils::errorurl(7)); if (val.argindex == 0) { int j = 0; @@ -289,7 +310,8 @@ void ComputeSlice::extract_one(int m, double *vec, int stride) } else if (val.which == ArgInfo::VARIABLE) { double *varvec; int nvec = input->variable->compute_vector(val.val.v, &varvec); - if (nvec < nstop) error->all(FLERR, "Compute slice variable {} is not long enough", val.id); + if (nvec < nstop) + error->all(FLERR, Error::NOLASTLINE, "Compute slice variable {} is not long enough", val.id); int j = 0; for (int i = nstart; i < nstop; i += nskip) { vec[j] = varvec[i - 1]; diff --git a/src/compute_slice.h b/src/compute_slice.h index c1575f4fc8..ddb8a7b45e 100644 --- a/src/compute_slice.h +++ b/src/compute_slice.h @@ -36,6 +36,7 @@ class ComputeSlice : public Compute { struct value_t { int which; int argindex; + int iarg; std::string id; union { class Compute *c; diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index dc00e2e1d1..7be67f4c49 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -73,7 +73,7 @@ CreateAtoms::CreateAtoms(LAMMPS *lmp) : Command(lmp), basistype(nullptr) {} void CreateAtoms::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Create_atoms command before simulation box is defined"); + error->all(FLERR, "Create_atoms command before simulation box is defined" + utils::errorurl(33)); if (modify->nfix_restart_peratom) error->all(FLERR, "Cannot create_atoms after reading restart file with per-atom info"); diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index b7208e256e..fa2d0d5018 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -44,7 +44,7 @@ CreateBonds::CreateBonds(LAMMPS *lmp) : Command(lmp) {} void CreateBonds::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Create_bonds command before simulation box is defined"); + error->all(FLERR, "Create_bonds command before simulation box is defined" + utils::errorurl(33)); if (atom->tag_enable == 0) error->all(FLERR, "Cannot use create_bonds unless atoms have IDs"); if (atom->molecular != Atom::MOLECULAR) error->all(FLERR, "Cannot use create_bonds with non-molecular system"); diff --git a/src/create_box.cpp b/src/create_box.cpp index 93e699e06b..52d56a4ea1 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -38,7 +38,8 @@ void CreateBox::command(int narg, char **arg) { if (narg < 2) utils::missing_cmd_args(FLERR, "create_box", error); - if (domain->box_exist) error->all(FLERR, "Cannot create_box after simulation box is defined"); + if (domain->box_exist) + error->all(FLERR, "Cannot create_box after simulation box is defined" + utils::errorurl(34)); if (domain->dimension == 2 && domain->zperiodic == 0) error->all(FLERR, "Cannot run 2d simulation with nonperiodic Z dimension"); diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index b8e5309ffc..bb3a4a2604 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -52,7 +52,7 @@ DeleteAtoms::DeleteAtoms(LAMMPS *lmp) : Command(lmp) {} void DeleteAtoms::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Delete_atoms command before simulation box is defined"); + error->all(FLERR, "Delete_atoms command before simulation box is defined" + utils::errorurl(33)); if (narg < 1) utils::missing_cmd_args(FLERR, "delete_atoms", error); if (atom->tag_enable == 0) error->all(FLERR, "Cannot use delete_atoms unless atoms have IDs"); diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index 6f153a7a73..c45656b684 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -40,7 +40,7 @@ DeleteBonds::DeleteBonds(LAMMPS *lmp) : Command(lmp) {} void DeleteBonds::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Delete_bonds command before simulation box is defined"); + error->all(FLERR,"Delete_bonds command before simulation box is defined" + utils::errorurl(33)); if (atom->natoms == 0) error->all(FLERR,"Delete_bonds command with no atoms existing"); if (atom->molecular != Atom::MOLECULAR) diff --git a/src/dihedral.cpp b/src/dihedral.cpp index 2f591b1fc1..14b59d2542 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "suffix.h" #include "update.h" @@ -68,9 +69,14 @@ Dihedral::~Dihedral() void Dihedral::init() { - if (!allocated && atom->ndihedraltypes) error->all(FLERR, "Dihedral coeffs are not set"); + if (!allocated && atom->ndihedraltypes) + error->all(FLERR, Error::NOLASTLINE, + "Dihedral coeffs are not set. Status:\n" + Info::get_dihedral_coeff_status(lmp)); for (int i = 1; i <= atom->ndihedraltypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All dihedral coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All dihedral coeffs are not set. Status:\n" + + Info::get_dihedral_coeff_status(lmp)); init_style(); } diff --git a/src/dihedral_write.cpp b/src/dihedral_write.cpp index 11d283dc27..24cae8db3b 100644 --- a/src/dihedral_write.cpp +++ b/src/dihedral_write.cpp @@ -42,12 +42,12 @@ void DihedralWrite::command(int narg, char **arg) // sanity checks if (domain->box_exist == 0) - error->all(FLERR, "Dihedral_write command before simulation box is defined"); + error->all(FLERR, "Dihedral_write command before simulation box is defined" + utils::errorurl(33)); if (atom->avec->dihedrals_allow == 0) error->all(FLERR, "Dihedral_write command when no dihedrals allowed"); auto dihedral = force->dihedral; if (dihedral == nullptr) - error->all(FLERR, "Dihedral_write command before an dihedral_style is defined"); + error->all(FLERR, "Dihedral_write command before an dihedral_style is defined" + utils::errorurl(33)); if (dihedral && (force->dihedral->writedata == 0)) error->all(FLERR, "Dihedral style must support writing coeffs to data file for dihedral_write"); diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 98cfea224d..88b888200c 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -63,7 +63,7 @@ void DisplaceAtoms::command(int narg, char **arg) int i; if (domain->box_exist == 0) - error->all(FLERR,"Displace_atoms command before simulation box is defined"); + error->all(FLERR,"Displace_atoms command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) error->all(FLERR,"Illegal displace_atoms command"); if (modify->nfix_restart_peratom) error->all(FLERR,"Cannot displace_atoms after " @@ -362,8 +362,8 @@ void DisplaceAtoms::command(int narg, char **arg) bigint nblocal = atom->nlocal; MPI_Allreduce(&nblocal,&natoms,1,MPI_LMP_BIGINT,MPI_SUM,world); if (natoms != atom->natoms && comm->me == 0) - error->warning(FLERR,"Lost atoms via displace_atoms: original {} " - "current {}"+utils::errorurl(8),atom->natoms,natoms); + error->warning(FLERR,"Lost atoms via displace_atoms: original {} current {}"+utils::errorurl(8), + atom->natoms,natoms); } /* ---------------------------------------------------------------------- diff --git a/src/dump.cpp b/src/dump.cpp index b6d8cf535a..ae0d15e745 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -223,14 +223,15 @@ void Dump::init() if (sort_flag) { if (multiproc > 1) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Cannot sort dump when 'nfile' or 'fileper' keywords have non-default values"); if (sortcol == 0 && atom->tag_enable == 0) - error->all(FLERR,"Cannot sort dump on atom IDs with no atom IDs defined"); + error->all(FLERR, Error::NOLASTLINE, + "Cannot sort dump on atom IDs with no atom IDs defined"); if (sortcol && sortcol > size_one) - error->all(FLERR,"Dump sort column index {} is invalid", sortcol); + error->all(FLERR, Error::NOLASTLINE, "Dump sort column index {} is invalid", sortcol); if ((sortcol != 0) && (has_id == 0) && (me == 0)) - error->warning(FLERR,"Dump {} includes no atom IDs and is not sorted by ID. " + error->warning(FLERR, "Dump {} includes no atom IDs and is not sorted by ID. " "This may complicate post-processing tasks or visualization", id); if (nprocs > 1 && irregular == nullptr) irregular = new Irregular(lmp); @@ -290,16 +291,18 @@ void Dump::init() if (refreshflag) { irefresh = modify->get_compute_by_id(idrefresh); - if (!irefresh) error->all(FLERR,"Dump could not find refresh compute ID {}", idrefresh); + if (!irefresh) + error->all(FLERR, Error::NOLASTLINE, "Dump could not find refresh compute ID {}", idrefresh); } // if skipflag, check skip variable if (skipflag) { skipindex = input->variable->find(skipvar); - if (skipindex < 0) error->all(FLERR,"Dump skip variable not found"); + if (skipindex < 0) + error->all(FLERR, Error::NOLASTLINE, "Dump skip variable {} not found", skipvar); if (!input->variable->equalstyle(skipindex)) - error->all(FLERR,"Variable for dump skip is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable {} for dump skip is invalid style", skipvar); } // preallocation for PBC copies if requested @@ -390,7 +393,7 @@ void Dump::write() if (nmax*size_one > maxbuf) { if ((bigint) nmax * size_one > MAXSMALLINT) - error->all(FLERR,"Too much per-proc info for dump"); + error->all(FLERR, Error::NOLASTLINE, "Too much per-proc data for dump"); maxbuf = nmax * size_one; memory->destroy(buf); memory->create(buf,maxbuf,"dump:buf"); @@ -458,7 +461,8 @@ void Dump::write() nsme = convert_string(nme,buf); int nsmin,nsmax; MPI_Allreduce(&nsme,&nsmin,1,MPI_INT,MPI_MIN,world); - if (nsmin < 0) error->all(FLERR,"Too much buffered per-proc info for dump"); + if (nsmin < 0) + error->all(FLERR, Error::NOLASTLINE, "Too much buffered per-proc data for dump"); if (multiproc != nprocs) MPI_Allreduce(&nsme,&nsmax,1,MPI_INT,MPI_MAX,world); else nsmax = nsme; @@ -535,7 +539,8 @@ void Dump::write() if (filewriter && fp != nullptr) write_footer(); - if (fp && ferror(fp)) error->one(FLERR,"Error writing dump {}: {}", id, utils::getsyserror()); + if (fp && ferror(fp)) + error->one(FLERR, Error::NOLASTLINE, "Error writing dump {}: {}", id, utils::getsyserror()); // if file per timestep, close file if I am filewriter @@ -597,7 +602,9 @@ void Dump::openfile() fp = fopen(filecurrent,"w"); } - if (fp == nullptr) error->one(FLERR,"Cannot open dump file"); + if (fp == nullptr) + error->one(FLERR, Error::NOLASTLINE, "Cannot open dump file {}:{}", + filecurrent, utils::getsyserror()); } else fp = nullptr; // delete string with timestep replaced @@ -1069,7 +1076,7 @@ void Dump::modify_params(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "dump_modify buffer", error); buffer_flag = utils::logical(FLERR,arg[iarg+1],false,lmp); if (buffer_flag && buffer_allow == 0) - error->all(FLERR,"Dump_modify buffer yes not allowed for this style"); + error->all(FLERR, iarg + 2, "Dump_modify buffer yes not allowed for this style"); iarg += 2; } else if (strcmp(arg[iarg],"colname") == 0) { @@ -1092,7 +1099,7 @@ void Dump::modify_params(int narg, char **arg) } } if ((icol < 0) || (icol >= (int)keyword_user.size())) - error->all(FLERR, "Incorrect dump_modify arguments: {} {} {}", + error->all(FLERR, Error::NOPOINTER, "Incorrect dump_modify arguments: {} {} {}", arg[iarg], arg[iarg+1], arg[iarg+2]); keyword_user[icol] = arg[iarg+2]; iarg += 3; @@ -1137,7 +1144,8 @@ void Dump::modify_params(int narg, char **arg) delta = 0.0; } else { delta = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (delta <= 0.0) error->all(FLERR, "Invalid dump_modify every/time argument: {}", delta); + if (delta <= 0.0) + error->all(FLERR, iarg + 1, "Invalid dump_modify every/time argument: {}", delta); } output->mode_dump[idump] = 1; output->every_time_dump[idump] = delta; @@ -1147,9 +1155,9 @@ void Dump::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"fileper") == 0) { if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "dump_modify fileper", error); if (!multiproc) - error->all(FLERR,"Cannot use dump_modify fileper without % in dump file name"); + error->all(FLERR, iarg, "Cannot use dump_modify fileper without % in dump file name"); int nper = utils::inumeric(FLERR,arg[iarg+1],false,lmp); - if (nper <= 0) error->all(FLERR, "Invalid dump_modify fileper argument: {}", nper); + if (nper <= 0) error->all(FLERR, iarg + 1, "Invalid dump_modify fileper argument: {}", nper); multiproc = nprocs/nper; if (nprocs % nper) multiproc++; @@ -1207,7 +1215,8 @@ void Dump::modify_params(int narg, char **arg) iarg += 3; } else { // pass other format options to child classes int n = modify_param(narg-iarg,&arg[iarg]); - if (n == 0) error->all(FLERR,"Unknown dump_modify format keyword: {}", arg[iarg+1]); + if (n == 0) + error->all(FLERR, iarg + 1, "Unknown dump_modify format keyword: {}", arg[iarg+1]); iarg += n; } @@ -1219,7 +1228,7 @@ void Dump::modify_params(int narg, char **arg) } else if (strcmp(arg[iarg],"maxfiles") == 0) { if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "dump_modify maxfiles", error); if (!multifile) - error->all(FLERR,"Cannot use dump_modify maxfiles without * in dump file name"); + error->all(FLERR, "Cannot use dump_modify maxfiles without * in dump file name"); // wipe out existing storage if (maxfiles > 0) { for (int idx=0; idx < numfiles; ++idx) diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 5c86b390ac..56836b8446 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -68,13 +68,15 @@ DumpCustom::DumpCustom(LAMMPS *lmp, int narg, char **arg) : clearstep = 1; nevery = utils::inumeric(FLERR,arg[3],false,lmp); - if (nevery <= 0) error->all(FLERR,"Illegal dump {} command: output frequency must be > 0", style); + if (nevery <= 0) + error->all(FLERR, 3, "Illegal dump {} command: output frequency must be > 0", style); // expand args if any have wildcard character "*" // ok to include trailing optional args, // so long as they do not have "*" between square brackets // nfield may be shrunk below if extra optional args exist + int ioffset = 5; expand = 0; nfield = nargnew = utils::expand_args(FLERR,narg-5,&arg[5],1,earg,lmp); if (earg != &arg[5]) expand = 1; @@ -446,7 +448,8 @@ void DumpCustom::init_style() fix[i] = modify->get_fix_by_id(id_fix[i]); if (!fix[i]) error->all(FLERR,"Could not find dump {} fix ID {}", style, id_fix[i]); if (nevery % fix[i]->peratom_freq) - error->all(FLERR,"Dump {} and fix not computed at compatible times", style); + error->all(FLERR,"Dump {} and fix not computed at compatible times{}", style, + utils::errorurl(7)); } for (i = 0; i < nvariable; i++) { @@ -460,7 +463,7 @@ void DumpCustom::init_style() for (int i = 0; i < ncustom; i++) { icustom = atom->find_custom(id_custom[i],flag,cols); if (icustom < 0) - error->all(FLERR,"Could not find dump {} atom property name", style); + error->all(FLERR, "Could not find dump {} atom property name", style); custom[i] = icustom; if (!flag && !cols) custom_flag[i] = IVEC; else if (flag && !cols) custom_flag[i] = DVEC; @@ -482,7 +485,8 @@ void DumpCustom::init_style() void DumpCustom::write_header(bigint ndump) { - if (!header_choice) error->all(FLERR, "Must not use 'run pre no' after creating a new dump"); + if (!header_choice) + error->all(FLERR, Error::NOLASTLINE, "Must not use 'run pre no' after creating a new dump"); if (multiproc) (this->*header_choice)(ndump); else if (me == 0) (this->*header_choice)(ndump); @@ -742,7 +746,8 @@ int DumpCustom::count() if (ncompute) { for (i = 0; i < ncompute; i++) { if (!compute[i]->is_initialized()) - error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run", + error->all(FLERR, Error::NOLASTLINE, + "Dump compute ID {} cannot be invoked before initialization by a run", compute[i]->id); if (!(compute[i]->invoked_flag & Compute::INVOKED_PERATOM)) { compute[i]->compute_peratom(); @@ -800,7 +805,7 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == MOL) { if (!atom->molecule_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); tagint *molecule = atom->molecule; for (i = 0; i < nlocal; i++) dchoose[i] = molecule[i]; @@ -1074,39 +1079,44 @@ int DumpCustom::count() } else if (thresh_array[ithresh] == Q) { if (!atom->q_flag) - error->all(FLERR,"Threshold for an atom property that isn't allocated"); + error->all(FLERR, Error::NOLASTLINE, + "Threshold for an atom property that isn't allocated"); ptr = atom->q; nstride = 1; } else if (thresh_array[ithresh] == MUX) { if (!atom->mu_flag) - error->all(FLERR,"Threshold for an atom property that isn't allocated"); + error->all(FLERR, Error::NOLASTLINE, + "Threshold for an atom property that isn't allocated"); ptr = &atom->mu[0][0]; nstride = 4; } else if (thresh_array[ithresh] == MUY) { if (!atom->mu_flag) - error->all(FLERR,"Threshold for an atom property that isn't allocated"); + error->all(FLERR, Error::NOLASTLINE, + "Threshold for an atom property that isn't allocated"); ptr = &atom->mu[0][1]; nstride = 4; } else if (thresh_array[ithresh] == MUZ) { if (!atom->mu_flag) - error->all(FLERR,"Threshold for an atom property that isn't allocated"); + error->all(FLERR, Error::NOLASTLINE, + "Threshold for an atom property that isn't allocated"); ptr = &atom->mu[0][2]; nstride = 4; } else if (thresh_array[ithresh] == MU) { if (!atom->mu_flag) - error->all(FLERR,"Threshold for an atom property that isn't allocated"); + error->all(FLERR, Error::NOLASTLINE, + "Threshold for an atom property that isn't allocated"); ptr = &atom->mu[0][3]; nstride = 4; } else if (thresh_array[ithresh] == RADIUS) { if (!atom->radius_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = atom->radius; nstride = 1; } else if (thresh_array[ithresh] == DIAMETER) { if (!atom->radius_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); double *radius = atom->radius; for (i = 0; i < nlocal; i++) dchoose[i] = 2.0*radius[i]; @@ -1114,55 +1124,55 @@ int DumpCustom::count() nstride = 1; } else if (thresh_array[ithresh] == OMEGAX) { if (!atom->omega_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->omega[0][0]; nstride = 3; } else if (thresh_array[ithresh] == OMEGAY) { if (!atom->omega_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->omega[0][1]; nstride = 3; } else if (thresh_array[ithresh] == OMEGAZ) { if (!atom->omega_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->omega[0][2]; nstride = 3; } else if (thresh_array[ithresh] == ANGMOMX) { if (!atom->angmom_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->angmom[0][0]; nstride = 3; } else if (thresh_array[ithresh] == ANGMOMY) { if (!atom->angmom_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->angmom[0][1]; nstride = 3; } else if (thresh_array[ithresh] == ANGMOMZ) { if (!atom->angmom_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->angmom[0][2]; nstride = 3; } else if (thresh_array[ithresh] == TQX) { if (!atom->torque_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->torque[0][0]; nstride = 3; } else if (thresh_array[ithresh] == TQY) { if (!atom->torque_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->torque[0][1]; nstride = 3; } else if (thresh_array[ithresh] == TQZ) { if (!atom->torque_flag) - error->all(FLERR, + error->all(FLERR, Error::NOLASTLINE, "Threshold for an atom property that isn't allocated"); ptr = &atom->torque[0][2]; nstride = 3; diff --git a/src/dump_image.cpp b/src/dump_image.cpp index ee44db0945..609223a9ec 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -67,7 +67,8 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : gbuf(nullptr), avec_line(nullptr), avec_tri(nullptr), avec_body(nullptr), fixptr(nullptr), image(nullptr), chooseghost(nullptr), bufcopy(nullptr) { - if (binary || multiproc) error->all(FLERR, "Invalid dump image filename"); + if (binary || multiproc) + error->all(FLERR, 4, "Invalid dump image filename {}", filename); // force binary flag on to avoid corrupted output on Windows @@ -89,16 +90,18 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : #ifndef LAMMPS_JPEG if (filetype == JPG) - error->all(FLERR,"Support for writing images in JPEG format not included"); + error->all(FLERR, Error::NOLASTLINE, "Support for writing images in JPEG format not included"); #endif #ifndef LAMMPS_PNG if (filetype == PNG) - error->all(FLERR,"Support for writing images in PNG format not included"); + error->all(FLERR, Error::NOLASTLINE, "Support for writing images in PNG format not included"); #endif // atom color,diameter settings - if (nfield != 2) error->all(FLERR,"Illegal dump image command"); + if (nfield != 2) + error->all(FLERR, Error::NOPOINTER, + "Dump image command is missing attributes for color and size"); acolor = ATTRIBUTE; if (strcmp(arg[5],"type") == 0) acolor = TYPE; @@ -147,45 +150,48 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : int iarg = ioptional; while (iarg < narg) { if (strcmp(arg[iarg],"atom") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image atom", error); atomflag = utils::logical(FLERR,arg[iarg+1],false,lmp); iarg += 2; } else if (strcmp(arg[iarg],"adiam") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image adiam", error); adiam = NUMERIC; adiamvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (adiamvalue <= 0.0) error->all(FLERR,"Illegal dump image command"); + if (adiamvalue <= 0.0) + error->all(FLERR, iarg+1, "Illegal dump image adiam value {}", adiamvalue); iarg += 2; } else if (strcmp(arg[iarg],"bond") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image bond", error); if (atom->nbondtypes == 0) - error->all(FLERR,"Dump image bond not allowed with no bond types"); + error->all(FLERR, iarg, "Dump image bond not allowed with no bond types defined"); bondflag = YES; if (strcmp(arg[iarg+1],"none") == 0) bondflag = NO; else if (strcmp(arg[iarg+1],"atom") == 0) bcolor = ATOM; else if (strcmp(arg[iarg+1],"type") == 0) bcolor = TYPE; - else error->all(FLERR,"Illegal dump image command"); + else error->all(FLERR, iarg + 1, "Unknown dump image bond color setting {}", arg[iarg + 1]); if (!islower(arg[iarg+2][0])) { bdiam = NUMERIC; bdiamvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp); - if (bdiamvalue <= 0.0) error->all(FLERR,"Illegal dump image command"); + if (bdiamvalue <= 0.0) + error->all(FLERR, iarg + 2,"Illegal dump image bond diameter value {}", bdiamvalue); } else if (strcmp(arg[iarg+2],"atom") == 0) bdiam = ATOM; else if (strcmp(arg[iarg+2],"type") == 0) bdiam = TYPE; else if (strcmp(arg[iarg+2],"none") == 0) bondflag = NO; - else error->all(FLERR,"Illegal dump image command"); + else error->all(FLERR, iarg + 2, "Unknown dump image bond diameter setting {}", arg[iarg+2]); iarg += 3; } else if (strcmp(arg[iarg],"grid") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image grid", error); gridflag = YES; char *id; int igrid,idata,index; int iflag = utils::check_grid_reference((char *) "Dump image", arg[iarg+1], nevery, id, igrid,idata,index,lmp); - if (iflag < 0) error->all(FLERR,"Invalid grid reference in dump image command"); + if (iflag < 0) + error->all(FLERR, iarg+1, "Invalid grid reference {} in dump image command", arg[iarg+1]); if (iflag == ArgInfo::COMPUTE) { delete[] id_grid_compute; @@ -201,7 +207,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"line") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image line", error); lineflag = YES; if (strcmp(arg[iarg+1],"type") == 0) lcolor = TYPE; else error->all(FLERR,"Illegal dump image command"); @@ -210,7 +216,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 3; } else if (strcmp(arg[iarg],"tri") == 0) { - if (iarg+4 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+4 > narg) utils::missing_cmd_args(FLERR,"dump image tri", error); triflag = YES; if (strcmp(arg[iarg+1],"type") == 0) tcolor = TYPE; else error->all(FLERR,"Illegal dump image command"); @@ -219,7 +225,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 4; } else if (strcmp(arg[iarg],"body") == 0) { - if (iarg+4 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+4 > narg) utils::missing_cmd_args(FLERR,"dump image body", error); bodyflag = YES; if (strcmp(arg[iarg+1],"type") == 0) bodycolor = TYPE; else error->all(FLERR,"Illegal dump image command"); @@ -228,7 +234,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 4; } else if (strcmp(arg[iarg],"fix") == 0) { - if (iarg+5 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+5 > narg) utils::missing_cmd_args(FLERR,"dump image fix", error); fixflag = YES; fixID = arg[iarg+1]; if (strcmp(arg[iarg+2],"type") == 0) fixcolor = TYPE; @@ -238,7 +244,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 5; } else if (strcmp(arg[iarg],"size") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image size", error); int width = utils::inumeric(FLERR,arg[iarg+1],false,lmp); int height = utils::inumeric(FLERR,arg[iarg+2],false,lmp); if (width <= 0 || height <= 0) error->all(FLERR,"Illegal dump image command"); @@ -252,7 +258,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 3; } else if (strcmp(arg[iarg],"view") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image view", error); if (utils::strmatch(arg[iarg+1],"^v_")) { delete[] thetastr; thetastr = utils::strdup(arg[iarg+1]+2); @@ -271,7 +277,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 3; } else if (strcmp(arg[iarg],"center") == 0) { - if (iarg+5 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+5 > narg) utils::missing_cmd_args(FLERR,"dump image center", error); if (strcmp(arg[iarg+1],"s") == 0) cflag = STATIC; else if (strcmp(arg[iarg+1],"d") == 0) cflag = DYNAMIC; else error->all(FLERR,"Illegal dump image command"); @@ -293,7 +299,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 5; } else if (strcmp(arg[iarg],"up") == 0) { - if (iarg+4 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+4 > narg) utils::missing_cmd_args(FLERR,"dump image up", error); if (utils::strmatch(arg[iarg+1],"^v_")) { delete[] upxstr; upxstr = utils::strdup(arg[iarg+1]+2); @@ -309,7 +315,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 4; } else if (strcmp(arg[iarg],"zoom") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image zoom", error); if (utils::strmatch(arg[iarg+1],"^v_")) { delete[] zoomstr; zoomstr = utils::strdup(arg[iarg+1]+2); @@ -321,14 +327,14 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"box") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image box", error); boxflag = utils::logical(FLERR,arg[iarg+1],false,lmp); boxdiam = utils::numeric(FLERR,arg[iarg+2],false,lmp); if (boxdiam < 0.0) error->all(FLERR,"Illegal dump image command"); iarg += 3; } else if (strcmp(arg[iarg],"axes") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image axes", error); axesflag = utils::logical(FLERR,arg[iarg+1],false,lmp); axeslen = utils::numeric(FLERR,arg[iarg+2],false,lmp); axesdiam = utils::numeric(FLERR,arg[iarg+3],false,lmp); @@ -337,14 +343,14 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 4; } else if (strcmp(arg[iarg],"subbox") == 0) { - if (iarg+3 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+3 > narg) utils::missing_cmd_args(FLERR,"dump image subbox", error); subboxflag = utils::logical(FLERR,arg[iarg+1],false,lmp); subboxdiam = utils::numeric(FLERR,arg[iarg+2],false,lmp); if (subboxdiam < 0.0) error->all(FLERR,"Illegal dump image command"); iarg += 3; } else if (strcmp(arg[iarg],"shiny") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image shiny", error); double shiny = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (shiny < 0.0 || shiny > 1.0) error->all(FLERR,"Illegal dump image command"); @@ -352,7 +358,7 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"fsaa") == 0) { - if (iarg+2 > narg) error->all(FLERR,"Illegal dump_modify command"); + if (iarg+2 > narg) utils::missing_cmd_args(FLERR,"dump image fsaa", error); int aa = utils::logical(FLERR, arg[iarg+1], false, lmp); if (aa) { if (!image->fsaa) { @@ -369,10 +375,10 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : iarg += 2; } else if (strcmp(arg[iarg],"ssao") == 0) { - if (iarg+4 > narg) error->all(FLERR,"Illegal dump image command"); + if (iarg+4 > narg) utils::missing_cmd_args(FLERR,"dump image ssao", error); image->ssao = utils::logical(FLERR,arg[iarg+1],false,lmp); int seed = utils::inumeric(FLERR,arg[iarg+2],false,lmp); - if (seed <= 0) error->all(FLERR,"Illegal dump image command"); + if (seed <= 0) error->all(FLERR, iarg + 2, "Illegal dump image ssao seed {}", seed); image->seed = seed; double ssaoint = utils::numeric(FLERR,arg[iarg+3],false,lmp); if (ssaoint < 0.0 || ssaoint > 1.0) @@ -388,17 +394,17 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : if (lineflag) { avec_line = dynamic_cast(atom->style_match("line")); if (!avec_line) - error->all(FLERR,"Dump image line requires atom style line"); + error->all(FLERR, Error::NOLASTLINE, "Dump image line requires atom style line"); } if (triflag) { avec_tri = dynamic_cast(atom->style_match("tri")); if (!avec_tri) - error->all(FLERR,"Dump image tri requires atom style tri"); + error->all(FLERR, Error::NOLASTLINE, "Dump image tri requires atom style tri"); } if (bodyflag) { avec_body = dynamic_cast(atom->style_match("body")); if (!avec_body) - error->all(FLERR,"Dump image body yes requires atom style body"); + error->all(FLERR, Error::NOLASTLINE, "Dump image body yes requires atom style body"); } extraflag = 0; @@ -406,7 +412,8 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : if (fixflag) { fixptr = modify->get_fix_by_id(fixID); - if (!fixptr) error->all(FLERR,"Fix ID {} for dump image does not exist", fixID); + if (!fixptr) + error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for dump image does not exist", fixID); } @@ -507,8 +514,9 @@ DumpImage::~DumpImage() void DumpImage::init_style() { if (multifile == 0 && !multifile_override) - error->all(FLERR,"Dump image requires one snapshot per file"); - if (sort_flag) error->all(FLERR,"Dump image cannot perform sorting"); + error->all(FLERR, Error::NOLASTLINE, + "Dump image requires file name with '*' requesting one snapshot per file"); + if (sort_flag) error->all(FLERR, Error::NOLASTLINE, "Dump image cannot perform sorting"); DumpCustom::init_style(); @@ -519,12 +527,15 @@ void DumpImage::init_style() if (id_grid_compute) { grid_compute = modify->get_compute_by_id(id_grid_compute); if (!grid_compute) - error->all(FLERR,"Could not find dump image grid compute ID {}",id_grid_compute); + error->all(FLERR, Error::NOLASTLINE, + "Could not find dump image grid compute ID {}", id_grid_compute); } else if (id_grid_fix) { grid_fix = modify->get_fix_by_id(id_grid_fix); - if (!grid_fix) error->all(FLERR,"Could not find dump image fix ID {}",id_grid_fix); + if (!grid_fix) + error->all(FLERR, Error::NOLASTLINE, "Could not find dump image fix ID {}",id_grid_fix); if (nevery % grid_fix->peratom_freq) - error->all(FLERR,"Dump image and grid fix not computed at compatible times"); + error->all(FLERR, Error::NOLASTLINE, "Dump image and grid fix {} not computed at " + "compatible times{}", id_grid_fix, utils::errorurl(7)); } } @@ -533,65 +544,65 @@ void DumpImage::init_style() if (thetastr) { thetavar = input->variable->find(thetastr); if (thetavar < 0) - error->all(FLERR,"Variable name for dump image theta does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image theta does not exist"); if (!input->variable->equalstyle(thetavar)) - error->all(FLERR,"Variable for dump image theta is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image theta is invalid style"); } if (phistr) { phivar = input->variable->find(phistr); if (phivar < 0) - error->all(FLERR,"Variable name for dump image phi does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image phi does not exist"); if (!input->variable->equalstyle(phivar)) - error->all(FLERR,"Variable for dump image phi is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image phi is invalid style"); } if (cxstr) { cxvar = input->variable->find(cxstr); if (cxvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(cxvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (cystr) { cyvar = input->variable->find(cystr); if (cyvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(cyvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (czstr) { czvar = input->variable->find(czstr); if (czvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(czvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (upxstr) { upxvar = input->variable->find(upxstr); if (upxvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(upxvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (upystr) { upyvar = input->variable->find(upystr); if (upyvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(upyvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (upzstr) { upzvar = input->variable->find(upzstr); if (upzvar < 0) - error->all(FLERR,"Variable name for dump image center does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image center does not exist"); if (!input->variable->equalstyle(upzvar)) - error->all(FLERR,"Variable for dump image center is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image center is invalid style"); } if (zoomstr) { zoomvar = input->variable->find(zoomstr); if (zoomvar < 0) - error->all(FLERR,"Variable name for dump image zoom does not exist"); + error->all(FLERR, Error::NOLASTLINE, "Variable name for dump image zoom does not exist"); if (!input->variable->equalstyle(zoomvar)) - error->all(FLERR,"Variable for dump image zoom is invalid style"); + error->all(FLERR, Error::NOLASTLINE, "Variable for dump image zoom is invalid style"); } // set up type -> element mapping @@ -600,7 +611,7 @@ void DumpImage::init_style() for (int i = 1; i <= ntypes; i++) { colorelement[i] = image->element2color(typenames[i]); if (colorelement[i] == nullptr) - error->all(FLERR,"Invalid dump image element name"); + error->all(FLERR, Error::NOLASTLINE, "Invalid dump image element name"); } } @@ -608,7 +619,7 @@ void DumpImage::init_style() for (int i = 1; i <= ntypes; i++) { diamelement[i] = image->element2diam(typenames[i]); if (diamelement[i] == 0.0) - error->all(FLERR,"Invalid dump image element name"); + error->all(FLERR, Error::NOLASTLINE, "Invalid dump image element name"); } } } diff --git a/src/dump_local.cpp b/src/dump_local.cpp index 7394ec4481..ac09768422 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -19,6 +19,7 @@ #include "domain.h" #include "error.h" #include "fix.h" +#include "input.h" #include "memory.h" #include "modify.h" #include "update.h" @@ -43,10 +44,10 @@ DumpLocal::DumpLocal(LAMMPS *lmp, int narg, char **arg) : clearstep = 1; nevery = utils::inumeric(FLERR,arg[3],false,lmp); - if (nevery <= 0) error->all(FLERR,"Illegal dump local command"); + if (nevery <= 0) error->all(FLERR, 3, "Dump local nevery value {} must be > 0", nevery); if (binary) - error->all(FLERR,"Binary files are not supported with dump local"); + error->all(FLERR, 2, "Binary files are not supported with dump local"); nfield = narg - 5; @@ -170,7 +171,7 @@ void DumpLocal::init_style() columns = utils::strdup(combined); if (sort_flag && sortcol == 0) - error->all(FLERR,"Dump local cannot sort by atom ID"); + error->all(FLERR, Error::NOLASTLINE, "Dump local cannot sort by atom ID"); // format = copy of default or user-specified line format @@ -185,7 +186,7 @@ void DumpLocal::init_style() auto words = utils::split_words(format); if ((int) words.size() < size_one) - error->all(FLERR,"Dump_modify format line is too short: {}", format); + error->all(FLERR, Error::NOLASTLINE, "Dump_modify format line is too short: {}", format); int i=0; for (const auto &word : words) { @@ -218,14 +219,17 @@ void DumpLocal::init_style() for (i = 0; i < ncompute; i++) { compute[i] = modify->get_compute_by_id(id_compute[i]); - if (!compute[i]) error->all(FLERR,"Could not find dump local compute ID {}",id_compute[i]); + if (!compute[i]) + error->all(FLERR, Error::NOLASTLINE, "Could not find dump local compute ID {}",id_compute[i]); } for (i = 0; i < nfix; i++) { fix[i] = modify->get_fix_by_id(id_fix[i]); - if (!fix[i]) error->all(FLERR,"Could not find dump local fix ID {}", id_fix[i]); + if (!fix[i]) + error->all(FLERR, Error::NOLASTLINE, "Could not find dump local fix ID {}", id_fix[i]); if (nevery % fix[i]->local_freq) - error->all(FLERR,"Dump local and fix {} not computed at compatible times", id_fix[i]); + error->all(FLERR, Error::NOLASTLINE, "Dump local and fix {} not computed at " + "compatible times{}", id_fix[i], utils::errorurl(7)); } // open single file, one time only @@ -237,13 +241,17 @@ void DumpLocal::init_style() int DumpLocal::modify_param(int narg, char **arg) { + // determine offset in list of arguments for error pointer. also handle the no match case. + int argoff = 0; + while (input && input->arg[argoff] && (strcmp(input->arg[argoff], arg[0]) != 0)) argoff++; + if (strcmp(arg[0],"label") == 0) { - if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); + if (narg < 2) utils::missing_cmd_args(FLERR,"dump_modify label", error); delete[] label; label = utils::strdup(arg[1]); return 2; } else if (strcmp(arg[0],"format") == 0) { - if (narg < 2) error->all(FLERR,"Illegal dump_modify command"); + if (narg < 2) utils::missing_cmd_args(FLERR, "dump_modify format", error); if (strcmp(arg[1],"none") == 0) { // just clear format_column_user allocated by this dump child class @@ -262,7 +270,7 @@ int DumpLocal::modify_param(int narg, char **arg) // use of &str[1] removes leading '%' from BIGINT_FORMAT string char *ptr = strchr(format_int_user,'d'); if (ptr == nullptr) - error->all(FLERR, "Dump_modify int format does not contain d character"); + error->all(FLERR, argoff + 2, "Dump_modify int format does not contain d character"); char str[8]; snprintf(str,8,"%s",BIGINT_FORMAT); *ptr = '\0'; @@ -276,7 +284,7 @@ int DumpLocal::modify_param(int narg, char **arg) } else { int i = utils::inumeric(FLERR,arg[1],false,lmp) - 1; if (i < 0 || i >= nfield) - error->all(FLERR,"Illegal dump_modify command"); + error->all(FLERR, 1, "Illegal dump_modify format column number {}", i); delete[] format_column_user[i]; format_column_user[i] = utils::strdup(arg[2]); } @@ -330,8 +338,9 @@ int DumpLocal::count() if (ncompute) { for (i = 0; i < ncompute; i++) { if (!compute[i]->is_initialized()) - error->all(FLERR,"Dump compute ID {} cannot be invoked before initialization by a run", - compute[i]->id); + error->all(FLERR, Error::NOLASTLINE, + "Dump compute ID {} cannot be invoked before initialization by a run", + compute[i]->id); if (!(compute[i]->invoked_flag & Compute::INVOKED_LOCAL)) { compute[i]->compute_local(); compute[i]->invoked_flag |= Compute::INVOKED_LOCAL; @@ -347,14 +356,14 @@ int DumpLocal::count() for (i = 0; i < ncompute; i++) { if (nmine < 0) nmine = compute[i]->size_local_rows; else if (nmine != compute[i]->size_local_rows) - error->one(FLERR, + error->one(FLERR, Error::NOLASTLINE, "Dump local count is not consistent across input fields"); } for (i = 0; i < nfix; i++) { if (nmine < 0) nmine = fix[i]->size_local_rows; else if (nmine != fix[i]->size_local_rows) - error->one(FLERR, + error->one(FLERR, Error::NOLASTLINE, "Dump local count is not consistent across input fields"); } @@ -442,11 +451,16 @@ void DumpLocal::write_lines(int n, double *mybuf) void DumpLocal::parse_fields(int narg, char **arg) { + // determine offset in list of arguments for error pointer. + int argoff = 0; + while (input && input->arg[argoff] && (strcmp(input->arg[argoff], arg[0]) != 0)) argoff++; + int computefixflag = 0; // customize by adding to if statement for (int iarg = 0; iarg < narg; iarg++) { + int errptr = iarg + argoff; if (strcmp(arg[iarg],"index") == 0) { pack_choice[iarg] = &DumpLocal::pack_index; @@ -470,15 +484,16 @@ void DumpLocal::parse_fields(int narg, char **arg) pack_choice[iarg] = &DumpLocal::pack_compute; icompute = modify->get_compute_by_id(name); - if (!icompute) error->all(FLERR,"Could not find dump local compute ID {}",name); + if (!icompute) error->all(FLERR, errptr, "Could not find dump local compute ID {}", name); if (icompute->local_flag == 0) - error->all(FLERR,"Dump local compute {} does not compute local info", name); + error->all(FLERR, errptr, "Dump local compute {} does not compute local info", name); if (argi.get_dim() == 0 && icompute->size_local_cols > 0) - error->all(FLERR,"Dump local compute {} does not calculate local vector", name); + error->all(FLERR, errptr, "Dump local compute {} does not calculate local vector", name); if (argi.get_index1() > 0 && icompute->size_local_cols == 0) - error->all(FLERR,"Dump local compute {} does not calculate local array", name); + error->all(FLERR, errptr, "Dump local compute {} does not calculate local array", name); if (argi.get_index1() > 0 && argi.get_index1() > icompute->size_local_cols) - error->all(FLERR,"Dump local compute {} vector is accessed out-of-range", name); + error->all(FLERR, errptr, "Dump local compute {} vector is accessed out-of-range{}", + name, utils::errorurl(20)); field2index[iarg] = add_compute(name); break; @@ -490,15 +505,16 @@ void DumpLocal::parse_fields(int narg, char **arg) pack_choice[iarg] = &DumpLocal::pack_fix; ifix = modify->get_fix_by_id(name); - if (!ifix) error->all(FLERR,"Could not find dump local fix ID {}", name); + if (!ifix) error->all(FLERR, errptr, "Could not find dump local fix ID {}", name); if (ifix->local_flag == 0) - error->all(FLERR,"Dump local fix {} does not compute local info", name); + error->all(FLERR, errptr, "Dump local fix {} does not compute local info", name); if (argi.get_dim() == 0 && ifix->size_local_cols > 0) - error->all(FLERR,"Dump local fix {} does not compute local vector", name); + error->all(FLERR, errptr, "Dump local fix {} does not compute local vector", name); if (argi.get_index1() > 0 && ifix->size_local_cols == 0) - error->all(FLERR,"Dump local fix {} does not compute local array", name); + error->all(FLERR, errptr, "Dump local fix {} does not compute local array", name); if (argi.get_index1() > 0 && argi.get_index1() > ifix->size_local_cols) - error->all(FLERR,"Dump local fix {} vector is accessed out-of-range", name); + error->all(FLERR, errptr, "Dump local fix {} vector is accessed out-of-range{}", name, + utils::errorurl(20)); field2index[iarg] = add_fix(name); break; @@ -506,14 +522,14 @@ void DumpLocal::parse_fields(int narg, char **arg) case ArgInfo::NONE: // fallthrough case ArgInfo::UNKNOWN: // fallthrough default: - error->all(FLERR,"Invalid attribute {} in dump local command",arg[iarg]); + error->all(FLERR, errptr, "Invalid attribute {} in dump local command",arg[iarg]); break; } } } if (computefixflag == 0) - error->all(FLERR,"Dump local attributes contain no compute or fix"); + error->all(FLERR, Error::NOPOINTER, "Dump local attributes contain no compute or fix"); } /* ---------------------------------------------------------------------- diff --git a/src/fix_ave_atom.cpp b/src/fix_ave_atom.cpp index 1a578f527e..bd30509e0f 100644 --- a/src/fix_ave_atom.cpp +++ b/src/fix_ave_atom.cpp @@ -127,29 +127,40 @@ FixAveAtom::FixAveAtom(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), if (val.which == ArgInfo::COMPUTE) { val.val.c = modify->get_compute_by_id(val.id); - if (!val.val.c) error->all(FLERR, val.iarg, "Compute ID {} for fix ave/atom does not exist", val.id); + if (!val.val.c) + error->all(FLERR, val.iarg, "Compute ID {} for fix ave/atom does not exist", val.id); if (val.val.c->peratom_flag == 0) - error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate per-atom values", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate per-atom values", + val.id); if (val.argindex == 0 && val.val.c->size_peratom_cols != 0) - error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate a per-atom vector", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate a per-atom vector", + val.id); if (val.argindex && val.val.c->size_peratom_cols == 0) - error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate a per-atom array", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom compute {} does not calculate a per-atom array", + val.id); if (val.argindex && val.argindex > val.val.c->size_peratom_cols) - error->all(FLERR, val.iarg, "Fix ave/atom compute {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom compute {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); - if (!val.val.f) error->all(FLERR, val.iarg, "Fix ID {} for fix ave/atom does not exist", val.id); + if (!val.val.f) + error->all(FLERR, val.iarg, "Fix ID {} for fix ave/atom does not exist", val.id); if (val.val.f->peratom_flag == 0) - error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate per-atom values", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate per-atom values", + val.id); if (val.argindex == 0 && val.val.f->size_peratom_cols != 0) - error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate a per-atom vector", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate a per-atom vector", + val.id); if (val.argindex && val.val.f->size_peratom_cols == 0) - error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate a per-atom array", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom fix {} does not calculate a per-atom array", + val.id); if (val.argindex && val.argindex > val.val.f->size_peratom_cols) - error->all(FLERR, val.iarg, "Fix ave/atom fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/atom fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->peratom_freq) - error->all(FLERR, val.iarg, "Fix {} for fix ave/atom not computed at compatible time", val.id); + error->all(FLERR, val.iarg, "Fix {} for fix ave/atom not computed at compatible time{}", + val.id, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index e713842872..f2d324a073 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -262,32 +262,40 @@ FixAveChunk::FixAveChunk(LAMMPS *lmp, int narg, char **arg) : if (!val.val.c) error->all(FLERR, val.iarg, "Compute ID {} for fix ave/chunk does not exist",val.id); if (val.val.c->peratom_flag == 0) - error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate per-atom values",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate per-atom values", + val.id); if (val.argindex == 0 && (val.val.c->size_peratom_cols != 0)) - error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate a per-atom vector",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate a per-atom vector", + val.id); if (val.argindex && (val.val.c->size_peratom_cols == 0)) - error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate a per-atom array",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk compute {} does not calculate a per-atom array", + val.id); if (val.argindex && (val.argindex > val.val.c->size_peratom_cols)) - error->all(FLERR, val.iarg, "Fix ave/chunk compute {} vector is accessed out-of-range",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk compute {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); if (!val.val.f) error->all(FLERR, val.iarg, "Fix ID {} for fix ave/chunk does not exist",val.id); if (val.val.f->peratom_flag == 0) - error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate per-atom values",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate per-atom values", + val.id); if (val.argindex == 0 && (val.val.f->size_peratom_cols != 0)) - error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate a per-atom vector",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate a per-atom vector", + val.id); if (val.argindex && (val.val.f->size_peratom_cols == 0)) - error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate a per-atom array",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk fix {} does not calculate a per-atom array", + val.id); if (val.argindex && val.argindex > val.val.f->size_peratom_cols) - error->all(FLERR, val.iarg, "Fix ave/chunk fix {} vector is accessed out-of-range",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); if (val.val.v < 0) - error->all(FLERR, val.iarg, "Variable name {} for fix ave/chunk does not exist",val.id); + error->all(FLERR, val.iarg, "Variable name {} for fix ave/chunk does not exist", val.id); if (input->variable->atomstyle(val.val.v) == 0) - error->all(FLERR, val.iarg, "Fix ave/chunk variable {} is not atom-style variable",val.id); + error->all(FLERR, val.iarg, "Fix ave/chunk variable {} is not atom-style variable", val.id); } } @@ -297,8 +305,8 @@ FixAveChunk::FixAveChunk(LAMMPS *lmp, int narg, char **arg) : cchunk = dynamic_cast(modify->get_compute_by_id(idchunk)); if (!cchunk) - error->all(FLERR, 6, "Chunk/atom compute {} does not exist or is incorrect style for fix ave/chunk", - idchunk); + error->all(FLERR, 6, "Chunk/atom compute {} does not exist or is incorrect style for " + "fix ave/chunk", idchunk); if ((nrepeat > 1) || (ave == RUNNING) || (ave == WINDOW)) cchunk->lockcount++; lockforever = 0; @@ -445,7 +453,8 @@ void FixAveChunk::init() if (biasflag) { tbias = modify->get_compute_by_id(id_bias); if (!tbias) - error->all(FLERR,"Could not find compute ID {} for temperature bias", id_bias); + error->all(FLERR, Error::NOLASTLINE, "Could not find compute ID {} for temperature bias", + id_bias); } for (auto &val : values) { @@ -460,8 +469,8 @@ void FixAveChunk::init() error->all(FLERR, Error::NOLASTLINE, "Fix ID {} for fix ave/chunk does not exist", val.id); if (nevery % val.val.f->peratom_freq) - error->all(FLERR, Error::NOLASTLINE, "Fix {} for fix ave/chunk not computed at compatible time", - val.id); + error->all(FLERR, Error::NOLASTLINE, "Fix {} for fix ave/chunk not computed at " + "compatible time{}", val.id, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index a48788b777..b3632e559a 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -55,9 +55,10 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : // expand args if any have wildcard character "*" - const int ioffset = 6; + int ioffset = 6; int expand = 0; char **earg; + char **oarg = arg; int *amap = nullptr; int nargnew = utils::expand_args(FLERR, narg - ioffset, &arg[ioffset], 0, earg, lmp, &amap); @@ -99,7 +100,16 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : char *title2 = nullptr; char *title3 = nullptr; + // get argument offset if optional arguments are present + if (iarg < nargnew) { + for (int i = 0; i < narg; ++i) { + if (strcmp(oarg[i],arg[iarg]) == 0) + ioffset = i - iarg; + } + } + while (iarg < nargnew) { + int errptr = iarg + ioffset; if (strcmp(arg[iarg],"type") == 0) { if (iarg+2 > nargnew) utils::missing_cmd_args(FLERR, "fix ave/correlate type", error); if (strcmp(arg[iarg+1],"auto") == 0) type = AUTO; @@ -109,13 +119,13 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : else if (strcmp(arg[iarg+1],"auto/lower") == 0) type = AUTOLOWER; else if (strcmp(arg[iarg+1],"full") == 0) type = FULL; else if (strcmp(arg[iarg+1], "first") == 0) type = FIRST; - else error->all(FLERR, iarg+1, "Unknown fix ave/correlate type: {}"); + else error->all(FLERR, errptr + 1, "Unknown fix ave/correlate type: {}", arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"ave") == 0) { if (iarg+2 > nargnew) utils::missing_cmd_args(FLERR, "fix ave/correlate ave", error); if (strcmp(arg[iarg+1],"one") == 0) ave = ONE; else if (strcmp(arg[iarg+1],"running") == 0) ave = RUNNING; - else error->all(FLERR, iarg+1, "Unknown fix ave/correlate ave mode: {}", arg[iarg+1]); + else error->all(FLERR, errptr+1, "Unknown fix ave/correlate ave mode: {}", arg[iarg+1]); iarg += 2; } else if (strcmp(arg[iarg],"start") == 0) { if (iarg+2 > nargnew) utils::missing_cmd_args(FLERR, "fix ave/correlate start", error); @@ -130,7 +140,7 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : if (comm->me == 0) { fp = fopen(arg[iarg+1],"w"); if (fp == nullptr) - error->one(FLERR, iarg+1, "Cannot open fix ave/correlate file {}:"" {}", arg[iarg+1], + error->one(FLERR, errptr+1, "Cannot open fix ave/correlate file {}:"" {}", arg[iarg+1], utils::getsyserror()); } iarg += 2; @@ -152,7 +162,7 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : delete[] title3; title3 = utils::strdup(arg[iarg+1]); iarg += 2; - } else error->all(FLERR, iarg, "Unkown fix ave/correlate keyword: {}", arg[iarg]); + } else error->all(FLERR, errptr, "Unkown fix ave/correlate keyword: {}", arg[iarg]); } // setup and error check @@ -177,7 +187,8 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.c->vector_flag == 0) error->all(FLERR, val.iarg, "Fix ave/correlate compute {} does not calculate a vector", val.id); if (val.argindex && val.argindex > val.val.c->size_vector) - error->all(FLERR, val.iarg, "Fix ave/correlate compute {} vector is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/correlate compute {} vector is accessed " + "out-of-range{}", val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); @@ -187,9 +198,11 @@ FixAveCorrelate::FixAveCorrelate(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->vector_flag == 0) error->all(FLERR, val.iarg, "Fix ave/correlate fix {} does not calculate a vector", val.id); if (val.argindex && val.argindex > val.val.f->size_vector) - error->all(FLERR, val.iarg, "Fix ave/correlate fix {} vector is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/correlate fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for fix ave/correlate not computed at compatible time", val.id); + error->all(FLERR, val.iarg, "Fix {} for fix ave/correlate not computed at compatible " + "time{}", val.id, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); diff --git a/src/fix_ave_grid.cpp b/src/fix_ave_grid.cpp index 9ed91294c0..f2a3a5bc92 100644 --- a/src/fix_ave_grid.cpp +++ b/src/fix_ave_grid.cpp @@ -310,7 +310,8 @@ FixAveGrid::FixAveGrid(LAMMPS *lmp, int narg, char **arg) : "Fix ave/atom compute {} does not calculate a per-atom array", ids[i]); if (argindex[i] && (argindex[i] > icompute->size_peratom_cols)) error->all(FLERR, iarg_orig[i], - "Fix ave/atom compute {} array is accessed out-of-range", ids[i]); + "Fix ave/atom compute {} array is accessed out-of-range{}", ids[i], + utils::errorurl(20)); } else if (which[i] == ArgInfo::FIX) { auto ifix = modify->get_fix_by_id(ids[i]); @@ -327,10 +328,12 @@ FixAveGrid::FixAveGrid(LAMMPS *lmp, int narg, char **arg) : "Fix ave/atom fix {} does not calculate a per-atom array", ids[i]); if (argindex[i] && (argindex[i] > ifix->size_peratom_cols)) error->all(FLERR, iarg_orig[i], - "Fix ave/atom fix {} array is accessed out-of-range", ids[i]); + "Fix ave/atom fix {} array is accessed out-of-range{}", ids[i], + utils::errorurl(20)); if (nevery % ifix->peratom_freq) error->all(FLERR, iarg_orig[i], - "Fix {} for fix ave/atom not computed at compatible time", ids[i]); + "Fix {} for fix ave/atom not computed at compatible time{}", ids[i], + utils::errorurl(7)); } else if (which[i] == ArgInfo::VARIABLE) { int ivariable = input->variable->find(ids[i]); diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index 5059e998fe..f660567545 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -283,7 +283,8 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.c->size_local_cols == 0) error->all(FLERR, val.iarg, "{} compute {} does not calculate a local array", mycmd, val.id); if (val.argindex && val.argindex > val.val.c->size_local_cols) - error->all(FLERR, val.iarg, "{} compute {} array is accessed out-of-range", mycmd, val.id); + error->all(FLERR, val.iarg, "{} compute {} array is accessed out-of-range{}", mycmd, + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX && kind == GLOBAL && mode == SCALAR) { if (val.argindex == 0 && val.val.f->scalar_flag == 0) @@ -291,9 +292,11 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->vector_flag == 0) error->all(FLERR, val.iarg, "{} fix {} does not calculate a global vector", mycmd, val.id); if (val.argindex && val.argindex > val.val.f->size_vector) - error->all(FLERR, val.iarg, "{} fix {} vector is accessed out-of-range", mycmd, val.id); + error->all(FLERR, val.iarg, "{} fix {} vector is accessed out-of-range{}", mycmd, + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time", val.id, mycmd); + error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time{}", + val.id, mycmd, utils::errorurl(7)); } else if (val.which == ArgInfo::FIX && kind == GLOBAL && mode == VECTOR) { if (val.argindex == 0 && val.val.f->vector_flag == 0) @@ -301,9 +304,11 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->array_flag == 0) error->all(FLERR, val.iarg, "{} fix {} does not calculate a global array", mycmd, val.id); if (val.argindex && val.argindex > val.val.f->size_array_cols) - error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range", mycmd, val.id); + error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range{}", mycmd, val.id, + utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time", val.id, mycmd); + error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time{}", + val.id, mycmd, utils::errorurl(7)); } else if (val.which == ArgInfo::FIX && kind == PERATOM) { if (val.val.f->peratom_flag == 0) @@ -313,9 +318,11 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->size_peratom_cols == 0) error->all(FLERR, val.iarg, "{} fix {} does not ""calculate a per-atom array", mycmd, val.id); if (val.argindex && val.argindex > val.val.f->size_peratom_cols) - error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range", mycmd, val.id); + error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range{}", mycmd, val.id, + utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time", val.id, mycmd); + error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time{}", val.id, + mycmd, utils::errorurl(7)); } else if (val.which == ArgInfo::FIX && kind == LOCAL) { if (val.val.f->local_flag == 0) @@ -325,9 +332,11 @@ FixAveHisto::FixAveHisto(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->size_local_cols == 0) error->all(FLERR, val.iarg, "{} fix does not calculate a local array", mycmd, val.id); if (val.argindex && val.argindex > val.val.f->size_local_cols) - error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range", mycmd, val.id); + error->all(FLERR, val.iarg, "{} fix {} array is accessed out-of-range{}", mycmd, + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time", val.id, mycmd); + error->all(FLERR, val.iarg, "Fix {} for {} not computed at compatible time{}", val.id, + mycmd, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE && kind == GLOBAL && mode == SCALAR) { if (val.argindex == 0 && input->variable->equalstyle(val.val.v) == 0) diff --git a/src/fix_ave_time.cpp b/src/fix_ave_time.cpp index 7b5d394cd4..e88ddb987b 100644 --- a/src/fix_ave_time.cpp +++ b/src/fix_ave_time.cpp @@ -148,8 +148,8 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR, val.iarg, "Fix ave/time compute {} does not calculate a vector", val.id); if (val.argindex && (val.argindex > val.val.c->size_vector) && (val.val.c->size_vector_variable == 0)) - error->all(FLERR, val.iarg, "Fix ave/time compute {} vector is accessed out-of-range", - val.id); + error->all(FLERR, val.iarg, "Fix ave/time compute {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (val.argindex && val.val.c->size_vector_variable) val.varlen = 1; } else if ((val.which == ArgInfo::COMPUTE) && (mode == VECTOR)) { @@ -161,8 +161,8 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && (val.val.c->array_flag == 0)) error->all(FLERR, val.iarg, "Fix ave/time compute {} does not calculate an array", val.id); if (val.argindex && (val.argindex > val.val.c->size_array_cols)) - error->all(FLERR, val.iarg, "Fix ave/time compute {} array is accessed out-of-range", - val.id); + error->all(FLERR, val.iarg, "Fix ave/time compute {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if ((val.argindex == 0) && (val.val.c->size_vector_variable)) val.varlen = 1; if (val.argindex && (val.val.c->size_array_rows_variable)) val.varlen = 1; @@ -176,10 +176,11 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && (val.val.f->size_vector_variable)) error->all(FLERR, val.iarg, "Fix ave/time fix {} vector cannot be variable length", val.id); if (val.argindex && (val.argindex > val.val.f->size_vector)) - error->all(FLERR, val.iarg, "Fix ave/time fix {} vector is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/time fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for fix ave/time not computed at compatible time", - val.id); + error->all(FLERR, val.iarg, "Fix {} for fix ave/time not computed at compatible time{}", + val.id, utils::errorurl(7)); } else if ((val.which == ArgInfo::FIX) && (mode == VECTOR)) { val.val.f = modify->get_fix_by_id(val.id); @@ -193,10 +194,11 @@ FixAveTime::FixAveTime(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR, val.iarg, "Fix ave/time fix {} array cannot have variable row length", val.id); if (val.argindex && (val.argindex > val.val.f->size_array_cols)) - error->all(FLERR, val.iarg, "Fix ave/time fix {} array is accessed out-of-range", val.id); + error->all(FLERR, val.iarg, "Fix ave/time fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->global_freq) - error->all(FLERR, val.iarg, "Fix {} for fix ave/time not computed at compatible time", - val.id); + error->all(FLERR, val.iarg, "Fix {} for fix ave/time not computed at compatible time{}", + val.id, utils::errorurl(7)); } else if ((val.which == ArgInfo::VARIABLE) && (mode == SCALAR)) { int ivariable = input->variable->find(val.id.c_str()); diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index c8540e1d9c..3778847ef5 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -700,7 +700,7 @@ void FixBoxRelax::couple() } if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) - error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(7)); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); // switch order from xy-xz-yz to Voigt ordering @@ -710,7 +710,7 @@ void FixBoxRelax::couple() p_current[5] = tensor[3]; if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) - error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(7)); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); } } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 1b0c9a6330..3f43c4b4a6 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -1041,7 +1041,7 @@ void FixNH::couple() } if (!std::isfinite(p_current[0]) || !std::isfinite(p_current[1]) || !std::isfinite(p_current[2])) - error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(7)); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); // switch order from xy-xz-yz to Voigt ordering @@ -1051,7 +1051,7 @@ void FixNH::couple() p_current[5] = tensor[3]; if (!std::isfinite(p_current[3]) || !std::isfinite(p_current[4]) || !std::isfinite(p_current[5])) - error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(7)); + error->all(FLERR,"Non-numeric pressure - simulation unstable" + utils::errorurl(6)); } } diff --git a/src/fix_store_state.cpp b/src/fix_store_state.cpp index 92aee9c1c9..e0d650c4e3 100644 --- a/src/fix_store_state.cpp +++ b/src/fix_store_state.cpp @@ -263,7 +263,8 @@ FixStoreState::FixStoreState(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.c->size_peratom_cols == 0) error->all(FLERR, "Fix store/state compute {} does not calculate per-atom array", val.id); if (val.argindex && (val.argindex > val.val.c->size_peratom_cols)) - error->all(FLERR, "Fix store/state compute array {} is accessed out-of-range", val.id); + error->all(FLERR, "Fix store/state compute array {} is accessed out-of-range{}", + val.id, utils::errorurl(20)); } else if (val.which == ArgInfo::FIX) { val.val.f = modify->get_fix_by_id(val.id); @@ -276,9 +277,11 @@ FixStoreState::FixStoreState(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && val.val.f->size_peratom_cols == 0) error->all(FLERR, "Fix store/state fix {} does not calculate per-atom array", val.id); if (val.argindex && (val.argindex > val.val.f->size_peratom_cols)) - error->all(FLERR, "Fix store/state fix {} array is accessed out-of-range", val.id); + error->all(FLERR, "Fix store/state fix {} array is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % val.val.f->peratom_freq) - error->all(FLERR, "Fix {} for fix store/state not computed at compatible time", val.id); + error->all(FLERR, "Fix {} for fix store/state not computed at compatible time{}", + val.id, utils::errorurl(7)); } else if (val.which == ArgInfo::VARIABLE) { val.val.v = input->variable->find(val.id.c_str()); diff --git a/src/fix_vector.cpp b/src/fix_vector.cpp index 3703e96130..275e40f9e2 100644 --- a/src/fix_vector.cpp +++ b/src/fix_vector.cpp @@ -35,7 +35,7 @@ FixVector::FixVector(LAMMPS *lmp, int narg, char **arg) : if (narg < 5) utils::missing_cmd_args(FLERR, "fix vector", error); nevery = utils::inumeric(FLERR, arg[3], false, lmp); - if (nevery <= 0) error->all(FLERR, "Invalid fix vector every argument: {}", nevery); + if (nevery <= 0) error->all(FLERR, 3, "Invalid fix vector every argument: {}", nevery); nmaxval = MAXSMALLINT; nindex = 0; @@ -91,7 +91,8 @@ FixVector::FixVector(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && icompute->vector_flag == 0) error->all(FLERR, "Fix vector compute {} does not calculate a vector", val.id); if (val.argindex && (val.argindex > icompute->size_vector)) - error->all(FLERR, "Fix vector compute {} vector is accessed out-of-range", val.id); + error->all(FLERR, "Fix vector compute {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (val.argindex == 0) value = icompute->extscalar; @@ -109,9 +110,11 @@ FixVector::FixVector(LAMMPS *lmp, int narg, char **arg) : if (val.argindex && ifix->vector_flag == 0) error->all(FLERR, "Fix vector fix {} does not calculate a vector", val.id); if (val.argindex && val.argindex > ifix->size_vector) - error->all(FLERR, "Fix vector fix {} vector is accessed out-of-range", val.id); + error->all(FLERR, "Fix vector fix {} vector is accessed out-of-range{}", + val.id, utils::errorurl(20)); if (nevery % ifix->global_freq) - error->all(FLERR, "Fix for fix {} vector not computed at compatible time", val.id); + error->all(FLERR, "Fix for fix {} vector not computed at compatible time{}", + val.id, utils::errorurl(7)); if (val.argindex == 0) value = ifix->extscalar; diff --git a/src/group.cpp b/src/group.cpp index d19b802b24..7fb6531489 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -92,7 +92,7 @@ void Group::assign(int narg, char **arg) { int i; - if (domain->box_exist == 0) error->all(FLERR, "Group command before simulation box is defined"); + if (domain->box_exist == 0) error->all(FLERR, "Group command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) utils::missing_cmd_args(FLERR, "group", error); // delete the group if not being used elsewhere diff --git a/src/improper.cpp b/src/improper.cpp index 3476bcdb50..02158dfff1 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -18,6 +18,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "suffix.h" #include "update.h" @@ -67,9 +68,14 @@ Improper::~Improper() void Improper::init() { - if (!allocated && atom->nimpropertypes) error->all(FLERR, "Improper coeffs are not set"); + if (!allocated && atom->nimpropertypes) + error->all(FLERR, Error::NOLASTLINE, + "Improper coeffs are not set. Status:\n" + Info::get_improper_coeff_status(lmp)); for (int i = 1; i <= atom->nimpropertypes; i++) - if (setflag[i] == 0) error->all(FLERR, "All improper coeffs are not set"); + if (setflag[i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All improper coeffs are not set. Status:\n" + + Info::get_improper_coeff_status(lmp)); init_style(); } diff --git a/src/info.cpp b/src/info.cpp index 072ec97899..57930f9d77 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -486,63 +486,11 @@ void Info::command(int narg, char **arg) Pair *pair=force->pair; fputs("\nCoeff status information:\n",out); - if (pair) { - fputs("\nPair Coeffs:\n",out); - for (int i=1; i <= atom->ntypes; ++i) - for (int j=i; j <= atom->ntypes; ++j) { - utils::print(out,"{:6d} {:6d}:",i,j); - if (pair->allocated && pair->setflag[i][j]) fputs(" is set\n",out); - else fputs(" is not set\n",out); - } - } - if (force->bond) { - Bond *bond=force->bond; - - if (bond) { - fputs("\nBond Coeffs:\n",out); - for (int i=1; i <= atom->nbondtypes; ++i) { - utils::print(out,"{:6d}:",i); - if (bond->allocated && bond->setflag[i]) fputs(" is set\n",out); - else fputs (" is not set\n",out); - } - } - } - if (force->angle) { - Angle *angle=force->angle; - - if (angle) { - fputs("\nAngle Coeffs:\n",out); - for (int i=1; i <= atom->nangletypes; ++i) { - utils::print(out,"{:6d}:",i); - if (angle->allocated && angle->setflag[i]) fputs(" is set\n",out); - else fputs (" is not set\n",out); - } - } - } - if (force->dihedral) { - Dihedral *dihedral=force->dihedral; - - if (dihedral) { - fputs("\nDihedral Coeffs:\n",out); - for (int i=1; i <= atom->ndihedraltypes; ++i) { - utils::print(out,"{:6d}:",i); - if (dihedral->allocated && dihedral->setflag[i]) fputs(" is set\n",out); - else fputs (" is not set\n",out); - } - } - } - if (force->improper) { - Improper *b=force->improper; - - if (b) { - fputs("\nImproper Coeffs:\n",out); - for (int i=1; i <= atom->nimpropertypes; ++i) { - utils::print(out,"{:6d}:",i); - if (b->allocated && b->setflag[i]) fputs(" is set\n",out); - else fputs (" is not set\n",out); - } - } - } + if (pair) utils::print(out,"\nPair coeffs\n{}", get_pair_coeff_status(lmp)); + if (force->bond) utils::print(out,"\nBond coeffs\n{}", get_bond_coeff_status(lmp)); + if (force->angle) utils::print(out,"\nAngle coeffs\n{}", get_angle_coeff_status(lmp)); + if (force->dihedral) utils::print(out,"\nDihedral coeffs\n{}", get_dihedral_coeff_status(lmp)); + if (force->improper) utils::print(out,"\nImproper coeffs\n{}", get_improper_coeff_status(lmp)); } if (flags & GROUPS) { @@ -1449,3 +1397,80 @@ std::string Info::get_variable_info(int num) { text += "\n"; return text; } + +/* ---------------------------------------------------------------------- */ + +std::string Info::get_pair_coeff_status(const LAMMPS *lmp) { + + if (!lmp || !lmp->force || !lmp->force->pair || !lmp->force->pair->allocated) + return "Pair style not yet initialized\n"; + + const auto ntypes = lmp->atom->ntypes; + const auto setflag = lmp->force->pair->setflag; + std::string output = ""; + for (int i=1; i <= ntypes; ++i) { + for (int j=i; j <= ntypes; ++j) + output += fmt::format("{:6d} {:6d}: is{}set\n", i, j, setflag[i][j] ? " " : " not "); + } + return output; +} + +/* ---------------------------------------------------------------------- */ + +std::string Info::get_bond_coeff_status(const LAMMPS *lmp) { + + if (!lmp || !lmp->force || !lmp->force->bond || !lmp->force->bond->allocated) + return "Bond style not yet initialized\n"; + + const auto ntypes = lmp->atom->nbondtypes; + const auto setflag = lmp->force->bond->setflag; + std::string output = ""; + for (int i=1; i <= ntypes; ++i) + output += fmt::format("{:6d}: is{}set\n", i, setflag[i] ? " " : " not "); + return output; +} + +/* ---------------------------------------------------------------------- */ + +std::string Info::get_angle_coeff_status(const LAMMPS *lmp) { + + if (!lmp || !lmp->force || !lmp->force->angle || !lmp->force->angle->allocated) + return "Angle style not yet initialized\n"; + + const auto ntypes = lmp->atom->nangletypes; + const auto setflag = lmp->force->angle->setflag; + std::string output = ""; + for (int i=1; i <= ntypes; ++i) + output += fmt::format("{:6d}: is{}set\n", i, setflag[i] ? " " : " not "); + return output; +} + +/* ---------------------------------------------------------------------- */ + +std::string Info::get_dihedral_coeff_status(const LAMMPS *lmp) { + + if (!lmp || !lmp->force || !lmp->force->dihedral || !lmp->force->dihedral->allocated) + return "Dihedral style not yet initialized\n"; + + const auto ntypes = lmp->atom->ndihedraltypes; + const auto setflag = lmp->force->dihedral->setflag; + std::string output = ""; + for (int i=1; i <= ntypes; ++i) + output += fmt::format("{:6d}: is{}set\n", i, setflag[i] ? " " : " not "); + return output; +} + +/* ---------------------------------------------------------------------- */ + +std::string Info::get_improper_coeff_status(const LAMMPS *lmp) { + + if (!lmp || !lmp->force || !lmp->force->improper || !lmp->force->improper->allocated) + return "Improper style not yet initialized\n"; + + const auto ntypes = lmp->atom->nimpropertypes; + const auto setflag = lmp->force->improper->setflag; + std::string output = ""; + for (int i=1; i <= ntypes; ++i) + output += fmt::format("{:6d}: is{}set\n", i, setflag[i] ? " " : " not "); + return output; +} diff --git a/src/info.h b/src/info.h index 5d705837f7..77566b0dcc 100644 --- a/src/info.h +++ b/src/info.h @@ -54,6 +54,12 @@ class Info : public Command { static std::string get_gpu_device_info(); static std::string get_accelerator_info(const std::string &pkg = ""); + static std::string get_pair_coeff_status(const LAMMPS *lmp); + static std::string get_bond_coeff_status(const LAMMPS *lmp); + static std::string get_angle_coeff_status(const LAMMPS *lmp); + static std::string get_dihedral_coeff_status(const LAMMPS *lmp); + static std::string get_improper_coeff_status(const LAMMPS *lmp); + void get_memory_info(double *); char **get_variable_names(int &num); std::string get_variable_info(int num); diff --git a/src/input.cpp b/src/input.cpp index 6ea710f567..bc9a55052c 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1347,7 +1347,7 @@ void Input::variable_command() void Input::angle_coeff() { if (domain->box_exist == 0) - error->all(FLERR,"Angle_coeff command before simulation box is defined"); + error->all(FLERR,"Angle_coeff command before simulation box is defined" + utils::errorurl(33)); if (force->angle == nullptr) error->all(FLERR,"Angle_coeff command before angle_style is defined"); if (atom->avec->angles_allow == 0) @@ -1382,7 +1382,7 @@ void Input::atom_style() { if (narg < 1) utils::missing_cmd_args(FLERR, "atom_style", error); if (domain->box_exist) - error->all(FLERR,"Atom_style command after simulation box is defined"); + error->all(FLERR,"Atom_style command after simulation box is defined" + utils::errorurl(34)); atom->create_avec(arg[0],narg-1,&arg[1],1); } @@ -1391,7 +1391,7 @@ void Input::atom_style() void Input::bond_coeff() { if (domain->box_exist == 0) - error->all(FLERR,"Bond_coeff command before simulation box is defined"); + error->all(FLERR,"Bond_coeff command before simulation box is defined" + utils::errorurl(33)); if (force->bond == nullptr) error->all(FLERR,"Bond_coeff command before bond_style is defined"); if (atom->avec->bonds_allow == 0) @@ -1429,7 +1429,7 @@ void Input::bond_write() void Input::boundary() { if (domain->box_exist) - error->all(FLERR,"Boundary command after simulation box is defined"); + error->all(FLERR,"Boundary command after simulation box is defined" + utils::errorurl(34)); domain->set_boundary(narg,arg,0); } @@ -1486,7 +1486,8 @@ void Input::dielectric() void Input::dihedral_coeff() { if (domain->box_exist == 0) - error->all(FLERR,"Dihedral_coeff command before simulation box is defined"); + error->all(FLERR,"Dihedral_coeff command before simulation box is defined" + + utils::errorurl(33)); if (force->dihedral == nullptr) error->all(FLERR,"Dihedral_coeff command before dihedral_style is defined"); if (atom->avec->dihedrals_allow == 0) @@ -1514,7 +1515,7 @@ void Input::dimension() { if (narg != 1) error->all(FLERR, "Dimension command expects exactly 1 argument"); if (domain->box_exist) - error->all(FLERR,"Dimension command after simulation box is defined"); + error->all(FLERR,"Dimension command after simulation box is defined" + utils::errorurl(34)); domain->dimension = utils::inumeric(FLERR,arg[0],false,lmp); if (domain->dimension != 2 && domain->dimension != 3) error->all(FLERR, "Invalid dimension argument: {}", arg[0]); @@ -1565,7 +1566,7 @@ void Input::group_command() void Input::improper_coeff() { if (domain->box_exist == 0) - error->all(FLERR,"Improper_coeff command before simulation box is defined"); + error->all(FLERR,"Improper_coeff command before simulation box is defined" + utils::errorurl(33)); if (force->improper == nullptr) error->all(FLERR,"Improper_coeff command before improper_style is defined"); if (atom->avec->impropers_allow == 0) @@ -1607,7 +1608,8 @@ void Input::kspace_style() void Input::labelmap() { - if (domain->box_exist == 0) error->all(FLERR,"Labelmap command before simulation box is defined"); + if (domain->box_exist == 0) + error->all(FLERR,"Labelmap command before simulation box is defined" + utils::errorurl(33)); if (!atom->labelmapflag) atom->add_label_map(); atom->lmap->modify_lmap(narg,arg); } @@ -1625,7 +1627,7 @@ void Input::mass() { if (narg != 2) error->all(FLERR,"Illegal mass command: expected 2 arguments but found {}", narg); if (domain->box_exist == 0) - error->all(FLERR,"Mass command before simulation box is defined"); + error->all(FLERR,"Mass command before simulation box is defined" + utils::errorurl(33)); atom->set_mass(FLERR,narg,arg); } @@ -1641,7 +1643,7 @@ void Input::min_modify() void Input::min_style() { if (domain->box_exist == 0) - error->all(FLERR,"Min_style command before simulation box is defined"); + error->all(FLERR,"Min_style command before simulation box is defined" + utils::errorurl(33)); update->create_minimize(narg,arg,1); } @@ -1682,7 +1684,7 @@ void Input::newton() force->newton_pair = newton_pair; if (domain->box_exist && (newton_bond != force->newton_bond)) - error->all(FLERR,"Newton bond change after simulation box is defined"); + error->all(FLERR,"Newton bond change after simulation box is defined" + utils::errorurl(34)); force->newton_bond = newton_bond; if (newton_pair || newton_bond) force->newton = 1; @@ -1696,8 +1698,8 @@ void Input::newton() void Input::package() { if (domain->box_exist) - error->all(FLERR,"Package command after simulation box is defined"); - if (narg < 1) error->all(FLERR,"Illegal package command"); + error->all(FLERR,"Package command after simulation box is defined" + utils::errorurl(34)); + if (narg < 1) utils::missing_cmd_args(FLERR, "package", error); // same checks for packages existing as in LAMMPS::post_create() // since can be invoked here by package command in input script @@ -1739,7 +1741,7 @@ void Input::package() void Input::pair_coeff() { if (domain->box_exist == 0) - error->all(FLERR,"Pair_coeff command before simulation box is defined"); + error->all(FLERR,"Pair_coeff command before simulation box is defined" + utils::errorurl(33)); if (force->pair == nullptr) error->all(FLERR,"Pair_coeff command without a pair style"); if (narg < 2) utils::missing_cmd_args(FLERR,"pair_coeff", error); if (force->pair->one_coeff && ((strcmp(arg[0],"*") != 0) || (strcmp(arg[1],"*") != 0))) @@ -1820,7 +1822,7 @@ void Input::pair_write() void Input::processors() { if (domain->box_exist) - error->all(FLERR,"Processors command after simulation box is defined"); + error->all(FLERR,"Processors command after simulation box is defined" + utils::errorurl(34)); comm->set_processors(narg,arg); } @@ -1850,7 +1852,7 @@ void Input::restart() void Input::run_style() { if (domain->box_exist == 0) - error->all(FLERR,"Run_style command before simulation box is defined"); + error->all(FLERR,"Run_style command before simulation box is defined" + utils::errorurl(33)); update->create_integrate(narg,arg,1); } @@ -2002,7 +2004,7 @@ void Input::units() { if (narg != 1) error->all(FLERR,"Illegal units command: expected 1 argument but found {}", narg); if (domain->box_exist) - error->all(FLERR,"Units command after simulation box is defined"); + error->all(FLERR,"Units command after simulation box is defined" + utils::errorurl(34)); update->set_units(arg[0]); } diff --git a/src/kspace.cpp b/src/kspace.cpp index bf5fdf8378..2de25d6e86 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -321,10 +321,10 @@ void KSpace::qsum_qsq(int warning_flag) // so issue warning or error if (fabs(qsum) > SMALL) { - std::string message = fmt::format("System is not charge neutral, net " - "charge = {:.8}",qsum); - if (!warn_nonneutral) error->all(FLERR,message + utils::errorurl(29)); - if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message + utils::errorurl(29)); + std::string message = fmt::format("System is not charge neutral, net charge = {:.8}{}", + qsum, utils::errorurl(29)); + if (!warn_nonneutral) error->all(FLERR,message); + if (warn_nonneutral == 1 && comm->me == 0) error->warning(FLERR,message); warn_nonneutral = 2; } } diff --git a/src/label_map.cpp b/src/label_map.cpp index 24cef51062..82d1eaac02 100644 --- a/src/label_map.cpp +++ b/src/label_map.cpp @@ -254,7 +254,7 @@ int LabelMap::find_or_create(const std::string &mylabel, std::vectorall(FLERR, "Topology type exceeds system topology type"); + error->all(FLERR, "Topology type exceeds system topology type" + utils::errorurl(25)); // never reaches here, just to prevent compiler warning diff --git a/src/library.cpp b/src/library.cpp index 17ec0612b4..dbcf482bba 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -4401,7 +4401,8 @@ void lammps_gather(void *handle, const char *name, int type, int count, void *da } if (lmp->update->ntimestep % fix->peratom_freq) { - lmp->error->all(FLERR,"lammps_gather: fix {} not computed at compatible time", fixid); + lmp->error->all(FLERR,"lammps_gather: fix {} not computed at compatible time{}", + fixid, utils::errorurl(7)); return; } @@ -4670,8 +4671,8 @@ void lammps_gather_concat(void *handle, const char *name, int type, int count, return; } if (lmp->update->ntimestep % fix->peratom_freq) { - lmp->error->all(FLERR,"lammps_gather_concat(): fix {} not computed at compatible time", - fixid); + lmp->error->all(FLERR,"lammps_gather_concat(): fix {} not computed at compatible time{}", + fixid, utils::errorurl(7)); return; } @@ -4957,7 +4958,8 @@ void lammps_gather_subset(void *handle, const char *name, int type, int count, return; } if (lmp->update->ntimestep % fix->peratom_freq) { - lmp->error->all(FLERR,"lammps_gather_subset(): fix {} not computed at compatible time", fixid); + lmp->error->all(FLERR,"lammps_gather_subset(): fix {} not computed at compatible time{}", + fixid, utils::errorurl(7)); return; } diff --git a/src/minimize.cpp b/src/minimize.cpp index d13429804c..8fd90ade5f 100644 --- a/src/minimize.cpp +++ b/src/minimize.cpp @@ -35,7 +35,7 @@ void Minimize::command(int narg, char **arg) error->all(FLERR, "Illegal minimize command: expected 4 arguments but found {}", narg); if (domain->box_exist == 0) - error->all(FLERR, "Minimize command before simulation box is defined"); + error->all(FLERR, "Minimize command before simulation box is defined" + utils::errorurl(33)); // ignore minimize command, if walltime limit was already reached if (timer->is_timeout()) return; diff --git a/src/modify.cpp b/src/modify.cpp index 74f0d950a2..1d27573db0 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -295,7 +295,8 @@ void Modify::init() int checkall; MPI_Allreduce(&check, &checkall, 1, MPI_INT, MPI_SUM, world); if (comm->me == 0 && checkall) - error->warning(FLERR, "One or more atoms are time integrated more than once"); + error->warning(FLERR, "One or more atoms are time integrated more than once" + + utils::errorurl(32)); } /* ---------------------------------------------------------------------- diff --git a/src/npair.cpp b/src/npair.cpp index c60d37208e..e1ceeb5c41 100644 --- a/src/npair.cpp +++ b/src/npair.cpp @@ -239,7 +239,7 @@ int NPair::exclusion(int i, int j, int itype, int jtype, int NPair::coord2bin(double *x, int &ix, int &iy, int &iz) { if (!std::isfinite(x[0]) || !std::isfinite(x[1]) || !std::isfinite(x[2])) - error->one(FLERR,"Non-numeric positions - simulation unstable" + utils::errorurl(7)); + error->one(FLERR,"Non-numeric positions - simulation unstable" + utils::errorurl(6)); if (x[0] >= bboxhi[0]) ix = static_cast ((x[0]-bboxhi[0])*bininvx) + nbinx; @@ -282,7 +282,7 @@ int NPair::coord2bin(double *x, int ic) int ibin; if (!std::isfinite(x[0]) || !std::isfinite(x[1]) || !std::isfinite(x[2])) - error->one(FLERR,"Non-numeric positions - simulation unstable" + utils::errorurl(7)); + error->one(FLERR,"Non-numeric positions - simulation unstable" + utils::errorurl(6)); if (x[0] >= bboxhi[0]) ix = static_cast ((x[0]-bboxhi[0])*bininvx_multi[ic]) + nbinx_multi[ic]; diff --git a/src/output.cpp b/src/output.cpp index 60d84e715d..0602c4f52d 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -896,7 +896,7 @@ void Output::create_thermo(int narg, char **arg) // don't allow this so that dipole style can safely allocate inertia vector if (domain->box_exist == 0) - error->all(FLERR,"Thermo_style command before simulation box is defined"); + error->all(FLERR,"Thermo_style command before simulation box is defined" + utils::errorurl(33)); // warn if previous thermo had been modified via thermo_modify command diff --git a/src/pair.cpp b/src/pair.cpp index 652f231908..52fea894df 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -24,6 +24,7 @@ #include "domain.h" #include "error.h" #include "force.h" +#include "info.h" #include "kspace.h" #include "math_const.h" #include "math_special.h" @@ -247,10 +248,15 @@ void Pair::init() // I,I coeffs must be set // init_one() will check if I,J is set explicitly or inferred by mixing - if (!allocated) error->all(FLERR,"All pair coeffs are not set"); - - for (i = 1; i <= atom->ntypes; i++) - if (setflag[i][i] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (!allocated) { + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); + } else { + for (i = 1; i <= atom->ntypes; i++) + if (setflag[i][i] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); + } // style-specific initialization diff --git a/src/pair_born.cpp b/src/pair_born.cpp index fe041b2ada..a881bc18db 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -18,16 +18,17 @@ #include "pair_born.h" -#include -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -237,7 +238,9 @@ void PairBorn::coeff(int narg, char **arg) double PairBorn::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); rhoinv[i][j] = 1.0/rho[i][j]; born1[i][j] = a[i][j]/rho[i][j]; diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index 660a4b32ec..f06ccbf223 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -14,16 +14,17 @@ #include "pair_buck.h" -#include -#include #include "atom.h" #include "comm.h" #include "force.h" +#include "info.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" #include "error.h" +#include +#include using namespace LAMMPS_NS; using namespace MathConst; @@ -225,7 +226,9 @@ void PairBuck::coeff(int narg, char **arg) double PairBuck::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); rhoinv[i][j] = 1.0/rho[i][j]; buck1[i][j] = a[i][j]/rho[i][j]; diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index cf342b4302..9b6ed918f9 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "math_const.h" #include "memory.h" #include "neigh_list.h" @@ -274,7 +275,9 @@ void PairBuckCoulCut::init_style() double PairBuckCoulCut::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); double cut = MAX(cut_lj[i][j], cut_coul[i][j]); cut_ljsq[i][j] = cut_lj[i][j] * cut_lj[i][j]; diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 4fb757cbab..a90f0ea3e2 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -19,6 +19,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_request.h" #include "neighbor.h" @@ -718,7 +719,8 @@ double PairHybrid::init_one(int i, int j) if (setflag[i][j] == 0) { if (nmap[i][i] != 1 || nmap[j][j] != 1 || map[i][i][0] != map[j][j][0]) - error->one(FLERR,"All pair coeffs are not set"); + error->one(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); nmap[i][j] = 1; map[i][j][0] = map[i][i][0]; } diff --git a/src/pair_hybrid_molecular.cpp b/src/pair_hybrid_molecular.cpp index ec68cefafb..6750cf397d 100644 --- a/src/pair_hybrid_molecular.cpp +++ b/src/pair_hybrid_molecular.cpp @@ -15,6 +15,7 @@ #include "atom.h" #include "error.h" +#include "info.h" #include "neigh_request.h" #include "neighbor.h" @@ -31,9 +32,11 @@ PairHybridMolecular::PairHybridMolecular(LAMMPS *lmp) : PairHybridOverlay(lmp) { void PairHybridMolecular::init_style() { if (!atom->molecule_flag) - error->all(FLERR, "Pair style hybrid/molecular requires atom attribute molecule"); + error->all(FLERR, Error::NOLASTLINE, + "Pair style hybrid/molecular requires atom attribute molecule"); if (manybody_flag) - error->all(FLERR, "Pair style hybrid/molecular is not compatible with manybody potentials"); + error->all(FLERR, Error::NOLASTLINE, + "Pair style hybrid/molecular is not compatible with manybody potentials"); PairHybridOverlay::init_style(); @@ -62,7 +65,9 @@ double PairHybridMolecular::init_one(int i, int j) // plus I,I and J,J need the same number of substyles if (setflag[i][j] == 0) { - if (nmap[i][i] != nmap[j][j]) error->one(FLERR, "All pair coeffs are not set"); + if (nmap[i][i] != nmap[j][j]) + error->one(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); int num = 0; for (int k = 0; k < nmap[i][i]; ++k) { for (int l = 0; l < nmap[j][j]; ++l) { @@ -73,7 +78,9 @@ double PairHybridMolecular::init_one(int i, int j) } } } - if (nmap[i][i] != nmap[i][j]) error->one(FLERR, "All pair coeffs are not set"); + if (nmap[i][i] != nmap[i][j]) + error->one(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); } nmap[j][i] = nmap[i][j]; diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index 83ca375818..48b8a046e3 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -17,6 +17,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" @@ -209,7 +210,9 @@ void PairMorse::coeff(int narg, char **arg) double PairMorse::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); morse1[i][j] = 2.0 * d0[i][j] * alpha[i][j]; diff --git a/src/pair_table.cpp b/src/pair_table.cpp index 730107c856..32186d0f36 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -21,6 +21,7 @@ #include "comm.h" #include "error.h" #include "force.h" +#include "info.h" #include "memory.h" #include "neigh_list.h" #include "table_file_reader.h" @@ -341,7 +342,9 @@ void PairTable::coeff(int narg, char **arg) double PairTable::init_one(int i, int j) { - if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set"); + if (setflag[i][j] == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); tabindex[j][i] = tabindex[i][j]; @@ -1035,7 +1038,9 @@ double PairTable::single(int /*i*/, int /*j*/, int itype, int jtype, double rsq, void *PairTable::extract(const char *str, int &dim) { if (strcmp(str, "cut_coul") != 0) return nullptr; - if (ntables == 0) error->all(FLERR, "All pair coeffs are not set"); + if (ntables == 0) + error->all(FLERR, Error::NOLASTLINE, + "All pair coeffs are not set. Status:\n" + Info::get_pair_coeff_status(lmp)); // only check for cutoff consistency if claiming to be KSpace compatible @@ -1043,7 +1048,8 @@ void *PairTable::extract(const char *str, int &dim) double cut_coul = tables[0].cut; for (int m = 1; m < ntables; m++) if (tables[m].cut != cut_coul) - error->all(FLERR, "Pair table cutoffs must all be equal to use with KSpace"); + error->all(FLERR, Error::NOLASTLINE, + "Pair table cutoffs must all be equal to use with KSpace"); dim = 0; return &tables[0].cut; } else diff --git a/src/read_data.cpp b/src/read_data.cpp index 8d97b11243..79d88148c5 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -339,9 +339,11 @@ void ReadData::command(int narg, char **arg) "Reading a data file with shrinkwrap boundaries is not " "compatible with a MSM KSpace style"); if (domain->box_exist && !addflag) - error->all(FLERR, "Cannot use read_data without add keyword after simulation box is defined"); + error->all(FLERR, "Cannot use read_data without add keyword after simulation box is defined" + + utils::errorurl(34)); if (!domain->box_exist && addflag) - error->all(FLERR, "Cannot use read_data add before simulation box is defined"); + error->all(FLERR, "Cannot use read_data add before simulation box is defined" + + utils::errorurl(33)); if (offsetflag) { if (addflag == NONE) { error->all(FLERR, "Cannot use read_data offset without add keyword"); diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 59fe6c6767..0f5356ecd9 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -80,7 +80,7 @@ ReadDump::~ReadDump() void ReadDump::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Read_dump command before simulation box is defined"); + error->all(FLERR,"Read_dump command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) utils::missing_cmd_args(FLERR, "read_dump", error); diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 96f1c3d072..594ae377d3 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -52,7 +52,7 @@ void ReadRestart::command(int narg, char **arg) if (narg != 1 && narg != 2) error->all(FLERR,"Illegal read_restart command"); if (domain->box_exist) - error->all(FLERR,"Cannot read_restart after simulation box is defined"); + error->all(FLERR,"Cannot read_restart after simulation box is defined" + utils::errorurl(34)); MPI_Barrier(world); double time1 = platform::walltime(); diff --git a/src/replicate.cpp b/src/replicate.cpp index 97a7569f64..5b221fde1d 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -52,7 +52,7 @@ void Replicate::command(int narg, char **arg) int i,n; if (domain->box_exist == 0) - error->all(FLERR,"Replicate command before simulation box is defined"); + error->all(FLERR,"Replicate command before simulation box is defined" + utils::errorurl(33)); if (narg < 3 || narg > 4) error->all(FLERR,"Illegal replicate command"); diff --git a/src/rerun.cpp b/src/rerun.cpp index 96491bab36..8115b3d5d4 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -41,7 +41,7 @@ Rerun::Rerun(LAMMPS *lmp) : Command(lmp) {} void Rerun::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Rerun command before simulation box is defined"); + error->all(FLERR,"Rerun command before simulation box is defined" + utils::errorurl(33)); if (narg < 2) error->all(FLERR,"Illegal rerun command"); diff --git a/src/reset_atoms_id.cpp b/src/reset_atoms_id.cpp index 9992a49b28..b38b28b6a1 100644 --- a/src/reset_atoms_id.cpp +++ b/src/reset_atoms_id.cpp @@ -53,7 +53,7 @@ ResetAtomsID::ResetAtomsID(LAMMPS *lmp) : Command(lmp) void ResetAtomsID::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Reset_atoms id command before simulation box is defined"); + error->all(FLERR, "Reset_atoms id command before simulation box is defined" + utils::errorurl(33)); if (atom->tag_enable == 0) error->all(FLERR, "Cannot use reset_atoms id unless atoms have IDs"); for (const auto &ifix : modify->get_fix_list()) diff --git a/src/reset_atoms_image.cpp b/src/reset_atoms_image.cpp index 63030c632b..b57c98905f 100644 --- a/src/reset_atoms_image.cpp +++ b/src/reset_atoms_image.cpp @@ -39,7 +39,7 @@ ResetAtomsImage::ResetAtomsImage(LAMMPS *lmp) : Command(lmp) {} void ResetAtomsImage::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Reset_atoms image command before simulation box is defined"); + error->all(FLERR, "Reset_atoms image command before simulation box is defined" + utils::errorurl(33)); if (atom->tag_enable == 0) error->all(FLERR, "Cannot use reset_atoms image unless atoms have IDs"); if (atom->avec->bonds_allow == 0) diff --git a/src/reset_atoms_mol.cpp b/src/reset_atoms_mol.cpp index 66dd886059..54d3bbcc76 100644 --- a/src/reset_atoms_mol.cpp +++ b/src/reset_atoms_mol.cpp @@ -61,7 +61,7 @@ ResetAtomsMol::~ResetAtomsMol() void ResetAtomsMol::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Reset_atoms mol command before simulation box is defined"); + error->all(FLERR, "Reset_atoms mol command before simulation box is defined" + utils::errorurl(33)); if (atom->tag_enable == 0) error->all(FLERR, "Cannot use reset_atoms mol unless atoms have IDs"); if (atom->molecular != Atom::MOLECULAR) error->all(FLERR, "Can only use reset_atoms mol on molecular systems"); diff --git a/src/run.cpp b/src/run.cpp index 516bce5d0b..5444297e5d 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -39,7 +39,7 @@ void Run::command(int narg, char **arg) if (narg < 1) utils::missing_cmd_args(FLERR, "run", error); if (domain->box_exist == 0) - error->all(FLERR,"Run command before simulation box is defined"); + error->all(FLERR,"Run command before simulation box is defined" + utils::errorurl(33)); // ignore run command, if walltime limit was already reached diff --git a/src/set.cpp b/src/set.cpp index 93d5068ef3..37aeb212be 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -57,10 +57,11 @@ enum{TYPE,TYPE_FRACTION,TYPE_RATIO,TYPE_SUBSET, void Set::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Set command before simulation box is defined"); + error->all(FLERR, Error::NOLASTLINE, "Set command before simulation box is defined" + + utils::errorurl(0)); if (atom->natoms == 0) - error->all(FLERR,"Set command on system without atoms"); - if (narg < 4) error->all(FLERR,"Illegal set command: need at least four arguments"); + error->all(FLERR, Error::NOLASTLINE, "Set command on system without atoms"); + if (narg < 4) error->all(FLERR, 1, "Illegal set command: need at least four arguments"); // style and ID info @@ -69,7 +70,7 @@ void Set::command(int narg, char **arg) else if (strcmp(arg[0],"type") == 0) style = TYPE_SELECT; else if (strcmp(arg[0],"group") == 0) style = GROUP_SELECT; else if (strcmp(arg[0],"region") == 0) style = REGION_SELECT; - else error->all(FLERR,"Unknown set command style: {}", arg[0]); + else error->all(FLERR, Error::ARGZERO, "Unknown set command style: {}", arg[0]); id = utils::strdup(arg[1]); select = nullptr; @@ -101,11 +102,13 @@ void Set::command(int narg, char **arg) fraction = utils::numeric(FLERR, arg[iarg+2], false, lmp); ivalue = utils::inumeric(FLERR, arg[iarg+3], false, lmp); if (newtype <= 0 || newtype > atom->ntypes) - error->all(FLERR,"Invalid type value {} in set type/fraction command", newtype); + error->all(FLERR, iarg + 1, "Invalid type value {} in set type/fraction command", newtype); if (fraction < 0.0 || fraction > 1.0) - error->all(FLERR,"Invalid fraction value {} in set type/fraction command", fraction); + error->all(FLERR, iarg + 2, "Invalid fraction value {} in set type/fraction command", + fraction); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed {} in set type/fraction command", ivalue); + error->all(FLERR, iarg + 3, "Invalid random number seed {} in set type/fraction command", + ivalue); setrandom(TYPE_FRACTION); iarg += 4; @@ -115,11 +118,13 @@ void Set::command(int narg, char **arg) fraction = utils::numeric(FLERR, arg[iarg+2], false, lmp); ivalue = utils::inumeric(FLERR, arg[iarg+3], false, lmp); if (newtype <= 0 || newtype > atom->ntypes) - error->all(FLERR,"Invalid type value {} in set type/ratio command", newtype); + error->all(FLERR, iarg + 1, "Invalid type value {} in set type/ratio command", newtype); if (fraction < 0.0 || fraction > 1.0) - error->all(FLERR,"Invalid fraction value {} in set type/ratio command", fraction); + error->all(FLERR, iarg + 2, "Invalid fraction value {} in set type/ratio command", + fraction); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed {} in set type/ratio command", ivalue); + error->all(FLERR, iarg + 3, "Invalid random number seed {} in set type/ratio command", + ivalue); setrandom(TYPE_RATIO); iarg += 4; @@ -129,11 +134,12 @@ void Set::command(int narg, char **arg) nsubset = utils::bnumeric(FLERR, arg[iarg+2], false, lmp); ivalue = utils::inumeric(FLERR, arg[iarg+3], false, lmp); if (newtype <= 0 || newtype > atom->ntypes) - error->all(FLERR,"Invalid type value {} in set type/subset command", newtype); + error->all(FLERR, iarg + 1, "Invalid type value {} in set type/subset command", newtype); if (nsubset < 0) - error->all(FLERR,"Invalid subset size {} in set type/subset command", nsubset); + error->all(FLERR, iarg + 2, "Invalid subset size {} in set type/subset command", nsubset); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed {} in set type/subset command", ivalue); + error->all(FLERR, iarg + 3, "Invalid random number seed {} in set type/subset command", + ivalue); setrandom(TYPE_SUBSET); iarg += 4; @@ -142,7 +148,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); if (!atom->molecule_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(MOLECULE); iarg += 2; @@ -193,7 +200,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->q_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(CHARGE); iarg += 2; @@ -202,7 +210,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->rmass_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(MASS); iarg += 2; @@ -215,7 +224,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+3],"^v_")) varparse(arg[iarg+3],3); else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp); if (!atom->ellipsoid_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SHAPE); iarg += 4; @@ -224,7 +234,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->line_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(LENGTH); iarg += 2; @@ -233,7 +244,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->tri_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(TRI); iarg += 2; @@ -246,7 +258,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+3],"^v_")) varparse(arg[iarg+3],3); else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp); if (!atom->mu_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(DIPOLE); iarg += 4; @@ -255,11 +268,12 @@ void Set::command(int narg, char **arg) ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); dvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp); if (!atom->mu_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed in set command"); + error->all(FLERR, iarg + 1, "Invalid random number seed in set command"); if (dvalue <= 0.0) - error->all(FLERR,"Invalid dipole length in set command"); + error->all(FLERR, iarg + 2, "Invalid dipole length in set command"); setrandom(DIPOLE_RANDOM); iarg += 3; @@ -276,11 +290,13 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+4],"^v_")) varparse(arg[iarg+4],4); else zvalue = utils::numeric(FLERR,arg[iarg+4],false,lmp); if ((xvalue == 0.0) && (yvalue == 0.0) && (zvalue == 0.0)) - error->all(FLERR,"At least one spin vector component must be non-zero"); + error->all(FLERR, Error::NOPOINTER, "At least one spin vector component must be non-zero"); if (!atom->sp_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (dvalue <= 0.0) - error->all(FLERR,"Invalid spin magnitude {} in set {} command", dvalue, arg[iarg]); + error->all(FLERR, iarg + 1, "Invalid spin magnitude {} in set {} command", dvalue, + arg[iarg]); set(SPIN_ATOM); iarg += 5; @@ -293,11 +309,14 @@ void Set::command(int narg, char **arg) error->warning(FLERR, "Set attribute spin/random is deprecated. " "Please use spin/atom/random instead."); if (!atom->sp_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed {} in set {} command", ivalue, arg[iarg]); + error->all(FLERR, iarg + 1, "Invalid random number seed {} in set {} command", ivalue, + arg[iarg]); if (dvalue <= 0.0) - error->all(FLERR,"Invalid spin magnitude {} in set {} command", dvalue, arg[iarg]); + error->all(FLERR, iarg + 2, "Invalid spin magnitude {} in set {} command", dvalue, + arg[iarg]); setrandom(SPIN_RANDOM); iarg += 3; @@ -306,7 +325,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->eradius_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(RADIUS_ELECTRON); iarg += 2; @@ -315,7 +335,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->spin_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SPIN_ELECTRON); iarg += 2; @@ -330,7 +351,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+4],"^v_")) varparse(arg[iarg+4],4); else wvalue = utils::numeric(FLERR,arg[iarg+4],false,lmp); if (!atom->ellipsoid_flag && !atom->tri_flag && !atom->body_flag && !atom->quat_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(QUAT); iarg += 5; @@ -338,9 +360,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set quat/random", error); ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); if (!atom->ellipsoid_flag && !atom->tri_flag && !atom->body_flag && !atom->quat_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed in set command"); + error->all(FLERR, iarg + 1, "Invalid random number seed in set command"); setrandom(QUAT_RANDOM); iarg += 2; @@ -349,7 +372,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = DEG2RAD * utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->line_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(THETA); iarg += 2; @@ -357,9 +381,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set theta/random", error); ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); if (!atom->line_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0) - error->all(FLERR,"Invalid random number seed in set command"); + error->all(FLERR, iarg + 1, "Invalid random number seed in set command"); set(THETA_RANDOM); iarg += 2; @@ -372,7 +397,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+3],"^v_")) varparse(arg[iarg+3],3); else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp); if (!atom->angmom_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(ANGMOM); iarg += 4; @@ -385,7 +411,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+3],"^v_")) varparse(arg[iarg+3],3); else zvalue = utils::numeric(FLERR,arg[iarg+3],false,lmp); if (!atom->omega_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(OMEGA); iarg += 4; @@ -394,7 +421,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->radius_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(RADIUS_ATOM); iarg += 2; @@ -403,7 +431,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->radius_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(DIAMETER); iarg += 2; @@ -413,13 +442,14 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->rmass_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); - if (dvalue <= 0.0) error->all(FLERR,"Invalid density in set command"); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); + if (dvalue <= 0.0) error->all(FLERR, iarg + 1, "Invalid density in set command"); discflag = 0; if (strcmp(arg[iarg],"density/disc") == 0) { discflag = 1; if (domain->dimension != 2) - error->all(FLERR,"Density/disc option requires 2d simulation"); + error->all(FLERR, Error::NOLASTLINE, "Density/disc option requires 2d simulation"); } set(DENSITY); iarg += 2; @@ -429,7 +459,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->temperature_flag) - error->all(FLERR,"Cannot set this attribute for this atom style"); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(TEMPERATURE); iarg += 2; @@ -438,8 +469,9 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->vfrac_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); - if (dvalue <= 0.0) error->all(FLERR,"Invalid volume in set command"); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); + if (dvalue <= 0.0) error->all(FLERR, iarg + 1, "Invalid volume in set command"); set(VOLUME); iarg += 2; @@ -462,14 +494,11 @@ void Set::command(int narg, char **arg) else zimage = utils::inumeric(FLERR,arg[iarg+3],false,lmp); } if (ximageflag && ximage && !domain->xperiodic) - error->all(FLERR, - "Cannot set non-zero image flag for non-periodic dimension"); + error->all(FLERR, iarg + 1,"Cannot set non-zero image flag for non-periodic dimension"); if (yimageflag && yimage && !domain->yperiodic) - error->all(FLERR, - "Cannot set non-zero image flag for non-periodic dimension"); + error->all(FLERR, iarg + 2, "Cannot set non-zero image flag for non-periodic dimension"); if (zimageflag && zimage && !domain->zperiodic) - error->all(FLERR, - "Cannot set non-zero image flag for non-periodic dimension"); + error->all(FLERR, iarg + 3, "Cannot set non-zero image flag for non-periodic dimension"); set(IMAGE); iarg += 4; @@ -477,9 +506,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set bond", error); ivalue = utils::expand_type_int(FLERR, arg[iarg+1], Atom::BOND, lmp); if (atom->avec->bonds_allow == 0) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0 || ivalue > atom->nbondtypes) - error->all(FLERR,"Invalid value in set command"); + error->all(FLERR, iarg + 1, "Invalid value {} in set bond command", ivalue); topology(BOND); iarg += 2; @@ -487,9 +517,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set angle", error); ivalue = utils::expand_type_int(FLERR, arg[iarg+1], Atom::ANGLE, lmp); if (atom->avec->angles_allow == 0) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0 || ivalue > atom->nangletypes) - error->all(FLERR,"Invalid value in set command"); + error->all(FLERR, iarg + 1, "Invalid value {} in set angle command", ivalue); topology(ANGLE); iarg += 2; @@ -497,8 +528,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set dihedral", error); ivalue = utils::expand_type_int(FLERR, arg[iarg+1], Atom::DIHEDRAL, lmp); if (atom->avec->dihedrals_allow == 0) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0 || ivalue > atom->ndihedraltypes) + error->all(FLERR, iarg + 1, "Invalid value {} in set dihedral command", ivalue); error->all(FLERR,"Invalid value in set command"); topology(DIHEDRAL); iarg += 2; @@ -507,9 +540,10 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set improper", error); ivalue = utils::expand_type_int(FLERR, arg[iarg+1], Atom::IMPROPER, lmp); if (atom->avec->impropers_allow == 0) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); if (ivalue <= 0 || ivalue > atom->nimpropertypes) - error->all(FLERR,"Invalid value in set command"); + error->all(FLERR, iarg + 1, "Invalid value {} in set improper command", ivalue); topology(IMPROPER); iarg += 2; @@ -518,7 +552,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->rho_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SPH_RHO); iarg += 2; @@ -527,7 +562,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); if (!atom->rheo_status_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(RHEO_STATUS); iarg += 2; @@ -536,7 +572,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->esph_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SPH_E); iarg += 2; @@ -545,7 +582,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->cv_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SPH_CV); iarg += 2; @@ -554,7 +592,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->rho_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SPH_RHO); iarg += 2; @@ -564,10 +603,12 @@ void Set::command(int narg, char **arg) else if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else { dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (dvalue < 0.0) error->all(FLERR,"Illegal set command"); + if (dvalue < 0.0) + error->all(FLERR, iarg + 1, "Invalid value {} in set edpd/temp command", dvalue); } if (!atom->edpd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(EDPD_TEMP); iarg += 2; @@ -577,10 +618,12 @@ void Set::command(int narg, char **arg) else if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else { dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (dvalue < 0.0) error->all(FLERR,"Illegal set command"); + if (dvalue < 0.0) + error->all(FLERR, iarg + 1, "Invalid value {} in set edpd/cv command", dvalue); } if (!atom->edpd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(EDPD_CV); iarg += 2; @@ -592,9 +635,11 @@ void Set::command(int narg, char **arg) cc_index = utils::inumeric(FLERR,arg[iarg+1],false,lmp); dvalue = utils::numeric(FLERR,arg[iarg+2],false,lmp); if (cc_index < 1) error->all(FLERR,"Illegal set command"); + error->all(FLERR, iarg + 1, "Invalid index value {} in set cc command", cc_index); } if (!atom->tdpd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(CC); iarg += 3; @@ -603,7 +648,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->smd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SMD_MASS_DENSITY); iarg += 2; @@ -612,7 +658,8 @@ void Set::command(int narg, char **arg) if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); if (!atom->smd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(SMD_CONTACT_RADIUS); iarg += 2; @@ -622,10 +669,12 @@ void Set::command(int narg, char **arg) else if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else { dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (dvalue < 0.0) error->all(FLERR,"Illegal set command"); + if (dvalue < 0.0) + error->all(FLERR, iarg + 1, "Invalid value {} in set dpd/theta command", dvalue); } if (!atom->dpd_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(DPDTHETA); iarg += 2; @@ -635,10 +684,12 @@ void Set::command(int narg, char **arg) else if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else { dvalue = utils::numeric(FLERR,arg[iarg+1],false,lmp); - if (dvalue < 0.0) error->all(FLERR,"Illegal set command"); + if (dvalue < 0.0) + error->all(FLERR, iarg + 1, "Invalid value {} in set epsilon command", dvalue); } if (!atom->dielectric_flag) - error->all(FLERR,"Cannot set attribute {} for atom style {}", arg[iarg], atom->get_style()); + error->all(FLERR, iarg, "Cannot set attribute {} for atom style {}", arg[iarg], + atom->get_style()); set(EPSILON); iarg += 2; @@ -652,26 +703,29 @@ void Set::command(int narg, char **arg) if (iarg+2 > narg) utils::missing_cmd_args(FLERR, "set", error); index_custom = atom->find_custom(argi.get_name(),flag,cols); if (index_custom < 0) - error->all(FLERR,"Set keyword or custom property {} does not exist",pname); + error->all(FLERR, iarg, "Set keyword or custom property {} does not exist", pname); switch (argi.get_type()) { case ArgInfo::INAME: if (utils::strmatch(arg[iarg+1],"^v_")) varparse(arg[iarg+1],1); else ivalue = utils::inumeric(FLERR,arg[iarg+1],false,lmp); - if (flag != 0) error->all(FLERR,"Set command custom property {} is not integer",pname); + if (flag != 0) + error->all(FLERR, iarg + 1, "Set command custom property {} is not integer", pname); if (argi.get_dim() == 0) { if (cols > 0) - error->all(FLERR,"Set command custom integer property {} is not a vector",pname); + error->all(FLERR, iarg, "Set command custom integer property {} is not a vector", + pname); set(IVEC); } else if (argi.get_dim() == 1) { if (cols == 0) - error->all(FLERR,"Set command custom integer property {} is not an array",pname); + error->all(FLERR, iarg, "Set command custom integer property {} is not an array", + pname); icol_custom = argi.get_index1(); if (icol_custom <= 0 || icol_custom > cols) - error->all(FLERR,"Set command per-atom custom integer array {} is accessed " - "out-of-range",pname); + error->all(FLERR, iarg, "Set command per-atom custom integer array {} is accessed " + "out-of-range{}", pname, utils::errorurl(20)); set(IARRAY); } else error->all(FLERR,"Illegal set command"); break; @@ -683,15 +737,15 @@ void Set::command(int narg, char **arg) if (argi.get_dim() == 0) { if (cols > 0) - error->all(FLERR,"Set command custom double property {} is not a vector",pname); + error->all(FLERR, iarg, "Set command custom double property {} is not a vector", pname); set(DVEC); } else if (argi.get_dim() == 1) { if (cols == 0) - error->all(FLERR,"Set command custom double property {} is not an array",pname); + error->all(FLERR, iarg, "Set command custom double property {} is not an array", pname); icol_custom = argi.get_index1(); if (icol_custom <= 0 || icol_custom > cols) - error->all(FLERR,"Set command per-atom custom double array {} is " - "accessed out-of-range",pname); + error->all(FLERR, iarg, "Set command per-atom custom double array {} is accessed " + "out-of-range{}", pname, utils::errorurl(20)); set(DARRAY); } else error->all(FLERR,"Illegal set command"); break; @@ -737,7 +791,7 @@ void Set::selection(int n) if (style == ATOM_SELECT) { if (atom->tag_enable == 0) - error->all(FLERR,"Cannot use set atom with no atom IDs defined"); + error->all(FLERR, Error::NOLASTLINE, "Cannot use set atom with no atom IDs defined"); bigint nlobig,nhibig; utils::bounds(FLERR,id,1,MAXTAGINT,nlobig,nhibig,error); @@ -748,7 +802,7 @@ void Set::selection(int n) } else if (style == MOL_SELECT) { if (atom->molecule_flag == 0) - error->all(FLERR,"Cannot use set mol with no molecule IDs defined"); + error->all(FLERR, Error::NOLASTLINE, "Cannot use set mol with no molecule IDs defined"); bigint nlobig,nhibig; utils::bounds(FLERR,id,1,MAXTAGINT,nlobig,nhibig,error); @@ -767,7 +821,7 @@ void Set::selection(int n) } else if (style == GROUP_SELECT) { int igroup = group->find(id); - if (igroup == -1) error->all(FLERR,"Could not find set group ID {}", id); + if (igroup == -1) error->all(FLERR, Error::NOLASTLINE, "Could not find set group ID {}", id); int groupbit = group->bitmask[igroup]; int *mask = atom->mask; @@ -777,7 +831,7 @@ void Set::selection(int n) } else if (style == REGION_SELECT) { auto region = domain->get_region_by_id(id); - if (!region) error->all(FLERR,"Set region {} does not exist", id); + if (!region) error->all(FLERR, Error::NOLASTLINE, "Set region {} does not exist", id); region->prematch(); double **x = atom->x; @@ -871,7 +925,7 @@ void Set::set(int keyword) if (keyword == TYPE) { if (ivalue <= 0 || ivalue > atom->ntypes) - error->one(FLERR,"Invalid value in set command"); + error->one(FLERR, Error::NOLASTLINE, "Invalid value {} in set type command", ivalue); atom->type[i] = ivalue; } else if (keyword == MOLECULE) atom->molecule[i] = ivalue; @@ -886,21 +940,25 @@ void Set::set(int keyword) // ensure that scaled charges are consistent the new charge value if (atom->epsilon) atom->q_scaled[i] = dvalue / atom->epsilon[i]; } else if (keyword == MASS) { - if (dvalue <= 0.0) error->one(FLERR,"Invalid mass in set command"); + if (dvalue <= 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid mass {} in set command", dvalue); atom->rmass[i] = dvalue; } else if (keyword == DIAMETER) { - if (dvalue < 0.0) error->one(FLERR,"Invalid diameter in set command"); + if (dvalue < 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid diameter {} in set command", dvalue); atom->radius[i] = 0.5 * dvalue; } else if (keyword == VOLUME) { - if (dvalue <= 0.0) error->one(FLERR,"Invalid volume in set command"); + if (dvalue <= 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid volume {} in set command", dvalue); atom->vfrac[i] = dvalue; } else if (keyword == RHEO_STATUS) { if (ivalue != 0 && ivalue != 1) - error->one(FLERR,"Invalid value {} in set command for rheo/status", ivalue); + error->one(FLERR, Error::NOLASTLINE, "Invalid value {} in set command for rheo/status", + ivalue); atom->rheo_status[i] = ivalue; } @@ -936,10 +994,12 @@ void Set::set(int keyword) else if (keyword == SHAPE) { if (xvalue < 0.0 || yvalue < 0.0 || zvalue < 0.0) - error->one(FLERR,"Invalid shape in set command"); + error->one(FLERR, Error::NOLASTLINE, "Invalid ellipsoid shape {} {} {} in set command", + xvalue, yvalue, zvalue); if (xvalue > 0.0 || yvalue > 0.0 || zvalue > 0.0) { if (xvalue == 0.0 || yvalue == 0.0 || zvalue == 0.0) - error->one(FLERR,"Invalid shape in set command"); + error->one(FLERR, Error::NOLASTLINE, "Invalid ellipsoid shape {} {} {} in set command", + xvalue, yvalue, zvalue); } avec_ellipsoid->set_shape(i,0.5*xvalue,0.5*yvalue,0.5*zvalue); } @@ -947,14 +1007,16 @@ void Set::set(int keyword) // set length of line particle else if (keyword == LENGTH) { - if (dvalue < 0.0) error->one(FLERR,"Invalid length in set command"); + if (dvalue < 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid length {} in set command", dvalue); avec_line->set_length(i,dvalue); } // set corners of tri particle else if (keyword == TRI) { - if (dvalue < 0.0) error->one(FLERR,"Invalid length in set command"); + if (dvalue < 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid length {} in set command", dvalue); avec_tri->set_equilateral(i,dvalue); } @@ -966,7 +1028,8 @@ void Set::set(int keyword) // else set rmass to density directly else if (keyword == DENSITY) { - if (dvalue <= 0.0) error->one(FLERR,"Invalid density in set command"); + if (dvalue <= 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid density {} in set command", dvalue); if (atom->radius_flag && atom->radius[i] > 0.0) if (discflag) atom->rmass[i] = MY_PI*atom->radius[i]*atom->radius[i] * dvalue; @@ -1013,7 +1076,8 @@ void Set::set(int keyword) else if (keyword == SPIN_ATOM) { if (dvalue < 0.0) - error->one(FLERR,"Incorrect value for atomic spin magnitude: {}", dvalue); + error->one(FLERR, Error::NOLASTLINE, "Incorrect value for atomic spin magnitude: {}", + dvalue); double **sp = atom->sp; double inorm = 1.0/sqrt(xvalue*xvalue+yvalue*yvalue+zvalue*zvalue); sp[i][0] = inorm*xvalue; @@ -1027,7 +1091,7 @@ void Set::set(int keyword) else if (keyword == RADIUS_ELECTRON) { atom->eradius[i] = dvalue; if (dvalue < 0.0) - error->one(FLERR,"Incorrect value for electron radius: {}", dvalue); + error->one(FLERR, Error::NOLASTLINE, "Incorrect value for electron radius: {}", dvalue); } // set electron spin @@ -1036,7 +1100,7 @@ void Set::set(int keyword) if ((dvalue == -1) || (dvalue == 1) || (dvalue == 0) || (dvalue == 2) || (dvalue == 3)) atom->spin[i] = (int)dvalue; else - error->one(FLERR,"Incorrect value for electron spin: {}", dvalue); + error->one(FLERR, Error::NOLASTLINE, "Incorrect value for electron spin: {}", dvalue); } // set quaternion orientation of ellipsoid or tri or body particle or sphere/bpm @@ -1054,9 +1118,10 @@ void Set::set(int keyword) else if (atom->quat_flag) quat2 = atom->quat; else - error->one(FLERR,"Cannot set quaternion for atom that has none"); + error->one(FLERR, Error::NOLASTLINE, "Cannot set quaternion for atom that has none"); if (domain->dimension == 2 && (xvalue != 0.0 || yvalue != 0.0)) - error->one(FLERR,"Cannot set quaternion with xy components for 2d system"); + error->one(FLERR, Error::NOLASTLINE, + "Cannot set quaternion with xy components for 2d system"); const double theta2 = MY_PI2 * wvalue/180.0; const double sintheta2 = sin(theta2); @@ -1083,7 +1148,7 @@ void Set::set(int keyword) else if (keyword == THETA) { if (atom->line[i] < 0) - error->one(FLERR,"Cannot set theta for atom that is not a line"); + error->one(FLERR, Error::NOLASTLINE, "Cannot set theta for atom that is not a line"); avec_line->bonus[atom->line[i]].theta = dvalue; } @@ -1104,7 +1169,8 @@ void Set::set(int keyword) // set temperature of particle else if (keyword == TEMPERATURE) { - if (dvalue < 0.0) error->one(FLERR,"Invalid temperature in set command"); + if (dvalue < 0.0) + error->one(FLERR, Error::NOLASTLINE, "Invalid temperature {} in set command", dvalue); atom->temperature[i] = dvalue; } @@ -1240,7 +1306,7 @@ void Set::setrandom(int keyword) nsubset = static_cast (fraction * allcount); } else if (keyword == TYPE_SUBSET) { if (nsubset > allcount) - error->all(FLERR,"Set type/subset value exceeds eligible atoms"); + error->all(FLERR, Error::NOLASTLINE, "Set type/subset value exceeds eligible atoms"); } // make selection @@ -1372,7 +1438,7 @@ void Set::setrandom(int keyword) else if (atom->quat_flag) quat2 = atom->quat; else - error->one(FLERR,"Cannot set quaternion for atom that has none"); + error->one(FLERR, Error::NOLASTLINE, "Cannot set quaternion for atom that has none"); ranpark->reset(seed,x[i]); s = ranpark->uniform(); @@ -1405,7 +1471,7 @@ void Set::setrandom(int keyword) else if (atom->quat_flag) quat2 = atom->quat; else - error->one(FLERR,"Cannot set quaternion for atom that has none"); + error->one(FLERR, Error::NOLASTLINE, "Cannot set quaternion for atom that has none"); ranpark->reset(seed,x[i]); theta2 = MY_PI*ranpark->uniform(); @@ -1431,7 +1497,7 @@ void Set::setrandom(int keyword) for (i = 0; i < nlocal; i++) { if (select[i]) { if (atom->line[i] < 0) - error->one(FLERR,"Cannot set theta for atom that is not a line"); + error->one(FLERR, Error::NOLASTLINE, "Cannot set theta for atom that is not a line"); ranpark->reset(seed,x[i]); avec_line->bonus[atom->line[i]].theta = MY_2PI*ranpark->uniform(); count++; @@ -1452,7 +1518,7 @@ void Set::topology(int keyword) // error check if (atom->molecular == Atom::TEMPLATE) - error->all(FLERR,"Cannot set bond topology types for atom style template"); + error->all(FLERR, Error::NOLASTLINE, "Cannot set bond topology types for atom style template"); // border swap to acquire ghost atom info // enforce PBC before in case atoms are outside box @@ -1481,7 +1547,9 @@ void Set::topology(int keyword) for (int i = 0; i < nlocal; i++) for (m = 0; m < atom->num_bond[i]; m++) { atom1 = atom->map(atom->bond_atom[i][m]); - if (atom1 == -1) error->one(FLERR,"Bond atom missing in set command"); + if (atom1 == -1) + error->one(FLERR, Error::NOLASTLINE, "Bond atom missing in set command" + + utils::errorurl(5)); if (select[i] && select[atom1]) { atom->bond_type[i][m] = ivalue; count++; @@ -1499,7 +1567,8 @@ void Set::topology(int keyword) atom2 = atom->map(atom->angle_atom2[i][m]); atom3 = atom->map(atom->angle_atom3[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1) - error->one(FLERR,"Angle atom missing in set command"); + error->one(FLERR, Error::NOLASTLINE, "Angle atom missing in set command" + + utils::errorurl(5)); if (select[atom1] && select[atom2] && select[atom3]) { atom->angle_type[i][m] = ivalue; count++; @@ -1518,7 +1587,8 @@ void Set::topology(int keyword) atom3 = atom->map(atom->dihedral_atom3[i][m]); atom4 = atom->map(atom->dihedral_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) - error->one(FLERR,"Dihedral atom missing in set command"); + error->one(FLERR, Error::NOLASTLINE, "Dihedral atom missing in set command" + + utils::errorurl(5)); if (select[atom1] && select[atom2] && select[atom3] && select[atom4]) { atom->dihedral_type[i][m] = ivalue; count++; @@ -1537,7 +1607,8 @@ void Set::topology(int keyword) atom3 = atom->map(atom->improper_atom3[i][m]); atom4 = atom->map(atom->improper_atom4[i][m]); if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) - error->one(FLERR,"Improper atom missing in set command"); + error->one(FLERR, Error::NOLASTLINE, "Improper atom missing in set command" + + utils::errorurl(5)); if (select[atom1] && select[atom2] && select[atom3] && select[atom4]) { atom->improper_type[i][m] = ivalue; count++; @@ -1554,9 +1625,9 @@ void Set::varparse(const char *name, int m) int ivar = input->variable->find(name+2); if (ivar < 0) - error->all(FLERR,"Variable name {} for set command does not exist", name); + error->all(FLERR, Error::NOLASTLINE, "Variable name {} for set command does not exist", name); if (!input->variable->atomstyle(ivar)) - error->all(FLERR,"Variable {} for set command is invalid style", name); + error->all(FLERR, Error::NOLASTLINE, "Variable {} for set command is invalid style", name); if (m == 1) { varflag1 = 1; ivar1 = ivar; diff --git a/src/thermo.cpp b/src/thermo.cpp index 7e934ed985..caf5206b4a 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -311,8 +311,8 @@ void Thermo::init() error->all(FLERR, Error::NOLASTLINE, "Could not find thermo fix ID {}", id_fix[i]); if (output->thermo_every % fixes[i]->global_freq) - error->all(FLERR, Error::NOLASTLINE, "Thermo and fix {} not computed at compatible times", - id_fix[i]); + error->all(FLERR, Error::NOLASTLINE, "Thermo and fix {} not computed at compatible times{}", + id_fix[i], utils::errorurl(7)); } // find current ptr for each Variable ID diff --git a/src/utils.cpp b/src/utils.cpp index f6208acb58..7427dd0722 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -277,13 +277,11 @@ void utils::fmtargs_print(FILE *fp, fmt::string_view format, fmt::format_args ar std::string utils::errorurl(int errorcode) { - std::string url; - try { - url = fmt::format("\nFor more information see https://docs.lammps.org/err{:04d}", errorcode); - } catch (std::exception &) { - url = std::string("\nFor more information see https://docs.lammps.org/Errors_details.html"); - } - return url; + if (errorcode == 0) + return "\nFor more information see https://docs.lammps.org/Errors_details.html"; + else if (errorcode > 0) + return fmt::format("\nFor more information see https://docs.lammps.org/err{:04d}", errorcode); + else return ""; // negative numbers are reserved for future use pointing to a different URL } void utils::flush_buffers(LAMMPS *lmp) @@ -1246,8 +1244,8 @@ int utils::check_grid_reference(char *errstr, char *ref, int nevery, char *&id, lmp->error->all(FLERR, "{} compute {} data {} is not per-grid array", errstr, idcompute, dname); if (argi.get_dim() && argi.get_index1() > ncol) - lmp->error->all(FLERR, "{} compute {} array {} is accessed out-of-range", errstr, idcompute, - dname); + lmp->error->all(FLERR, "{} compute {} array {} is accessed out-of-range{}", errstr, + idcompute, dname, errorurl(20)); id = utils::strdup(idcompute); return ArgInfo::COMPUTE; @@ -1269,7 +1267,8 @@ int utils::check_grid_reference(char *errstr, char *ref, int nevery, char *&id, if (ifix->pergrid_flag == 0) lmp->error->all(FLERR, "{} fix {} does not compute per-grid info", errstr, idfix); if (nevery % ifix->pergrid_freq) - lmp->error->all(FLERR, "{} fix {} not computed at compatible time", errstr, idfix); + lmp->error->all(FLERR, "{} fix {} not computed at compatible time{}", errstr, idfix, + errorurl(7)); int dim; igrid = ifix->get_grid_by_name(gname, dim); @@ -1286,7 +1285,8 @@ int utils::check_grid_reference(char *errstr, char *ref, int nevery, char *&id, if (argi.get_dim() > 0 && ncol == 0) lmp->error->all(FLERR, "{} fix {} data {} is not per-grid array", errstr, idfix, dname); if (argi.get_dim() > 0 && argi.get_index1() > ncol) - lmp->error->all(FLERR, "{} fix {} array {} is accessed out-of-range", errstr, idfix, dname); + lmp->error->all(FLERR, "{} fix {} array {} is accessed out-of-range{}", errstr, idfix, + dname, errorurl(20)); id = utils::strdup(idfix); return ArgInfo::FIX; diff --git a/src/utils.h b/src/utils.h index 39dd58a79e..b403d78061 100644 --- a/src/utils.h +++ b/src/utils.h @@ -173,11 +173,12 @@ output are compressed to a single blank by calling :cpp:func:`strcompress()` * * The LAMMPS manual contains detailed explanations for errors and * warnings where a simple error message may not be sufficient. These can - * be reached through URLs with a numeric code. This function creates the + * be reached through URLs with a numeric code > 0. This function creates the * corresponding text to be included into the error message that redirects - * the user to that URL. + * the user to that URL. Using an error code of 0 returns a message + * pointing to a URL discussing error messages in general. * - * \param errorcode number pointing to a paragraph in the manual */ + * \param errorcode non-negative number pointing to a paragraph in the manual */ std::string errorurl(int errorcode); diff --git a/src/variable.cpp b/src/variable.cpp index 5ca3dbc2fb..226e886a91 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -188,8 +188,8 @@ void Variable::set(int narg, char **arg) if (strcmp(arg[1], "delete") == 0) { if (narg > 2) - error->all(FLERR, 2, "Illegal variable delete command: expected 2 arguments but found {}", - narg); + error->all(FLERR, 2, "Illegal variable delete command: expected 2 arguments but found {}{}", + narg, utils::errorurl(3)); if (find(arg[0]) >= 0) remove(find(arg[0])); return; @@ -278,7 +278,7 @@ void Variable::set(int narg, char **arg) copy(num[nvar], &arg[2], data[nvar]); } else if (strcmp(arg[1], "uloop") == 0) { if (narg < 3 || narg > 4) - error->all(FLERR, 1, "Illegal variable command: expected 3 or 4 arguments but found {}: {}", + error->all(FLERR, 1, "Illegal variable command: expected 3 or 4 arguments but found {}{}", narg, utils::errorurl(3)); if (narg == 4 && strcmp(arg[3], "pad") != 0) error->all(FLERR, 3, "Invalid variable uloop argument: {}", arg[3]); @@ -1880,7 +1880,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (!fix->scalar_flag) print_var_error(FLERR,"Mismatched fix in variable formula",ivar); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7), ivar); value1 = fix->compute_scalar(); argstack[nargstack++] = value1; @@ -1895,7 +1896,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Variable formula fix vector is accessed out-of-range" + utils::errorurl(20), ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7) ,ivar); // if index exceeds variable vector length, use a zero value // this can be useful if vector length is not known a priori @@ -1917,7 +1919,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Variable formula fix array is accessed out-of-range" + utils::errorurl(20), ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7), ivar); // if index exceeds variable array rows, use a zero value // this can be useful if array size is not known a priori @@ -1936,7 +1939,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Mismatched fix in variable formula",ivar); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7), ivar); peratom2global(1,nullptr,fix->vector_atom,1,index1,tree, treestack,ntreestack,argstack,nargstack); @@ -1953,7 +1957,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Variable formula fix array is accessed out-of-range" + utils::errorurl(20), ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7), ivar); if (fix->array_atom) peratom2global(1,nullptr,&fix->array_atom[0][index2-1], @@ -1980,7 +1985,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (fix->size_vector == 0) print_var_error(FLERR,"Variable formula fix vector is zero length",ivar); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time" + + utils::errorurl(7), ivar); int nvec = fix->size_vector; double *vec; @@ -2008,7 +2014,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Variable formula fix array is accessed out-of-range" + utils::errorurl(20), ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at a compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at a compatible time" + + utils::errorurl(7), ivar); int nvec = fix->size_array_rows; double *vec; @@ -2041,7 +2048,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) if (fix->size_peratom_cols) print_var_error(FLERR,"Mismatched fix in variable formula",ivar); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time" + + utils::errorurl(7), ivar); auto newtree = new Tree(); newtree->type = ATOMARRAY; @@ -2061,7 +2069,8 @@ double Variable::evaluate(char *str, Tree **tree, int ivar) print_var_error(FLERR,"Variable formula fix array is accessed out-of-range" + utils::errorurl(20), ivar,0); if (update->whichflag > 0 && update->ntimestep % fix->peratom_freq) - print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time" + + utils::errorurl(7), ivar); auto newtree = new Tree(); newtree->type = ATOMARRAY; @@ -4531,6 +4540,7 @@ int Variable::special_function(const std::string &word, char *contents, Tree **t std::string mesg = "Fix with ID '"; mesg += (args[0]+2); mesg += "' in variable formula not computed at compatible time"; + mesg += utils::errorurl(7); print_var_error(FLERR,mesg,ivar); } nvec = fix->size_vector; @@ -4540,7 +4550,8 @@ int Variable::special_function(const std::string &word, char *contents, Tree **t print_var_error(FLERR,"Variable formula fix array is accessed out-of-range" + utils::errorurl(20), ivar); if (update->whichflag > 0 && update->ntimestep % fix->global_freq) - print_var_error(FLERR,"Fix in variable not computed at compatible time",ivar); + print_var_error(FLERR,"Fix in variable not computed at compatible time" + + utils::errorurl(7), ivar); nvec = fix->size_array_rows; nstride = fix->size_array_cols; } else print_var_error(FLERR,"Mismatched fix in variable formula",ivar); diff --git a/src/velocity.cpp b/src/velocity.cpp index 1f0a757d7c..ba95fdc631 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -51,7 +51,7 @@ void Velocity::command(int narg, char **arg) if (narg < 2) utils::missing_cmd_args(FLERR, "velocity", error); if (domain->box_exist == 0) - error->all(FLERR,"Velocity command before simulation box is defined"); + error->all(FLERR,"Velocity command before simulation box is defined" + utils::errorurl(33)); if (atom->natoms == 0) error->all(FLERR,"Velocity command with no atoms existing"); diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 5a7177f62f..19f512fab1 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -39,7 +39,7 @@ static constexpr int BUF_SIZE = 256; void WriteCoeff::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR, "Write_coeff command before simulation box is defined"); + error->all(FLERR, "Write_coeff command before simulation box is defined" + utils::errorurl(33)); if (narg != 1) utils::missing_cmd_args(FLERR, "write_coeff", error); diff --git a/src/write_data.cpp b/src/write_data.cpp index 85950f3b47..6f05ae1ac2 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -51,7 +51,7 @@ WriteData::WriteData(LAMMPS *lmp) : Command(lmp) {} void WriteData::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Write_data command before simulation box is defined"); + error->all(FLERR,"Write_data command before simulation box is defined" + utils::errorurl(33)); if (narg < 1) utils::missing_cmd_args(FLERR, "write_data", error); diff --git a/src/write_restart.cpp b/src/write_restart.cpp index a2022deeb9..ecf6b7bc08 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -59,7 +59,7 @@ WriteRestart::WriteRestart(LAMMPS *lmp) : Command(lmp) void WriteRestart::command(int narg, char **arg) { if (domain->box_exist == 0) - error->all(FLERR,"Write_restart command before simulation box is defined"); + error->all(FLERR,"Write_restart command before simulation box is defined" + utils::errorurl(33)); if (narg < 1) utils::missing_cmd_args(FLERR, "write_restart", error); // if filename contains a "*", replace with current timestep