" ValueError: operands could not be broadcast together with shapes (0,0) (3,3) (0,0)" when using siesta2J.py

147 views
Skip to first unread message

Sucitto Teh

unread,
Nov 2, 2020, 9:11:28 AM11/2/20
to TB2J
Good day. I am trying to use siesta2J to calculate exchange constant of Fe but the error messages appear:
"
Starting to calculate exchange.
Green's function Calculation started.
/cluster/tb2j/lib/python3.6/site-packages/TB2J/exchangeCL2.py:134: RuntimeWarning: invalid value encountered in double_scalars
  np.dot(self.spinat[iatom], self.spinat[jatom]))
/cluster/tb2j/lib/python3.6/site-packages/TB2J/exchangeCL2.py:136: RuntimeWarning: invalid value encountered in true_divide
  np.dot(self.spinat[iatom], self.spinat[jatom]))
 [Elapsed Time: 0:00:29] |##################################################################################| (Time: 0:00:29)
/cluster/tb2j/lib/python3.6/site-packages/TB2J/io_exchange/io_tomsasd.py:30: RuntimeWarning: invalid value encountered in true_divide
  spin = np.array(cls.spinat[i]) / ms
/cluster/tb2j/lib/python3.6/site-packages/TB2J/io_exchange/io_vampire.py:91: RuntimeWarning: invalid value encountered in true_divide
  spin = np.array(cls.spinat[i]) / ms
Traceback (most recent call last):
  File "/cluster/tb2j/bin/siesta2J.py", line 107, in <module>
    run_siesta2J()
  File "/cluster/tb2j/bin/siesta2J.py", line 103, in run_siesta2J
    exclude_orbs=args.exclude_orbs)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/manager.py", line 229, in gen_exchange_siesta
    exchange.run()
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/exchange.py", line 568, in run
    self.write_output(path=path)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/exchangeCL2.py", line 222, in write_output
    output.write_all()
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/io_exchange/io_exchange.py", line 181, in write_all
    self.write_Jq(kmesh=[9, 9, 9], path=path)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/io_exchange/io_exchange.py", line 201, in write_Jq
    evals, evecs = m.ham.solve_k(kpts, Jq=True)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/spinham/hamiltonian.py", line 297, in solve_k
    evals, evecs = qsolver.solve_all(kpts, eigen_vectors=True, Jq=Jq)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/spinham/qsolver.py", line 53, in solve_all
    evals, evecs = self.solve_k(kpt, eigen_vectors=True, Jq=Jq)
  File "/cluster/tb2j/lib/python3.6/site-packages/TB2J/spinham/qsolver.py", line 33, in solve_k
    2.0j * math.pi * np.dot(kpt, R))
ValueError: operands could not be broadcast together with shapes (0,0) (3,3) (0,0)
"
I had also attached the input of siesta. Thank you.

siesta.fdf

Xu He

unread,
Nov 2, 2020, 9:14:29 AM11/2/20
to Sucitto Teh, TB2J

Could you send the command to run siesta2J.py as well?

HeXu

--
You received this message because you are subscribed to the Google Groups "TB2J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tb2j+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tb2j/ab77886a-bfea-4863-bfa6-f6957d26488cn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sucitto Teh

unread,
Nov 2, 2020, 9:23:04 AM11/2/20
to TB2J
sure.
siesta2J.py --fdf_fname siesta.fdf --elements Fe --kmesh 5 5 5 --rcut 7 --emin -10 --nz=50

Xu He

unread,
Nov 2, 2020, 9:42:09 AM11/2/20
to tb...@googlegroups.com

Hi,

The SCF.Spin.Fix option is siesta input is to True.  Can you check if the total magnetizatoin is 0, and try to set that option to False?

Best wishes,

HeXu

On 2/11/20 15:11, Sucitto Teh wrote:

Sucitto Teh

unread,
Nov 2, 2020, 10:08:45 AM11/2/20
to TB2J
Thanks for the suggestion. 
I just tried to change it to "False" but the the problem persists (the initial result has non zero spin anyway). I'm using the same input as provided in the github examples folder, what could possible go wrong here?

best regards,
sukhito teh

Xu He

unread,
Nov 2, 2020, 11:49:49 AM11/2/20
to tb...@googlegroups.com

Hi,

That is probably because it reuse the density matrix of the previous run. Try to run in an empty directory with no previous result so things don't get mixed. 

Also please try with the updated examples on github.

Best wishes,

HeXu

Sucitto Teh

unread,
Nov 2, 2020, 1:14:10 PM11/2/20
to TB2J
Hi, thanks for the reply. I just checked and realized the problem is I didn't compile the siesta with NETCDF support, so I'm not even providing the required input files to tb2j.

best regards,
sukhito teh

Reply all
Reply to author
Forward
0 new messages