<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://vasp.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Best_practices_for_Bethe-Salpeter_calculations</id>
	<title>Best practices for Bethe-Salpeter calculations - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://vasp.at/wiki/index.php?action=history&amp;feed=atom&amp;title=Best_practices_for_Bethe-Salpeter_calculations"/>
	<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;action=history"/>
	<updated>2026-04-10T13:28:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28660&amp;oldid=prev</id>
		<title>Tal at 14:40, 24 February 2025</title>
		<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28660&amp;oldid=prev"/>
		<updated>2025-02-24T14:40:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:40, 24 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{TAG|OMEGAMAX}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{TAG|OMEGAMAX}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Many-body perturbation theory]][[Category:Bethe-Salpeter equations]][[Category:Howto]][[Category:Linear response]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Many-body perturbation theory]][[Category:Bethe-Salpeter equations]][[Category:Howto]][[Category:Linear response&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]][[Category:Performance&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tal</name></author>
	</entry>
	<entry>
		<id>https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28503&amp;oldid=prev</id>
		<title>Tal: /* Large cells */</title>
		<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28503&amp;oldid=prev"/>
		<updated>2025-02-21T16:28:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Large cells&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:28, 21 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use vasp_gam&amp;#039;&amp;#039;&amp;#039;. If possible use the gamma version of VASP as it substantially reduces the required memory and computational time.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use vasp_gam&amp;#039;&amp;#039;&amp;#039;. If possible use the gamma version of VASP as it substantially reduces the required memory and computational time.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Use lower {{TAG|PRECFOCK}}&#039;&#039;&#039;. In large cells, the FFTs may take up the majority of the time in the calculation of the matrix elements, and reducing the FFT grid can largely speed up the calculation. For the large cells, even low precision can be &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;used&lt;/del&gt;, but &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;it has to &lt;/del&gt;be investigated for each &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;particular &lt;/del&gt;system &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;of interest&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Use lower {{TAG|PRECFOCK}}&#039;&#039;&#039;. In large cells, the FFTs may take up the majority of the time in the calculation of the matrix elements, and reducing the FFT grid can largely speed up the calculation. For the large cells, even low precision can be &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;found sufficiently accurate&lt;/ins&gt;, but &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the convergence with {{TAG|PRECFOCK}} must &lt;/ins&gt;be investigated for each system.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Related articles ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Related articles ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tal</name></author>
	</entry>
	<entry>
		<id>https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28502&amp;oldid=prev</id>
		<title>Tal: /* Optimizing performance */</title>
		<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28502&amp;oldid=prev"/>
		<updated>2025-02-21T16:27:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Optimizing performance&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:27, 21 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use the Lanczos algorithm&amp;#039;&amp;#039;&amp;#039;. Diagonalizing large matrices can be too time-consuming. Thus, for large matrices (e.g. rank &amp;gt; 1000)  we recommend using the Lanczos ({{TAG|IBSE}}=3) or time-evolution ({{TAG|IBSE}}=1) algorithms.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use the Lanczos algorithm&amp;#039;&amp;#039;&amp;#039;. Diagonalizing large matrices can be too time-consuming. Thus, for large matrices (e.g. rank &amp;gt; 1000)  we recommend using the Lanczos ({{TAG|IBSE}}=3) or time-evolution ({{TAG|IBSE}}=1) algorithms.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Set {{TAG|KPAR}} to the number of MPI ranks&#039;&#039;&#039;. {{TAG|KPAR}} in BSE divides all MPI ranks into KPAR groups, which will share the wavefunctions. Thus, if {{TAG|KPAR}}=&amp;lt;code&amp;gt;number of MPI ranks&amp;lt;/code&amp;gt; all wavefunctions are stored on every MPI rank, which eliminates the need to send/receive the orbitals during the calculation of the matrix elements. For small, &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cells &lt;/del&gt;it can be greatly beneficial to distribute all wavefunctions within a small group of MPI ranks or ideally store all orbitals on every rank.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;&#039;Set {{TAG|KPAR}} to the number of MPI ranks&#039;&#039;&#039;. {{TAG|KPAR}} in BSE divides all MPI ranks into KPAR groups, which will share the wavefunctions. Thus, if {{TAG|KPAR}}=&amp;lt;code&amp;gt;number of MPI ranks&amp;lt;/code&amp;gt; all wavefunctions are stored on every MPI rank, which eliminates the need to send/receive the orbitals during the calculation of the matrix elements. For small &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;cells&lt;/ins&gt;, it can be greatly beneficial to distribute all wavefunctions within a small group of MPI ranks or ideally store all orbitals on every rank.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Compile VASP with &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. By default, VASP stores and solves the BSE in double precision. However, if VASP is compiled with the flag &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt; the matrix is stored and solved in single precision, which gives a factor of two in performance and halves the memory required to store the matrix.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Compile VASP with &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. By default, VASP stores and solves the BSE in double precision. However, if VASP is compiled with the flag &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt; the matrix is stored and solved in single precision, which gives a factor of two in performance and halves the memory required to store the matrix.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot;&gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use lower {{TAG|PRECFOCK}}&amp;#039;&amp;#039;&amp;#039;. In large cells, the FFTs may take up the majority of the time in the calculation of the matrix elements, and reducing the FFT grid can largely speed up the calculation. For the large cells, even low precision can be used, but it has to be investigated for each particular system of interest.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;&amp;#039;Use lower {{TAG|PRECFOCK}}&amp;#039;&amp;#039;&amp;#039;. In large cells, the FFTs may take up the majority of the time in the calculation of the matrix elements, and reducing the FFT grid can largely speed up the calculation. For the large cells, even low precision can be used, but it has to be investigated for each particular system of interest.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Related articles ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Related articles ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{TAG|ALGO}},&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{TAG|ALGO}},&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tal</name></author>
	</entry>
	<entry>
		<id>https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28499&amp;oldid=prev</id>
		<title>Tal: Tal moved page Construction:Best practices for Bethe-Salpeter calculations to Best practices for Bethe-Salpeter calculations</title>
		<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28499&amp;oldid=prev"/>
		<updated>2025-02-21T16:19:30Z</updated>

		<summary type="html">&lt;p&gt;Tal moved page &lt;a href=&quot;/wiki/Construction:Best_practices_for_Bethe-Salpeter_calculations&quot; class=&quot;mw-redirect&quot; title=&quot;Construction:Best practices for Bethe-Salpeter calculations&quot;&gt;Construction:Best practices for Bethe-Salpeter calculations&lt;/a&gt; to &lt;a href=&quot;/wiki/Best_practices_for_Bethe-Salpeter_calculations&quot; title=&quot;Best practices for Bethe-Salpeter calculations&quot;&gt;Best practices for Bethe-Salpeter calculations&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:19, 21 February 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Tal</name></author>
	</entry>
	<entry>
		<id>https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28498&amp;oldid=prev</id>
		<title>Tal: Created page with &quot;== Optimizing performance == Due to the steep scaling of the BSE method with the system size, it is important to optimize the parameters of the calculation. Here we provide recommendations that can significantly speed up the BSE calculations in VASP. Below we consider two limiting cases: small cells and large cells.  === Small cells === We consider that small cells are the cells where the number of atoms doesn&#039;t exceed &#039;&#039;eight&#039;&#039;. For such cells, it is typical that a larg...&quot;</title>
		<link rel="alternate" type="text/html" href="https://vasp.at/wiki/index.php?title=Best_practices_for_Bethe-Salpeter_calculations&amp;diff=28498&amp;oldid=prev"/>
		<updated>2025-02-21T16:18:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Optimizing performance == Due to the steep scaling of the BSE method with the system size, it is important to optimize the parameters of the calculation. Here we provide recommendations that can significantly speed up the BSE calculations in VASP. Below we consider two limiting cases: small cells and large cells.  === Small cells === We consider that small cells are the cells where the number of atoms doesn&amp;#039;t exceed &amp;#039;&amp;#039;eight&amp;#039;&amp;#039;. For such cells, it is typical that a larg...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Optimizing performance ==&lt;br /&gt;
Due to the steep scaling of the BSE method with the system size, it is important to optimize the parameters of the calculation. Here we provide recommendations that can significantly speed up the BSE calculations in VASP.&lt;br /&gt;
Below we consider two limiting cases: small cells and large cells.&lt;br /&gt;
&lt;br /&gt;
=== Small cells ===&lt;br /&gt;
We consider that small cells are the cells where the number of atoms doesn&amp;#039;t exceed &amp;#039;&amp;#039;eight&amp;#039;&amp;#039;.&lt;br /&gt;
For such cells, it is typical that a large number of k-points is required to obtain a converged spectrum. Hence, the following optimizations should be considered.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use the Lanczos algorithm&amp;#039;&amp;#039;&amp;#039;. Diagonalizing large matrices can be too time-consuming. Thus, for large matrices (e.g. rank &amp;gt; 1000)  we recommend using the Lanczos ({{TAG|IBSE}}=3) or time-evolution ({{TAG|IBSE}}=1) algorithms.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Set {{TAG|KPAR}} to the number of MPI ranks&amp;#039;&amp;#039;&amp;#039;. {{TAG|KPAR}} in BSE divides all MPI ranks into KPAR groups, which will share the wavefunctions. Thus, if {{TAG|KPAR}}=&amp;lt;code&amp;gt;number of MPI ranks&amp;lt;/code&amp;gt; all wavefunctions are stored on every MPI rank, which eliminates the need to send/receive the orbitals during the calculation of the matrix elements. For small, cells it can be greatly beneficial to distribute all wavefunctions within a small group of MPI ranks or ideally store all orbitals on every rank.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Compile VASP with &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. By default, VASP stores and solves the BSE in double precision. However, if VASP is compiled with the flag &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt; the matrix is stored and solved in single precision, which gives a factor of two in performance and halves the memory required to store the matrix.&lt;br /&gt;
&lt;br /&gt;
=== Large cells ===&lt;br /&gt;
The following optimizations should be relevant for cells where the number of atoms is larger than &amp;#039;&amp;#039;eight&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use the Lanczos algorithm&amp;#039;&amp;#039;&amp;#039;. Diagonalizing large matrices can be very time-consuming. Thus, for large matrices, e.g. rank &amp;gt; 1000, we recommend using the Lanczos ({{TAG|IBSE}}=3) or time-evolution ({{TAG|IBSE}}=1) algorithms.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|NBSEBLOCKV}} and/or {{TAG|NBSEBLOCKO}}&amp;#039;&amp;#039;&amp;#039;. For large cells, it is typical that the number of k-points is small and the number of bands is large. By default in VASP, the matrix elements calculation in BSE is parallelized over k-points, which might not allow for the optimal load balancing of the computational load. By using parallelization over bands, we can subdivide large blocks of data each MPI rank computes into smaller blocks thus improving the load balance.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Compile VASP with &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt;&amp;#039;&amp;#039;&amp;#039;. By default, VASP stores and solves the BSE in double precision. However, if VASP is compiled with the flag &amp;lt;code&amp;gt;-Dsingle_prec_bse&amp;lt;/code&amp;gt; the matrix is stored and solved in single precision, which gives a factor of two in performance and halves the memory required to store the matrix.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use vasp_gam&amp;#039;&amp;#039;&amp;#039;. If possible use the gamma version of VASP as it substantially reduces the required memory and computational time.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use {{TAG|OMEGAMAX}} to limit the energy range&amp;#039;&amp;#039;&amp;#039;. The {{TAG|OMEGAMAX}} can be used to exclude transitions with higher energy from the BSE calculation. This largely reduces both the memory requirement and the computational time. It is especially beneficial for systems with a strong band dispersion, where energies can strongly vary at different k-points. This, however, requires some caution as it is not guaranteed that the spectrum up to {{TAG|OMEGAMAX}} is fully converged and the convergence of the spectrum with {{TAG|OMEGAMAX}} must be carefully investigated.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Use lower {{TAG|PRECFOCK}}&amp;#039;&amp;#039;&amp;#039;. In large cells, the FFTs may take up the majority of the time in the calculation of the matrix elements, and reducing the FFT grid can largely speed up the calculation. For the large cells, even low precision can be used, but it has to be investigated for each particular system of interest.&lt;br /&gt;
== Related articles ==&lt;br /&gt;
{{TAG|ALGO}},&lt;br /&gt;
{{TAG|LADDER}},&lt;br /&gt;
{{TAG|LHARTREE}},&lt;br /&gt;
{{TAG|NBANDSV}},&lt;br /&gt;
{{TAG|NBANDSO}},&lt;br /&gt;
{{TAG|NBSEBLOCKV}},&lt;br /&gt;
{{TAG|NBSEBLOCKO}},&lt;br /&gt;
{{TAG|OMEGAMAX}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Many-body perturbation theory]][[Category:Bethe-Salpeter equations]][[Category:Howto]][[Category:Linear response]]&lt;/div&gt;</summary>
		<author><name>Tal</name></author>
	</entry>
</feed>