Skip to content

Support lmp.in alongside control.inp in LAMMPS run scripts#75

Merged
jan-janssen merged 1 commit into
mainfrom
copilot/update-lammps-scripts-support
Jun 12, 2026
Merged

Support lmp.in alongside control.inp in LAMMPS run scripts#75
jan-janssen merged 1 commit into
mainfrom
copilot/update-lammps-scripts-support

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

LAMMPS run scripts were hardcoded to control.inp. Scripts now detect which input file (lmp.in or control.inp) is present in the working directory and invoke LAMMPS accordingly.

Changes

  • lammps/bin/run_lammps_2024.02.07.sh / _mpi.sh — shell conditional selects lmp.in if present, else falls back to control.inp
  • lammps/bin/run_lammps_2018.03.16.bat — Windows if exist equivalent logic
  • mlip/bin/run_lammpsmlip_2020.12.24.sh / _mpi.sh — same shell conditional

Bash pattern applied:

if [ -f lmp.in ]; then
    INPUT_FILE=lmp.in
else
    INPUT_FILE=control.inp
fi
mpiexec -n ${PYIRON_CORES:=1} --oversubscribe lmp_mpi -in ${INPUT_FILE}

Batch pattern applied:

if exist lmp.in (
    lmp_serial.exe -in lmp.in
) else (
    lmp_serial.exe -in control.inp
)

Copilot AI changed the title Support both lmp.in and control.inp in LAMMPS scripts Support lmp.in alongside control.inp in LAMMPS run scripts Jun 12, 2026
Copilot AI requested a review from jan-janssen June 12, 2026 09:35
@jan-janssen jan-janssen marked this pull request as ready for review June 12, 2026 09:40
@jan-janssen jan-janssen merged commit 6f3f444 into main Jun 12, 2026
1 check passed
@jan-janssen jan-janssen deleted the copilot/update-lammps-scripts-support branch June 12, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants