Skip to content

Collected small changes and fixes#4766

Merged
akohlmey merged 22 commits intolammps:developfrom
akohlmey:collected-small-changes
Nov 10, 2025
Merged

Collected small changes and fixes#4766
akohlmey merged 22 commits intolammps:developfrom
akohlmey:collected-small-changes

Conversation

@akohlmey
Copy link
Copy Markdown
Member

@akohlmey akohlmey commented Nov 6, 2025

Summary

This pull request combines multiple small changes, refactoring, and bug fixes.

Related Issue(s)

N/A

Author(s)

Axel Kohlmeyer, Temple U

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Artificial Intelligence (AI) Tools Usage

By submitting this pull request, I confirm that I did NOT use any AI tools to generate
all or parts of the code and modifications in this pull request.

Backward Compatibility

N/A

Implementation Notes

The following individual changes are included:

  • avoid some redundant integer divisions in the Image class
  • enable some automated tests using GitHub runners also on the "maintenance" branch
  • improve error messages in fix gcmc
  • modernize recently added C++ code in Output class
  • remove redundant and inefficient recently added member from LabelMap class
  • refactor OPENMP package neighbor list routines to throw error exceptions only outside the multi-threaded regions
  • improve some error messages in the OPENMP package
  • fix some documentation issues

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • Suitable tests have been added to the unittest tree.

@akohlmey akohlmey self-assigned this Nov 6, 2025
@akohlmey akohlmey moved this to In Progress in LAMMPS Pull Requests Nov 6, 2025
@athomps
Copy link
Copy Markdown
Contributor

athomps commented Nov 6, 2025

Change to Thermo::compute_ecouple() restores expected behavior for thermo output for ecouple and econserve when using:

	thermo_modify   norm yes

and either:

	fix             1 all nvt temp 1.66 1.66 0.1

or:

	fix	1 all nve
	fix          2 all langevin 1.66 1.66 2.0 699483 tally yes

This won't affect anyone using the scalar value from these fixes directly. There may be use cases involving a fix with extscalar = 0 where this might not give the expected behavior, but this seems unlikely. The 4 fixes in ./srcwith ecouple_flag = 1 all have extscalar = 1.

@jtclemm
Copy link
Copy Markdown
Collaborator

jtclemm commented Nov 7, 2025

Hey Axel, can I add the three latest commits here this PR?

This would then close #4758

@akohlmey
Copy link
Copy Markdown
Member Author

akohlmey commented Nov 7, 2025

Hey Axel, can I add the three latest commits here this PR?

This would then close #4758

Yes, absolutely. Please update the description of the pull request accordingly. Thanks.

@akohlmey
Copy link
Copy Markdown
Member Author

akohlmey commented Nov 7, 2025

@jtclemm
FYI, this code:

double imass;
    if (atom->rmass)
      imass = atom->rmass[i];
    else
      imass = atom->mass[type];

can also be written as a one liner:

const double imass = (atom->rmass) ? atom->rmass[i] : atom->mass[type];

@akohlmey
Copy link
Copy Markdown
Member Author

akohlmey commented Nov 7, 2025

Hey Axel, can I add the three latest commits here this PR?

If you'd rather have me cherry-pick those commits into the branch, just let me know.

@jtclemm
Copy link
Copy Markdown
Collaborator

jtclemm commented Nov 9, 2025

If you'd rather have me cherry-pick those commits into the branch, just let me know.

Just merged, took a while for me to get the chance.

@jtclemm
Copy link
Copy Markdown
Collaborator

jtclemm commented Nov 9, 2025

can also be written as a one liner:

I always assumed ternarys weren't used in LAMMPS. But I guess that's just because I don't really see them.

@akohlmey
Copy link
Copy Markdown
Member Author

akohlmey commented Nov 9, 2025

can also be written as a one liner:

I always assumed ternarys weren't used in LAMMPS. But I guess that's just because I don't really see them.

It is a matter of individual preference. I like using them for variable initialization.

@akohlmey akohlmey moved this from In Progress to Ready for Review or Merge in LAMMPS Pull Requests Nov 9, 2025
@akohlmey akohlmey marked this pull request as ready for review November 9, 2025 20:38
@akohlmey akohlmey merged commit 003e40f into lammps:develop Nov 10, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from Ready for Review or Merge to Done in LAMMPS Pull Requests Nov 10, 2025
@akohlmey akohlmey deleted the collected-small-changes branch November 10, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants