Skip to content

Extract common logics to helper functions#55

Open
GardevoirX wants to merge 5 commits into
metatomicfrom
simplify
Open

Extract common logics to helper functions#55
GardevoirX wants to merge 5 commits into
metatomicfrom
simplify

Conversation

@GardevoirX

Copy link
Copy Markdown

Currently we have compute metatomic, fix metatomic, and pair metatomic. And they share a lot of common parts. This PR aims at extracting them and put them into files like metatomic_systems and metatomic_types to ensure that in the future development these shared code won't be out of sync

One thing I am not sure is that this part exists in both compute and fix, but not in pair

    auto mincut = mta_data->max_cutoff + neighbor->skin;
    if (comm->get_comm_cutoff() < mincut) {
        if (comm->me == 0) {
            error->warning(FLERR,
                "Increasing communication cutoff to {:.8} for fix metatomic",
                mincut
            );
        }
        comm->cutghostuser = mincut;
    }

idk if this should also be in pair

@Luthaf

Luthaf commented Jul 13, 2026

Copy link
Copy Markdown
Member

One thing I am not sure is that this part exists in both compute and fix, but not in pair

No, the pairs code already properly handle this in LAMMPS.

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