Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fix NH during NVT melting #134

Closed
wants to merge 1 commit into from
Closed

Do not fix NH during NVT melting #134

wants to merge 1 commit into from

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Jun 24, 2024

I get this error when I try to run a liquid TS calculation in NVT, i.e. pressure=None. I think this PR should fix it, but I haven't tested it.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/u/zora/software/pyiron_base/pyiron_base/cli/__main__.py", line 3, in <module>
    main()
  File "/u/zora/software/pyiron_base/pyiron_base/cli/control.py", line 61, in main
    args.cli(args)
  File "/u/zora/software/pyiron_base/pyiron_base/cli/wrapper.py", line 37, in main
    job_wrapper_function(
  File "/u/zora/software/pyiron_base/pyiron_base/jobs/job/wrapper.py", line 186, in job_wrapper_function
    job.run()
  File "/u/zora/software/pyiron_base/pyiron_base/jobs/job/wrapper.py", line 131, in run
    self.job.run_static()
  File "/u/zora/software/pyiron_atomistics/pyiron_atomistics/calphy/job.py", line 712, in run_static
    routine_ts(job)
  File "/cmmc/ptmp/zora/software/calphy/calphy/routines.py", line 347, in routine_ts
    routine_fe(job)
  File "/cmmc/ptmp/zora/software/calphy/calphy/routines.py", line 328, in routine_fe
    job.run_averaging()
  File "/cmmc/ptmp/zora/software/calphy/calphy/liquid.py", line 137, in run_averaging
    self.melt_structure(lmp)
  File "/cmmc/ptmp/zora/software/calphy/calphy/liquid.py", line 72, in melt_structure
    self.fix_nose_hoover(lmp, temp_start_factor=factor, temp_end_factor=factor)
  File "/cmmc/ptmp/zora/software/calphy/calphy/phase.py", line 267, in fix_nose_hoover
    self.iso, press_start_factor*self.calc._pressure, press_end_factor*self.calc._pressure, self.calc.md.barostat_damping[stage]))
              ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'

This was my input.yml

calculations:
- berendsen:
    barostat_damping: 100.0
    thermostat_damping: 100.0
  element:
  - Mg
  equilibration_control: nose-hoover
  fix_potential_path: false
  lattice: /cmmc/u/zora/pyiron/projects/2024/06_MTP_Mg_pT_Phasediagram/Mg/CALPHY/liquid_15d0_hdf5/liquid_15d0/conf.data
  mass:
  - 24.305
  md:
    barostat_damping: 0.1
    n_cycles: 100
    n_every_steps: 10
    n_repeat_steps: 10
    n_small_steps: 10000
    thermostat_damping: 0.5
    timestep: 0.001
  melting_cycle: true
  mode: ts
  n_equilibration_steps: 25000
  n_iterations: 1
  n_print_steps: 0
  n_switching_steps: 50000
  nose_hoover:
    barostat_damping: 0.1
    thermostat_damping: 0.1
  npt: false
  pair_coeff:
  - '* *'
  pair_style:
  - mlip mlip.ini
  pressure: null
  queue:
    cores: 80
  reference_phase: liquid
  spring_constants: null
  temperature:
  - 2749.999999999982
  - 3499.999999999982
  tolerance:
    lattice_constant: 0.0002
    liquid_fraction: 0.05
    pressure: 0.5
    solid_fraction: 0
    spring_constant: 0.01

@pmrv
Copy link
Contributor Author

pmrv commented Jun 24, 2024

@srmnitc Turns out melting_cycle=True is not sufficient, because of this line, that always tries to a p=0 equilibration but then fails when no pressure is specified. In solids there is instead a check that seems to work around this. You think it would be enough to just copy this to liquids?

@srmnitc
Copy link
Member

srmnitc commented Jun 24, 2024

work in progress over at #135

@srmnitc
Copy link
Member

srmnitc commented Jun 24, 2024

should be fixed now in #135 , im gonna go ahead and close this

@srmnitc srmnitc closed this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants