Author Topic: ComplexMatrix error in fatbandstructure calculation  (Read 4294 times)

0 Members and 1 Guest are viewing this topic.

Offline juwon

  • Regular QuantumATK user
  • **
  • Posts: 5
  • Country: kr
  • Reputation: 0
    • View Profile
ComplexMatrix error in fatbandstructure calculation
« on: November 22, 2023, 07:15 »
Hi, I am trying to calculate the fatbandstructure of a heterostructure which includes two different 2D layers.

The system has about 700 atoms including the ghost atoms, since we are trying to estimate the workfunction (or Fermi level) more accurately.

Anyway, the calculator I have set was chemical potential, projected density of states, and fatbandstructure.
The rest of the calculations are completed, but I got the following error sign...

   File "/home/JW/quantumatk/MoS2-WTe2/vdW_study_without_zdirection_constant/Output/MoS2_WTe2_60degree_ortho_pointcheck_results_231121_h51vapb4/MoS2_WTe2_60degree_ortho_pointcheck_results.py", line 1041, in <module>
    fat_bandstructure = FatBandstructure(
  File "zipdir/NL/Analysis/FatBandstructure.py", line 207, in __init__
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/Projections.py", line 170, in calculateEigenvaluesAndProjectionWeights
  File "zipdir/NL/ComputerScienceUtilities/ParallelTools/StaticTaskScheduler.py", line 229, in run
  File "zipdir/NL/ComputerScienceUtilities/ParallelTools/StaticTaskScheduler.py", line 282, in __runInParallelMode
  File "zipdir/NL/ComputerScienceUtilities/ParallelTools/StaticTaskScheduler.py", line 304, in __performTask
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/Projections.py", line 155, in kPointTask
  File "zipdir/NL/Calculators/DensityFunctionalTheory/LCAOCalculator/Analysis/Projections.py", line 449, in calculateProjectionWeightsAndEigenvalues
TypeError: unsupported operand type(s) for *: 'ComplexMatrix' and 'ComplexMatrix'
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 35



Has anyone seen this kind of error? Help me, please :-[

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ComplexMatrix error in fatbandstructure calculation
« Reply #1 on: December 1, 2023, 20:58 »
Which version of the code are you using? Ideally, if you can share the Python input file, we can look at this, as it seems like a bug, but it could already have been fixed in newer versions. If you don't want to share the script publicly, you can email it.

Offline juwon

  • Regular QuantumATK user
  • **
  • Posts: 5
  • Country: kr
  • Reputation: 0
    • View Profile
Re: ComplexMatrix error in fatbandstructure calculation
« Reply #2 on: December 4, 2023, 05:45 »
Thank you for your reply.

I am using the 2022-12 version of quantumATK, and below is my input python file.

# %% MoS2_WTe2_60degree_ortho_pointcheck

[atomic configuration ... info is deleted because of the character limitation]

# %% Set LCAOCalculator_DFT_D3_Neu_Dir_higher_cutoff_density_new

# %% LCAOCalculator

#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = GGA.PBE

correction_extension = GrimmeDFTD3(
    maximum_neighbour_distance=60.0*Angstrom,
    exchange_correlation=exchange_correlation
)

k_point_sampling = MonkhorstPackGrid(
    na=2,
    nb=1,
    nc=1
)

numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=k_point_sampling
)

poisson_solver = FastFourier2DSolver(
    boundary_conditions=[
        [PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
        [PeriodicBoundaryCondition(), PeriodicBoundaryCondition()],
        [NeumannBoundaryCondition(), DirichletBoundaryCondition()]
    ]
)

checkpoint_handler = NoCheckpointHandler

calculator = LCAOCalculator(
    exchange_correlation=exchange_correlation,
    numerical_accuracy_parameters=numerical_accuracy_parameters,
    poisson_solver=poisson_solver,
    checkpoint_handler=checkpoint_handler,
    correction_extension=correction_extension
)


# %% Set Calculator

mos2_wte2_60degree_ortho_pointcheck.setCalculator(calculator)

mos2_wte2_60degree_ortho_pointcheck.update()

nlsave('MoS2_WTe2_60degree_ortho_pointcheck_results.hdf5', mos2_wte2_60degree_ortho_pointcheck)


# %% ChemicalPotential

chemical_potential = ChemicalPotential(
    configuration=mos2_wte2_60degree_ortho_pointcheck
)
nlsave('MoS2_WTe2_60degree_ortho_pointcheck_results.hdf5', chemical_potential)


# %% ProjectedDensityOfStates_elements

kpoints = MonkhorstPackGrid(
    na=3,
    nb=2,
    nc=1
)

projected_density_of_states = ProjectedDensityOfStates(
    configuration=mos2_wte2_60degree_ortho_pointcheck,
    kpoints=kpoints,
    projections=ProjectOnElements,
    energies=numpy.linspace(-4.0, 4.0, 801)*eV,
    spectrum_method=GaussianBroadening(
        broadening=0.01*eV
    )
)
nlsave('MoS2_WTe2_60degree_ortho_pointcheck_results.hdf5', projected_density_of_states)


# %% FatBandstructure_elements

fat_bandstructure = FatBandstructure(
    configuration=mos2_wte2_60degree_ortho_pointcheck,
    route=('G', 'Y', 'C', 'X', 'G', 'C'),
    points_per_segment=100,
    projections=ProjectOnElements
)
nlsave('MoS2_WTe2_60degree_ortho_pointcheck_results.hdf5', fat_bandstructure)




Thank you in advance.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ComplexMatrix error in fatbandstructure calculation
« Reply #3 on: December 4, 2023, 20:31 »
We are looking into this, but it doesn't seem to be a general issue, so it could be related to the specific structure you used. Therefore, we need the full script, you can attach it to the post, rather than paste it in the message, then there is no problem with character limit.

Offline juwon

  • Regular QuantumATK user
  • **
  • Posts: 5
  • Country: kr
  • Reputation: 0
    • View Profile
Re: ComplexMatrix error in fatbandstructure calculation
« Reply #4 on: December 5, 2023, 04:51 »
Thank you , and I attached the python file of my code.

Thank you again in advance for checking out.


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ComplexMatrix error in fatbandstructure calculation
« Reply #5 on: January 31, 2024, 23:08 »
We have tried to run the system and didn't have any problem. It does use a lot of memory, so a suggestion is to reduce the number of bands above the Fermi level (50 should be enough), and maybe also the number of points on the segments. It's also possible the DOS takes up a lot of memory, so you can rerun without including that. Note that you don't need to rerun the whole calculation, just the FatBS part, replacing the "update" and "nlsave" lines with a corresponding

mos2_wte2_60degree_ortho_pointcheck = nlread("MoS2_WTe2_60degree_ortho_pointcheck_results.hdf5", BulkConfiguration)[-1]