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:
Once this works for bonds, we can extend it to triplets/quartets as desired.
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 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.:
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:
invokefunction for bonds, allowing user-defined functions on bonded pairs.Once this works for bonds, we can extend it to triplets/quartets as desired.