Skip to content

Conversation

@Somasundaram-Rahul
Copy link
Collaborator

This PR merges several updates to the LAMMPS agent into the Main branch. In summary, they are:

  1. Added detailed documentation for the LAMMPS agent. This is in the form of an MD file here: ursa/docs/lammps_agent.md
  2. Updated the progression of the agent's terminal output using Rich
  3. Updated how the agent attempts to fix the input script: it now uses the full run history instead of looking at the latest run
  4. The agent can now take in a user-provided potential file
  5. The user can now provide data files for the agent to use in its simulations
  6. The agent can now use GPUs for the LAMMPS runs

Somasundaram-Rahul and others added 29 commits September 5, 2025 14:06
…ose potentials only, i.e. without actually running LAMMPS
Somasundaram-Rahul and others added 5 commits January 20, 2026 16:48
Updating and handling conflicts.

Co-authored-by: Somasundaram-Rahul
I forgot to merge changes that had been pushed to the repo since my last push.
This should be resolved and up to date with current version.
Copy link
Collaborator

@luiarthur luiarthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Somasundaram-Rahul! This is great.

I have a few suggestions.

Would adding a test to tests/ be possible? I think your examples might be sufficient. The test should ideally be fast and can be crude. Just want to make we know if/when future changes will break this code.


## Dependencies

The main dependency is the [LAMMPS](https://www.lammps.org) code that needs to be installed separately. LAMMPS is a classical molecular dynamics code developed by Sandia National Laboratories. Installation instructions can be found [here](https://docs.lammps.org/Install.html). On macOS and linux systems, the simplest way to install LAMMPS is often via [Conda](https://anaconda.org/channels/conda-forge/packages/lammps/overview), in the same conda environment where `ursa` is installed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The main dependency is the [LAMMPS](https://www.lammps.org) code that needs to be installed separately. LAMMPS is a classical molecular dynamics code developed by Sandia National Laboratories. Installation instructions can be found [here](https://docs.lammps.org/Install.html). On macOS and linux systems, the simplest way to install LAMMPS is often via [Conda](https://anaconda.org/channels/conda-forge/packages/lammps/overview), in the same conda environment where `ursa` is installed.
The main dependency is the [LAMMPS](https://www.lammps.org) code that needs to be separately installed. LAMMPS is a classical molecular dynamics code developed by Sandia National Laboratories. Installation instructions can be found [here](https://docs.lammps.org/Install.html). On MacOS and Linux systems, the simplest way to install LAMMPS is often via [Conda](https://anaconda.org/channels/conda-forge/packages/lammps/overview), in the same conda environment where `ursa` is installed.


The main dependency is the [LAMMPS](https://www.lammps.org) code that needs to be installed separately. LAMMPS is a classical molecular dynamics code developed by Sandia National Laboratories. Installation instructions can be found [here](https://docs.lammps.org/Install.html). On macOS and linux systems, the simplest way to install LAMMPS is often via [Conda](https://anaconda.org/channels/conda-forge/packages/lammps/overview), in the same conda environment where `ursa` is installed.

Two additional dependencies, that are not installed along with `ursa`, are `atomman` and `trafilatura`. These can be installed via `pip install atomman` and `pip install trafilatura`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Two additional dependencies, that are not installed along with `ursa`, are `atomman` and `trafilatura`. These can be installed via `pip install atomman` and `pip install trafilatura`.
Two additional dependencies, that are not installed along with `ursa`, are `atomman` and `trafilatura`. These can be installed via `pip install atomman trafilatura`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it looks like trafilatura is in the dependencies. So the only other dependency is atomman. @mikegros does it make sense to remove trafilatura from dependencies and remove the lammps group; and then add trafilatura and atomman as optional dependencies? I can make the change if wanted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the html parsing utility uses trafilatura as well, so it's required more broadly. This error should really only mention atomman

summarize_results=True,
)

with open("eos_template.txt", "r") as file:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this file look like?

)

if final_lammps_state.get("run_returncode") == 0:
print("\nLAMMPS Workflow completed successfully. Exiting.....")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using console.print for consistency.


Summarize the contents of this file in a markdown document. Include a plot, if relevent.
"""
simulation_task = "Carry out a LAMMPS simulation of the high entropy alloy Co-Cr-Fe-Mn-Ni to determine its stiffness tensor."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't count, but if this is longer than 80 lines, split into two lines. e.g.,

simulation_task = (
    "Carry out a LAMMPS ..."
    "its stiffness tensor."
)

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.

4 participants