ICAMS / calphy

A Python library and command line interface for automated free energy calculations
Other
71 stars 21 forks source link

melting temperature incomprehensible error #147

Closed stefanhiemer closed 2 months ago

stefanhiemer commented 2 months ago

Hi there,

I try to melt a binary alloy, but get an error "/home/shiemer/projects/hea-utilities/CoNiCrFeMn.meam". I actually provide tguess. So I do not understand why I get an error. I attach the error message and all files to run my case with just 1000 steps. To run the testcase you have to insert the run directory in which you run the entire thing. The rest should fail as it did in my case.

Regards Stefan

error message:

Traceback (most recent call last): File "/home/shiemer/anaconda3/envs/calphy/bin/calphy", line 33, in sys.exit(load_entry_point('calphy==1.3.9', 'console_scripts', 'calphy')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shiemer/anaconda3/envs/calphy/lib/python3.12/site-packages/calphy-1.3.9-py3.12.egg/calphy/kernel.py", line 165, in main run_jobs(args["input"]) File "/home/shiemer/anaconda3/envs/calphy/lib/python3.12/site-packages/calphy-1.3.9-py3.12.egg/calphy/kernel.py", line 55, in run_jobs calculations = read_inputfile(inputfile) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shiemer/anaconda3/envs/calphy/lib/python3.12/site-packages/calphy-1.3.9-py3.12.egg/calphy/input.py", line 556, in read_inputfile calculations = _read_inputfile(outfile) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shiemer/anaconda3/envs/calphy/lib/python3.12/site-packages/calphy-1.3.9-py3.12.egg/calphy/input.py", line 568, in _read_inputfile calculations.append(Calculation(**calc)) ^^^^^^^^^^^^^^^^^^^ File "/home/shiemer/anaconda3/envs/calphy/lib/python3.12/site-packages/pydantic/main.py", line 192, in init self.__pydantic_validator__.validate_python(data, self_instance=self) pydantic_core._pydantic_core.ValidationError: 1 validation error for Main input class Value error, Cannot guess start temperature for more than one species, please specify [type=value_error, input_value={'element': ['Co', 'Ni'],...inputfile': 'test.yaml'}, input_type=dict] For further information visit https://errors.pydantic.dev/2.8/v/value_error

calphy input input_yaml.txt lammps datafile datafile.txt potentials libCoNiCrFeMn.meam.txt

srmnitc commented 2 months ago

@stefanhiemer thanks for reporting, ill take a look

srmnitc commented 2 months ago

@stefanhiemer There were some wrong keys in the input file which was the main issue. I updated the input file like this:

calculations:
- element: 
  - Co
  - Ni
  lattice: datafile.txt
  mass: 
  - 58.933194
  - 58.6934
  equilibration_control: nose_hoover
  md:
    barostat_damping: 0.1
    thermostat_damping: 0.1
    timestep: 0.001
  temperature: 1814.4488888888886
  melting_temperature:
    step: 200
  mode: melting_temperature
  n_equilibration_steps: 10000
  n_iterations: 1
  n_switching_steps: 10000
  pair_coeff: '* *  nico.eam.alloy Co Ni'
  pair_style: eam/alloy
  pressure: 1.0
  queue:
    commands:
    - conda activate calphy
    cores: 4
    scheduler: local

I replaced the potential since I could not download the MEAM files. But the main changes are as follows:

With that changes, the calculation starts. I did not finish the run since I was testing on my local machine. If something else goes wrong, please feel free to report. Thanks again for reporting!

stefanhiemer commented 2 months ago

Hi Sarath,

thanks for the quick help. Based on your answer I would suggest to edit the automatic melting example

https://calphy.org/en/latest/examples/example_04/analysis.html

because e. g. tguess is still suggested as option there.

Thanks and regards Stefan

srmnitc commented 2 months ago

Hi Sarath,

thanks for the quick help. Based on your answer I would suggest to edit the automatic melting example

https://calphy.org/en/latest/examples/example_04/analysis.html

because e. g. tguess is still suggested as option there.

Thanks and regards Stefan

I will go through the examples and update them as needed, thanks!