Skip to content

Commit 6d82ea0

Browse files
authored
Merge pull request brucefan1983#1336 from brucefan1983/rdf_speedup
RDF generalization and speedup
2 parents 5b630ec + 408e205 commit 6d82ea0

4 files changed

Lines changed: 142 additions & 584 deletions

File tree

doc/gpumd/input_parameters/compute_rdf.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@ Syntax
3333

3434
This keyword is used as follows::
3535

36-
compute_rdf <cutoff> <num_bins> <interval> [atom <i1> <i2> atom <i3> <i4> ...]
36+
compute_rdf <cutoff> <num_bins> <interval>
3737

3838
This means that the :term:`RDF` calculations will be performed every :attr:`interval` steps, with :attr:`num_bins` data points evenly distributed from 0 to :attr:`cutoff` (in units of Ångstrom) in terms of the distance between atom pairs.
3939

40-
Without the optional parameters, only the total :term:`RDF` will be calculated.
41-
42-
To additionally calculate the partial :term:`RDF` for a pair of species, one can specify the types of the two species after the word "atom".
43-
The types 0, 1, 2, ... correspond to the species in the potential file in order.
44-
Currently, one can specify at most 6 pairs.
40+
Starting from GPUMD-v4.9, there is no need to specify the atom pairs and the code will calculate the partial :term:`RDF`s for all atom pairs.
4541
4642
Example
4743
-------
4844
49-
compute_rdf 8.0 400 1000 # total RDF every 1000 MD steps with 400 data up to 8 Angstrom
50-
compute_rdf 8.0 400 1000 atom 0 0 atom 1 1 atom 0 1 # additionally calculate 3 partial RDFs
45+
compute_rdf 8.0 400 1000 # Calculate all RDFs every 1000 MD steps with 400 data up to 8 Angstrom

src/main_gpumd/run.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ void Run::parse_one_keyword(std::vector<std::string>& tokens)
514514
measure.properties.emplace_back(std::move(property));
515515
} else if (strcmp(param[0], "compute_rdf") == 0) {
516516
std::unique_ptr<Property> property;
517-
property.reset(new RDF(param, num_param, box, number_of_types, number_of_steps));
517+
property.reset(new RDF(param, num_param, box, atom.cpu_type_size, number_of_steps));
518518
measure.properties.emplace_back(std::move(property));
519519
} else if (strcmp(param[0], "compute_adf") == 0) {
520520
std::unique_ptr<Property> property;

0 commit comments

Comments
 (0)