<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="auto">Good. <br>
<div dir="auto">Remember that if you want to compare the bands of the two spin channels you will need also to shift with respect to the other so to that the two fermi levels match. </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">Il 10 set 2025 10:36 PM, Rameswar Bhattacharjee <rb1820@georgetown.edu> ha scritto:<br type="attribution">
</div>
</div>
<div>
<div dir="ltr">Dear <span style="color:rgb(0,0,0); font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:14.666667px">Pietro </span>
<div><span style="color:rgb(0,0,0); font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:14.666667px">Thank you very much for your suggestions. Now I used this strategy for one system and got band structures for up
and down electrons. I really appreciate your expert advice to solve this issue.</span></div>
<div><span style="color:rgb(0,0,0); font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:14.666667px"><br>
</span></div>
<div><span style="color:rgb(0,0,0); font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:14.666667px">Rameswar</span></div>
</div>
<br>
<div class="gmail_quote gmail_quote_container">
<div dir="ltr" class="gmail_attr">On Mon, Sep 8, 2025 at 1:25 PM Pietro Davide Delugas <<a href="mailto:pdelugas@sissa.it">pdelugas@sissa.it</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204); padding-left:1ex">
<div class="msg6718361296659749027">
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Dear Rameswar </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
It is very simple </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
open the file <prefix>.save/data-file-schema.xml </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
search for a line like </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<two_fermi_energies>7.608312845405552E-001 5.253841076666873E-001</two_fermi_energies> </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
and either remove it completely or comment it out like this</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<!--two_fermi_energies>7.608312845405552E-001 5.253841076666873E-001</two_fermi_energies—> </div>
<div id="m_6718361296659749027appendonsend"></div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Bands should then work fine. </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Pietro </div>
<hr style="display:inline-block; width:98%">
<div id="m_6718361296659749027divRplyFwdMsg">
<div style="direction:ltr; font-family:Calibri,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<b>From:</b> users <<a href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> on behalf of Rameswar Bhattacharjee <<a href="mailto:rb1820@georgetown.edu" target="_blank">rb1820@georgetown.edu</a>><br>
<b>Sent:</b> Saturday, September 6, 2025 18:19<br>
<b>To:</b> Quantum ESPRESSO users Forum <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Subject:</b> Re: [QE-users] Question on using bands.x with nspin=2 and total_magnetization=1</div>
<div style="direction:ltr"> </div>
</div>
<div style="direction:ltr">Dear Pietro,</div>
<div style="direction:ltr">I am sorry for my late response as I was out and had limited access to the internet. Thank you very much for your response. I tried to use total_magnetization for the scf and for the following nscf and bands, I removed that. However,
as you suspected the error remains. </div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I understand that you might fix it if I send you the xml file but I need to run several systems and am looking for a solution. Is there any way you can guide me to remove the error by myself? I can also send you the xml if you kindly
fix it and let me know the steps.</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">Thanks you</div>
<div style="direction:ltr">Rameswar</div>
<div><br>
</div>
<div style="direction:ltr">On Wed, Sep 3, 2025 at 10:50 AM Pietro Davide Delugas <<a id="m_6718361296659749027OWA556a090f-73aa-ea80-3c17-d4314d8ba058" href="mailto:pdelugas@sissa.it" target="_blank">pdelugas@sissa.it</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex; padding-left:1ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204)">
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
dear Rameswar </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
The bands program is usually called after a pw run with calculation='bands'. This is a non-self-consistent calculation, so it is not necessary to specify the total magnetisation constraint in its input. pw reads the density, initialises the KS Hamiltonian and
computes the eigenvalues. Removing total magnetisation will likely avoid the error. </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
It might be, though, that the two Fermi levels are still reported in the XML file, and this may cause the bands to fail. </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
in that case just send me the XML file, I will try to fix it manually. </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
For the future, we will look into bands to see the reason for this block and remove it. </div>
<div style="direction:ltr; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
pietro </div>
<div id="m_6718361296659749027x_m_9066305274721292231appendonsend"></div>
<hr style="direction:ltr; display:inline-block; width:98%">
<div id="m_6718361296659749027x_m_9066305274721292231divRplyFwdMsg">
<div style="direction:ltr; font-family:Calibri,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<b>From:</b> users <<a id="m_6718361296659749027OWAeb16368a-dd08-6ac6-aa9c-0bbc03a84662" href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> on behalf of Rameswar Bhattacharjee <<a id="m_6718361296659749027OWAe6d68021-954c-dd68-8ba4-3bdc9d153df0" href="mailto:rb1820@georgetown.edu" target="_blank">rb1820@georgetown.edu</a>><br>
<b>Sent:</b> Wednesday, September 3, 2025 16:33<br>
<b>To:</b> Quantum ESPRESSO users Forum <<a id="m_6718361296659749027OWAa32b585f-3d7c-0870-da0d-6f4a85da1132" href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Subject:</b> Re: [QE-users] Question on using bands.x with nspin=2 and total_magnetization=1</div>
<div style="direction:ltr"> </div>
</div>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Dear QE community,</p>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">I would greatly appreciate your advice on this. Basically, I am trying to perform a band structure calculation for a unit cell that contains an unpaired electron and is therefore
paramagnetic. Could you please suggest the proper way to handle this setup?</p>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Thank you for your guidance.</p>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Best regards,</p>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Sun, Aug 31, 2025 at 5:03 PM Rameswar Bhattacharjee <<a id="m_6718361296659749027OWA987dab6c-60e1-82d9-f965-18504cc23792" href="mailto:rb1820@georgetown.edu" target="_blank">rb1820@georgetown.edu</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex; padding-left:1ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204)">
<div style="direction:ltr">Dear Dr Paulatto,</div>
<div style="direction:ltr">Thank you very much for your response. Actually, the error I am getting is as below'</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">---------------------------------------------------------</div>
<div style="direction:ltr">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<br>
Error in routine bands (1):<br>
The bands code with constrained magnetization has not been tested<br>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</div>
<div style="direction:ltr">--------------------------------------------------------</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">And I was wrong earlier, the error also appears even if I do not use spin_component. I think this error shows as I have "<span style="font-family:monospace; color:rgb(0,0,0)">total_magnetization=1</span>" in my scf input. Now, my
system has -2 charge and the spin multiplicity is 2. When I used starting_magnetization instead of total_magnetization, all the calculations were fine but I did not get the right magnetic moment as I expected. </div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">Basically, I did an scf, nscf, bands and then used a post procession calculation using bands.x to generate the ".dat" file for the band structure. The first three job competed successfully and the error appears only in the last post
procession calculation for which the input is below:</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">---------------</div>
<p style="direction:ltr; line-height:normal; background-color:rgba(0,0,0,0.85); margin:0px; font-family:Monaco; font-size:10px; color:rgb(242,242,242)">
&BANDS</p>
<p style="direction:ltr; line-height:normal; background-color:rgba(0,0,0,0.85); margin:0px; font-family:Monaco; font-size:10px; color:rgb(242,242,242)">
prefix = 'crystal_from_cif',</p>
<p style="direction:ltr; line-height:normal; background-color:rgba(0,0,0,0.85); margin:0px; font-family:Monaco; font-size:10px; color:rgb(242,242,242)">
outdir='./scratch'</p>
<p style="direction:ltr; line-height:normal; background-color:rgba(0,0,0,0.85); margin:0px; font-family:Monaco; font-size:10px; color:rgb(242,242,242)">
filband = 'bands.dat'</p>
<p style="direction:ltr; line-height:normal; background-color:rgba(0,0,0,0.85); margin:0px; font-family:Monaco; font-size:10px; color:rgb(242,242,242)">
/</p>
<div style="direction:ltr">---------------</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I am also attaching the other inputs for you to take a quick look. Please note that the coordinates are not complete in the inputs</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">I am also curious to know about your comment above "It depends on what you want to achieve." Could you please elaborate this a bit more?</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">Your advice would be highly appreciated. </div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">Thanks</div>
<div style="direction:ltr">Rameswar</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">On Sun, Aug 31, 2025 at 3:54 PM Lorenzo Paulatto <<a id="m_6718361296659749027OWAc00ea944-e5a2-e128-3f21-4a8aee3e4132" href="mailto:lorenzo.paulatto@cnrs.fr" target="_blank">lorenzo.paulatto@cnrs.fr</a>> wrote:</div>
<blockquote style="margin:0px 0px 0px 0.8ex; padding-left:1ex; border-left-width:1px; border-left-style:solid; border-left-color:rgb(204,204,204)">
<div style="padding-bottom:1px">
<p style="direction:ltr; margin-top:1em; margin-bottom:1em"><br>
</p>
<blockquote>
<ul style="direction:ltr">
<li style="color:rgb(0,0,0)">
<p role="presentation" style="direction:ltr; margin-top:1em; margin-bottom:1em">Should I use the
<code>spin_component</code> keyword to specify up-spin or down-spin bands, or is it recommended to simply run
<code>bands.x</code> without this keyword?</p>
</li></ul>
</blockquote>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em">It depends on what you want to achieve.</p>
<blockquote>
<ul style="direction:ltr">
<li style="color:rgb(0,0,0)">
<p role="presentation" style="direction:ltr; margin-top:1em; margin-bottom:1em">I tried using
<code>spin_component=1</code> and <code>2</code>, but I encountered errors in both cases. On the other hand, when I ran
<code>bands.x</code> without the <code>spin_component</code> keyword, the job completed normally.</p>
</li></ul>
</blockquote>
<div style="direction:ltr">Which error?</div>
<blockquote>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Could you please advise on the correct way to handle this situation? Any guidance or clarification would be greatly appreciated.</p>
</blockquote>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em">The correct way is to provide the full input and output of the calculation that is giving you trouble. And, more in general, if you think that a specific output is wrong, you should explain why you
think so.</p>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em">kind regards</p>
<blockquote>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Thank you in advance for your help.</p>
<p style="direction:ltr; margin-top:1em; margin-bottom:1em; color:rgb(0,0,0)">Best regards,<br>
Rameswar Bhattacharjee</p>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">Rameswar Bhattacharjee</div>
<div style="direction:ltr">Georgetown University</div>
<div style="direction:ltr">Washington, DC 20057</div>
<div style="direction:ltr"><br>
</div>
<fieldset></fieldset>
<pre><div style="direction:ltr">_______________________________________________________________________________
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.
--------------------------------------------------------------------------------
Quantum ESPRESSO is supported by MaX (<a id="m_6718361296659749027OWA8a88f338-3383-d9a7-d82f-f4316822ae34" href="http://www.max-centre.eu" target="_blank">www.max-centre.eu</a>)
users mailing list <a id="m_6718361296659749027OWAc0a369bd-8502-51da-0a92-75d815a64b03" href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>
<a id="m_6718361296659749027OWA09ac89f0-f66c-bc12-6788-14ca4db89bda" href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div></pre>
</blockquote>
<div style="direction:ltr">--<br>
<small>
<div style="direction:ltr">Dr. Lorenzo Paulatto<br>
IR IMPMC - CNRS UMR 7590 / Sorbonne Université / MNHN <br>
phone: +33 (0)1 442 79822 / telegram: lpaulatto<br>
<a id="m_6718361296659749027OWA3eb208f4-2cae-aa59-9d1f-781349ea9bd5" href="http://www.impmc.upmc.fr/~paulatto/" target="_blank">http://www.impmc.upmc.fr/~paulatto/</a> -
<a id="m_6718361296659749027OWA0ae7250e-f621-edea-b8eb-cf8268e10e9e" href="https://anharmonic.github.io/" target="_blank">
https://anharmonic.github.io/</a><br>
23-24/423 B115, 4 place Jussieu 75252 Paris CX 05<small></small></div>
</small></div>
</div>
<div style="direction:ltr">_______________________________________________________________________________<br>
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.<br>
--------------------------------------------------------------------------------<br>
Quantum ESPRESSO is supported by MaX (<a id="m_6718361296659749027OWA3b582b3d-c4a2-7666-195a-f2acd5f7aec8" href="http://www.max-centre.eu" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a id="m_6718361296659749027OWAfc442750-7760-9656-22f3-5e41fcd717ac" href="mailto:users@lists.quantum-espresso.org" target="_blank">
users@lists.quantum-espresso.org</a><br>
<a id="m_6718361296659749027OWAe715861f-c483-397d-3e61-7211e7ed2f19" href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">Rameswar Bhattacharjee</div>
<div style="direction:ltr">Georgetown University</div>
<div style="direction:ltr">Washington, DC 20057</div>
</blockquote>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">Rameswar Bhattacharjee</div>
<div style="direction:ltr">Assistant Research Professor</div>
<div style="direction:ltr">Department of Chemistry</div>
<div style="direction:ltr">Georgetown University</div>
<div style="direction:ltr">Washington, DC 20057</div>
<div>_______________________________________________________________________________<br>
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.<br>
--------------------------------------------------------------------------------<br>
Quantum ESPRESSO is supported by MaX (<a id="m_6718361296659749027OWA5662cfa2-6bc2-6478-9e98-641e0286c941" href="http://www.max-centre.eu" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a id="m_6718361296659749027OWA4bbacaab-5e5b-62ec-8f57-f410bc4e9364" href="mailto:users@lists.quantum-espresso.org" target="_blank">
users@lists.quantum-espresso.org</a><br>
<a id="m_6718361296659749027OWAf2a7d632-0ec7-e840-579e-261ac18aeccb" href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>--</div>
<div style="direction:ltr">Rameswar Bhattacharjee</div>
<div style="direction:ltr">Assistant Research Professor</div>
<div style="direction:ltr">Department of Chemistry</div>
<div style="direction:ltr">Georgetown University</div>
<div style="direction:ltr">Washington, DC 20057</div>
</div>
_______________________________________________________________________________<br>
The Quantum ESPRESSO Foundation stands in solidarity with all civilians worldwide who are victims of terrorism, military aggression, and indiscriminate warfare.<br>
--------------------------------------------------------------------------------<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu" rel="noreferrer" target="_blank">www.max-centre.eu</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">
users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/users</a></div>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Rameswar Bhattacharjee</div>
Assistant Research Professor
<div>
<div>Department of Chemistry</div>
<div>Georgetown University</div>
<div>Washington, DC 20057</div>
</div>
</div>
</div>
</div>
</body>
</html>