Author Topic: CrystalPropertyValidation  (Read 3085 times)

0 Members and 1 Guest are viewing this topic.

Offline fangbiaolee

  • New QuantumATK user
  • *
  • Posts: 4
  • Country: cn
  • Reputation: 0
    • View Profile
CrystalPropertyValidation
« on: January 12, 2023, 04:05 »
Dear QuantumATK Staff:
         I run the example in the ATK manual to learn the CrystalPropertyValidation module.

         The example:
        
setVerbosity(MinimalLog)

# Set up lattice
lattice = FaceCenteredCubic(5.4306*Angstrom)

# Define elements
elements = [Silicon, Silicon]

# Define coordinates
fractional_coordinates = [[ 0.  ,  0.  ,  0.  ],
                          [ 0.25,  0.25,  0.25]]

# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=lattice,
    elements=elements,
    fractional_coordinates=fractional_coordinates
    )

# Setting up the reference calculator
# -------------------------------------------------------------
# MTP Calculator
# -------------------------------------------------------------

potentialSet = Tersoff_Si_1988()
calculator = TremoloXCalculator(parameters=potentialSet)
bulk_configuration.setCalculator(calculator)


# Setting up the test calculator
# -------------------------------------------------------------
# MTP Calculator
# -------------------------------------------------------------

potentialSet = MTP_Si_2019b()
relative_calculator = TremoloXCalculator(parameters=potentialSet)


crystal_property_validation = CrystalPropertyValidation(
        bulk_configuration,
        relative_calculator,
        relative_calculator,
        calculate_reference_data=True,
        calculate_volume_energy_plot=True,
        calculate_elastic_constants=True,
        calculate_phonon_bandstructure=True,
        calculate_delta_test=True,
        optimize_geometry_parameters=None,
        log_filename_prefix=None,
        dynamical_matrix_filename='dynamical_matrix.hdf5',
        dynamical_matrix_repetitions=(5, 5, 5),
    )
nlsave(f'crystal_property_validation.hdf5', crystal_property_validation)
nlprint(crystal_property_validation)
crystal_property_validation.plotEnergyvsVolume()

I encountered the following problems:

Traceback (most recent call last):
  File "/home/ATK/QuantumATK/QuantumATK-U-2022.12/bin/../atkpython/bin/atkpython", line 8, in <module>
    sys.exit(__run_atkpython())
  File "zipdir/ATKExecutables/atkwrappers/__init__.py", line 879, in __run_atkpython
  File "si_crystal_property_validation.py", line 40, in <module>
    crystal_property_validation = CrystalPropertyValidation(
TypeError: __init__() got multiple values for argument 'calculate_reference_data'
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 42


I have tried many ways but can't solve it, so I hope I can get your help.




Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: CrystalPropertyValidation
« Reply #1 on: January 18, 2023, 01:02 »
Remove one of the "relative_calculator" arguments, it has been doubled by mistake. Thanks for letting us know!