Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extended LAMMPS commands support #115

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

cz4rs
Copy link
Contributor

@cz4rs cz4rs commented Sep 18, 2024

Make it possible to define multiple regions (and the size of simulation box will be adjusted accordingly). This is currently rectricted to fcc lattice style only.

Notable changes:

  • use create_atoms to fill the region with atoms of specific type
  • use mass to assign mass to atom type
  • use velocity to assign temperature to atom type

See in.darma deck and the screenshots below for practical demonstration.

You can use paraview --script paraview_process_data.py to speed up analysis of produced data. It will try to load all dump*, domain_act* and domain_lb* data files from your current directory and do some basic ParaView visualization.


TODO (mostly optional):

  • run the simulations for existing decks in CI to ensure no parsing or runtime errors
  • deduce the padding width for filenames from number of steps instead of using hardcoded default
  • improve compatibility with LAMMPS (to be able to run the decks with LAMMPS for comparison)
  • improve group command support
  • improve communication statistics

Multiple regions with different atom types. Note that when the regions overlap, random type will be assigned:
image

Multiple regions with different velocities:
image

Types after 100 steps:
image

Velocities after 100 steps:
image

Types after 1000 steps:
image

@cz4rs
Copy link
Contributor Author

cz4rs commented Sep 18, 2024

@streeve This is remaining part of our work on CabanaMD. Marking this as a draft, as there are some limitations (mostly being restricted to fcc lattice style only) and in progress bits.
Would you be interested in getting this merged as well?

@streeve
Copy link
Member

streeve commented Sep 19, 2024

This is remaining part of our work on CabanaMD. Marking this as a draft, as there are some limitations (mostly being restricted to fcc lattice style only) and in progress bits. Would you be interested in getting this merged as well?

Yes definitely, I will take a look

Copy link
Member

Choose a reason for hiding this comment

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

This is definitely useful - maybe we make a scripts or utils folder?

@@ -328,6 +328,7 @@ void CbnMD<t_System, t_Neighbor>::run()

// Exchange atoms across MPI ranks
comm_timer.reset();
log( std::cout, "Comm::exchange()\tstep ", step );
Copy link
Member

Choose a reason for hiding this comment

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

Should this be unified with the rest of the output?

@@ -268,6 +271,11 @@ void Comm<t_System>::exchange()

N_local = N_local + N_total_recv - N_total_send;

std::cout << '[' << proc_rank << "] "
Copy link
Member

Choose a reason for hiding this comment

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

Same here - always better to have more output, but I doubt we always want to output this

}
if ( keyword.compare( "mass" ) == 0 )
{
known = true;
int type = std::stoi( words.at( 1 ) ) - 1;
int type = std::stoi( words.at( 1 ) ) -
1; // this is annoying because all other commands have to do
Copy link
Member

Choose a reason for hiding this comment

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

I have no problem updating this more broadly if it makes things easier

Copy link
Member

Choose a reason for hiding this comment

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

As someone not very familiar with darma, is it more clear to call this load_balance or lb?

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