Skip to content

New Feature: Support for bond-type interactions #81

@LonelyCat124

Description

@LonelyCat124

So from talking to Rick yesterday, its clear that once we have a basic DPD implementation, the next thing that will be needed to do "short-range" only is the ability to create molecules, so we need to be able to handle bonds/angles/dihedrals/etc.

For a traditional implementation, this can basically just be a list of pairs/triplets/quartets, and can then be evaluated simply with:

for(int i = 0; i < nr_bonds; i++){
  xpart = &parts[bonds[i][0]];
  ypart = &parts[bonds[i][1][;
  evaluate_bonds(xpart, ypart);
}

For our setup this is not so straightforward, as we can't just access particles at random. However, what we can maybe do is have the bonds as a seperate region and field space, i.e.:

fspace bond( part_reg : region(part)){
  ipart : ptr(part, part_reg),
  jpart : ptr(part, part_reg)
}

task create_bond( parts : region(part), i : ptr(part, parts), j : ptr(part, parts)
  return [bond(parts)]{ ipart = i, jpart = j}
end

The difficulty is I have no idea how this will perform (or if it will do what I expect), but definitely a good starting point to try.

Initial ideas then:

  • Test if the recursive field space idea can work for some naive implementation.
  • If so, then begin building the infrastructure for how to build up bonds, and potentially run them in parallel.
  • Add a new invoke function for bonds, allowing user-defined functions on bonded pairs.
  • IO modules used for DPD/other methods need a way to build up these bonds automatically.

Once this works for bonds, we can extend it to triplets/quartets as desired.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions