Skip to content

Commit f29e8ef

Browse files
authored
Merge pull request brucefan1983#1389 from tang070205/20260308-phonon
Modify the processing method prior to phonon dispersion calculation
2 parents 4c03fff + f87e2ee commit f29e8ef

File tree

14 files changed

+3103
-3431
lines changed

14 files changed

+3103
-3431
lines changed

doc/gpumd/input_files/basis_in.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.

doc/gpumd/input_files/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@ To run one a simulation using the ``gpumd`` executable, one has to prepare at le
1212

1313
run_in
1414
model_xyz
15-
basis_in
1615
kpoints_in
1716
eigenvector_in

doc/gpumd/input_files/kpoints_in.rst

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,38 @@ File format
1313
The format of this file must be as follows:
1414

1515
.. code::
16+
# high symmetry points
17+
k_points_x(0) k_points_y(0) k_points_z(0) name(0)
18+
k_points_x(1) k_points_y(1) k_points_z(1) name(1)
19+
...
1620

17-
N_kpoints
18-
kx(0) ky(0) kz(0)
19-
kx(1) ky(1) kz(1)
20-
...
21-
kx(N_kpoints-1) ky(N_kpoints-1) kz(N_kpoints-1)
21+
22+
Example
23+
-------
24+
25+
For example, the command::
26+
27+
.. code::
28+
29+
0 0 0 G
30+
0.5 0 0 M
31+
0.333 0.333 0 K
32+
0 0 0 G
2233
23-
Here,
24-
* ``N_kpoints`` is the number of k points you want to consider.
25-
* The remaining lines give the k vectors (in units of 1/Å) you want to consider.
26-
* The user has to make sure that the k vectors are defined in the reciprocal space with respect to the unit cell chosen.
34+
or
35+
36+
.. code::
2737
38+
0 0 0 G
39+
0.5 0 0.5 X
40+
0.625 0.25 0.625 U
41+
#Represents a breakpoint, marking the start of the second path.
42+
0.375 0.375 0.75 K
43+
0 0 0 G
44+
0.5 0.5 0.5 L
45+
0.5 0.25 0.75 W
46+
0.5 0 0.5 X
47+
48+
Here,
49+
* The first three columns represent the coordinates of high symmetry points. The last column corresponds to names.
50+
* A blank line indicates a breakpoint or the initiation of a second path.

doc/gpumd/input_parameters/compute_phonon.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,18 @@ To use this keyword, please make sure the following files have been preprared in
1717

1818
* - Input filename
1919
- Brief description
20-
* - ``basis.in``
21-
- Define the mapping from the atom label to the basis label
2220
* - ``kpoints.in``
23-
- Specify the :math:`\boldsymbol{k}`-points
21+
- Specify the :math:`\boldsymbol{k}`-points along the high-symmetry paths
22+
23+
24+
To use this keyword, :attr:`replicate` keywords must write head in the :attr:`run.in` file.
2425

2526
Syntax
2627
------
2728

2829
This keyword is used as follows::
2930

30-
compute_phonon <cutoff> <displacement>
31-
32-
:attr:`cutoff` is the cutoff distance (in units of Å) for calculating the force constants.
31+
compute_phonon <displacement>
3332

3433
:attr:`displacement` is the displacement (in units of Å) for calculating the force constants using the finite-displacement method.
3534

@@ -38,13 +37,14 @@ Example
3837

3938
For example, the command::
4039

41-
compute_phonon 5.0 0.01
40+
compute_phonon 0.01
4241

43-
means that one wants to compute the phonon dispersion using a cutoff distance of 5 Å and a displacement of 0.01 Å.
42+
means that one wants to compute the phonon dispersion using a displacement of 0.01 Å.
4443

4544
Caveats
4645
-------
4746

47+
4848
This keyword should occur after all the :attr:`potential` keywords.
4949

5050
For two-body potentials, the cutoff distance for force constants can be the same as that for force evaluations.

doc/gpumd/output_files/D_out.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This file contains the dynamical matrices :math:`D(\boldsymbol{k})` at different
1111
File format
1212
-----------
1313

14-
The file contains :attr:`3 * N_basis * N_kpoints` rows and :attr:`6 * N_basis` columns, where :attr:`N_basis` is the number of basis atoms in the unit cell defined in the :ref:`basis.in input file <basis_in>` and :attr:`N_kpoints` is the number of :math:`\boldsymbol{k}`-points in the :ref:`kpoints.in input file <kpoints_in>`.
14+
The file contains :attr:`3 * N_basis * N_kpoints` rows and :attr:`6 * N_basis` columns, where :attr:`N_basis` is the number of basis atoms in the unit cell defined and :attr:`N_kpoints` is the number of :math:`\boldsymbol{k}`-points from :ref:`kpoints.in input file <kpoints_in>` created.
1515

1616
Each consecutive :attr:`3 * N_basis` rows correspond to one :math:`\boldsymbol{k}`-point.
1717
For each :math:`\boldsymbol{k}`-point, the first :attr:`3*N_basis` columns correspond to the real part and the second :attr:`3*N_basis` columns correspond to the imaginary part.

src/main_gpumd/run.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ void Run::parse_one_keyword(std::vector<std::string>& tokens)
383383
hessian.compute(
384384
force,
385385
box,
386+
atom.cpu_mass,
386387
atom.cpu_position_per_atom,
387388
atom.position_per_atom,
388389
atom.type,

0 commit comments

Comments
 (0)