| Command | Purpose |
|---|---|
| lsp wateq4f.dat | outputs a summary of the major PHREEQC database-related keywords found in the file wateq4f.dat in the current directory |
| lsp -s wateq4f.dat | as above but includes a list of all species |
| lsp -d wateq4f.dat | as above but appends details including key parameter values (e.g. log_k's) |
| lsp -l wateq4f.dat | as above but appends line numbers and analytical expressions |
| lsp -e -t wateq4f.dat | as above but appends the defining equations and tidies them up |
| lsp -s -b=4,5 wateq4f.dat | outputs all the PHASES (solids and gases) in wateq4f.dat |
| lsp -r -s "*.dat" >lsp.out | recursively outputs a list of all species in all *.dat files in the current directory and all sub-directories and sends results to lsp.out |
| lsp -r -p -s -f="U:*" "*" | recursively finds all U species in all files (set filter) |
| lsp -d -f="U.*CO3" "*.dat" | outputs details for all U-CO3 species in .dat files (regex filter) |
| lsp -d -p -f="C[^a-z],C$" "*.dat" | outputs details for all carbon species in .dat files (regex filter) |
| lsp -s -f="C:S:*" "*.dat" | outputs details for all species containing carbon OR sulfur (set filter) |
| lsp -s -f="C:S:*" "*.dat" | outputs details for all species containing carbon AND sulfur (set filter) |
| lsp -s -f="C:S" "*.dat" | outputs details for all species containing ONLY carbon or sulfur (set filter) |
| lsp -s -f="C,S" "*.dat" | outputs details for all species containing letter C or letter S (regex filter) |
| lsp -r -s -x="\.pqo$ \.doc$" "*" | analyse all files in the current directory and sub-directories excluding all files with extensions .pqo and .doc |
| lsp -d -c new.dat old.dat | compare line-by-line after reducing both files to lsp -d format. Then send the output to 'WinMerge' if found else 'fc' or if set, an explicit -c="<app>" |
| lsp -c="diff" -co="-wB -C 0" -o "new.dat old.dat" | compare new.dat and old.dat in their original formats using the 'diff' program. Ignore white space and blank lines; output no extra context lines |
| lsp -f="Alkalinity:H:O:E:Na:K:Mg:Ca:Cl:C:S:N" -f2 llnl.dat | makes a filtered llnl.dat database file containing just the major element species |
| lsp -f2 -k="asis" -ts llnl.dat | tidies llnl.dat with no sorting, filtering etc. and retains comments in order. Add -e to only reformat the species equations. |
| lsp -f3 -e -t wateq4f.dat |
makes a comma-separated spreadsheet format file with trimmed equations.
The location is: |
| lsp -f | help for option f |
| lsp -h | more | full help with paging |
The list species app (lsp) is a small command line program ('app') for locating and analysing PHREEQC-format database files. It helps to count and view the species defined within a file at several levels of detail. It also has a file comparison mode for locating small differences between two database files. It can also prepare new database files after selective filtering, and if wanted, tidying.
The app is available for x64 Windows and Linux (Ubuntu, Debian, ArchLinux, FedoraLinux, openSUSE)
. The Linux version requires at least
GCC 11.4.
To run, open a command line (console or terminal) window and type
>lsp -h
where h (for 'help') is an option. This should give a list of all the options and can be viewed here. -h1 provides a one-line summary of the options. A list of examples is given in the right panel. Individual help information is available via lsp -<option>, e.g. lsp -f for the filter option.
All output is to the screen. Output to a file can be made using redirection by adding '> <filename>' to the end of the command where <filename> is the name of the file to receive the output.
A list of changes can be seen here and in the changes.txt file in the doc directory.
The app will be periodically updated so it is worth checking if you have the latest version by comparing your version's date in the lsp version info (-v) banner with the 'Last updated' date below. Bug reporting, suggestions and queries to david@phreeplot.org.