brucefan1983 / GPUMD

Graphics Processing Units Molecular Dynamics
https://gpumd.org/dev
GNU General Public License v3.0
417 stars 110 forks source link

allow compute SHC for all group IDs except group ID 0 in a given grouping method #614

Closed Tingliangstu closed 2 months ago

Tingliangstu commented 2 months ago

It was modified based on Dr. Xuke's version. In the original version, only the SHC of all group IDs in the grouping method 0 could be calculated. Grouping method 0 is already occupied by the heat source and sink when using NEMD. In this case, the group IDs in group method 0 cannot be divided arbitrarily.

In the PR version, there is no limit to grouping method 0. All possible group methods can be specified. In addition, the SHC output group ID 0 is skipped. Because when using NEMD, users tend not to output fix groups and heat sink and source groups. This means that when regrouping, the user can assign this part to group ID 0, thereby avoiding wasting computation time and memory to compute all the other remaining group IDs. Of course, when the user still wants to compute all group time for all systems, they can do so without assigning atoms to group ID 0. This provides some flexibility.

In this PR, the main modification is shc.cu. The corresponding user manual and output instructions have also been modified accordingly.

Tingliangstu commented 2 months ago

@brucefan1983 @Kick-H

Tingliangstu commented 2 months ago

Test on MoS2 system using NEMD. The SHC in the middle section was tested away from the heat source and the heat sink. This figure is the result of the new PR.

1714895444(1)

The next is to compare the PR version with the old version.

1714895585(1)

These results are self-consistent.