Coder Social home page Coder Social logo

icams / calphy Goto Github PK

View Code? Open in Web Editor NEW
57.0 57.0 19.0 4.3 MB

A Python library and command line interface for automated free energy calculations

License: Other

Python 96.74% Jupyter Notebook 3.26%
free-energy free-energy-calculations interatomic-potentials lammps molecular-dynamics thermodynamic-calculations

calphy's People

Contributors

jan-janssen avatar leimeroth avatar niklassiemer avatar pmrv avatar sebastianhavens avatar srmnitc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

calphy's Issues

Solid detection algorithm for special structure

Hello every,

I have successfully installed calphy-1.3.1, The test of examples are good. When I use the deepmd potential to calculated the free energy of special structure with Ca O S atoms, an error occurs (Solid detection algorithm only works with BCC/FCC/HCP/SC/DIA. Detection algorithm can be turned off by setting conv: solid_frac: 0).

I add "solid_frac: 0" to input file, but still getting the error.

The input is added to attachment.

I hope you can give me some advice. Thank you.

Q. Li

err.txt

input.txt

Single element calculations when 2 are given give wrong results

I calculated free energies for 2 element melts with different concentrations, including the end points, i.e. 0 and 100% of element A.
For convenience I thought I could simply use the same input file, but I noticed that at 100% of the second Element the result is wrong.
My guess is that this is related to the calculated concentration which does not state [0, 1] but just [1].
I assume this leads to the wrong mass being used for the reference phase and therefore wrong initial values, or something similar, since f over T plots look close to parallel, but start from completely different values.

TLDR: Using input files for 2 elements with structures of concentration [0,1] leads to wrong results.

pressure=None fails

Pressure logging fails

File /srv/conda/envs/notebook/lib/python3.8/site-packages/calphy/phase.py:59, in Phase.__init__(self, calculation, simfolder)
     56 logfile = os.path.join(self.simfolder, "calphy.log")
     57 self.logger = ph.prepare_log(logfile)
---> 59 self.logger.info("Temperature start: %f K, temperature stop: %f K, pressure: %f bar"%(self.calc._temperature, self.calc._temperature_stop, self.calc._pressure))
     61 if self.calc._iso:
     62     self.iso = "iso"

TypeError: must be real number, not NoneType

conda-forge recipe

@jan-janssen I am opening the issue here since I might need more modifications to calphy to support the conda-forge recipe. I realised that I proper release had not been made so far. I made one now, and the recipe would need some changes.

The entry points are now calphy and calphy_kernel and the dependencies have been updated now.

Calphy example_01 errors

Hi - before testing some calphy calculations using ACE potentials, I attempted to run the examples using the simpler/faster EAM for Fe and Cu. The calphy tests all run without errors.

For example_01, with calphy release 1.2.10, I run

~/calphy/examples/example_01$ calphy -i input.yaml

which proceeds to find the single calculation, but returns no report.yaml file since it errors. Within the fe-BCC-100-0.sub.err file we have:

Traceback (most recent call last): File "/home/u2082383/.local/bin/calphy_kernel", line 33, in <module> sys.exit(load_entry_point('calphy==1.2.10', 'console_scripts', 'calphy_kernel')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/u2082383/.local/lib/python3.11/site-packages/calphy-1.2.10-py3.11.egg/calphy/queuekernel.py", line 148, in main _ = routine_fe(job) ^^^^^^^^^^^^^^^ File "/home/u2082383/.local/lib/python3.11/site-packages/calphy-1.2.10-py3.11.egg/calphy/routines.py", line 341, in routine_fe job.run_averaging() File "/home/u2082383/.local/lib/python3.11/site-packages/calphy-1.2.10-py3.11.egg/calphy/solid.py", line 167, in run_averaging self.run_pressure_convergence(lmp) File "/home/u2082383/.local/lib/python3.11/site-packages/calphy-1.2.10-py3.11.egg/calphy/phase.py", line 500, in run_pressure_convergence raise ValueError("Pressure did not converge after MD runs, maybe change lattice_constant and try?") ValueError: Pressure did not converge after MD runs, maybe change lattice_constant and try?

Similar errors occur for other example_0x, although some calculations within other examples proceed as expected.

Any advice would be appreciated. Thanks in advance,
Iain

ERROR: Illegal velocity create command

Hi,
Sometimes when a melting temperature calculation is being performed, an illegal velocity command is being used with the langevin fix.
I've attached all of the files associated with the run. You may notice that it is not printing a copy of the input files into the main calphy.log file, this is because it can cause calphy to crash, this is the only modification which has been made to calphy.

You can find the log.lammps file of interest in ts-FCC-1528-1000
crash.tar.gz

kk suffix not used by hybrid/scaled

Using command line args it should be possible to pass accelerator suffixes to all pair styles without having to modify the input scripts themselves. This seems to work corretly for the pace pair style, which uses my GPU as it is supposed to.
The hybrid/scaled style however throws an error at me at some point of free energy calculations:

Exception: ERROR: Must use pair_style hybrid/scaled/kk with Kokkos (src/src/pair_hybrid_scaled.cpp:242)
Kokkos::Cuda ERROR: Failed to call Kokkos::Cuda::finalize()

I am not sure whether this is somehow related to the inputs to lammps that are used by calphy or a lammps bug since I don't see why -sf kk should not apply to hybrid_scaled automatically

nan spring constant

I've just run into an issue where the this line creates a nan, which then borks the whole calculation.

https://github.com/ICAMS/calphy/blob/6a85e668a728d8dd9840a7dd0863713b73b60f42/calphy/solid.py#L114C54-L114C54

I've attached the tarball of the pyiron job that ran into this, but I don't have much time right now to go in depth (I imagine you as well), so I just want to have brought up the issue.

Calphy version was 1.2.12.

test0.tar.gz

(This is actually a tar.bz2 file, but github sucks.)

About helpers.set_potential()

Hello
Can I use 'fix client/md' to get the potentials from other potential calculation software? And go further, if I use any fix command, could calphy run correctly?

Thanks for your attention.

Implementations to update

The following methods should be used for better integration with pyiron/other features:

  • get_structures in phase.py

Need to "install" calphy

Since calphy is a pure python library it would be great to be able to run it without having to "install" it, since no compilation is required.
This could cause trouble with dependencies, but it would make fast tests and debugging easier.
As far as I can tell this would only require to have the calphy and calphy_kernel scripts directly available or am I missing something?

Cannot launch lammps in calphy calculation

Dear developers and users,

I'm trying to run a ts calculation in which I expect MD will be run after the initialization. However, the job seemed to get stuck when it was trying to wake the lammps driver. The job didn't die but no output was generated.

This is the calphy.log file:

2024-02-16 22:51:49,035 calphy.helpers INFO     ---------------input file----------------
2024-02-16 22:51:49,035 calphy.helpers INFO     commented out as causes crash when we're expanding the T range after a fail run
2024-02-16 22:51:49,035 calphy.helpers INFO     ------------end of input file------------
2024-02-16 22:51:49,035 calphy.helpers INFO     Temperature start: 4050.000000 K, temperature stop: 1550.000000 K, pressure: 5000.000000 bar
2024-02-16 22:51:49,035 calphy.helpers INFO     Pressure adjusted in aniso
2024-02-16 22:51:49,035 calphy.helpers INFO     Reference phase is liquid
2024-02-16 22:51:49,035 calphy.helpers INFO     Melting cycle is turned off
2024-02-16 22:51:49,035 calphy.helpers INFO     Equilibration stage is done using nose-hoover barostat/thermostat
2024-02-16 22:51:49,035 calphy.helpers INFO     Nose-Hoover thermostat damping is 0.100000
2024-02-16 22:51:49,035 calphy.helpers INFO     Nose-Hoover barostat damping is 0.100000
2024-02-16 22:51:49,035 calphy.helpers INFO     These values can be tuned by adding in the input file:
2024-02-16 22:51:49,035 calphy.helpers INFO     nose_hoover:
2024-02-16 22:51:49,036 calphy.helpers INFO        thermostat_damping: <float>
2024-02-16 22:51:49,036 calphy.helpers INFO        barostat_damping: <float>
2024-02-16 22:51:49,036 calphy.helpers INFO     Integration stage is done using Nose-Hoover thermostat and barostat when needed
2024-02-16 22:51:49,036 calphy.helpers INFO     Thermostat damping is 0.100000
2024-02-16 22:51:49,036 calphy.helpers INFO     Barostat damping is 0.100000
2024-02-16 22:51:49,036 calphy.helpers INFO     4536 atoms in 1 cells on 64 cores
2024-02-16 22:51:49,036 calphy.helpers INFO     pair_style: pace
2024-02-16 22:51:49,036 calphy.helpers INFO     pair_coeff: * * /work/home/zhanggweitest/yxzhou/ML_potentials/te-upfit-iter0.yace Te

and this is my input:

- element: 'Te'
  mass: 127.603
  mode: ts
  temperature: [1050.0,550.0]
  pressure: [[5000,5000,5000]]
  lattice: Te.data
  npt: False
  reference_phase: liquid
  pair_style: pace
  pair_coeff: '* * /work/home/zhanggweitest/yxzhou/ML_potentials/te-upfit-iter0.yace  Te'
  timestep: 0.001
  melting_cycle: False
  n_equilibration_steps: 50000
  n_switching_steps: 50000
  n_iterations: 1
  equilibration_control: nose-hoover


  nose_hoover:
    thermostat_damping: 0.1

  tolerance:
    solid_fraction: 0

  queue:
    scheduler: slurm
    jobname: calphy-test
    nodes: 1
    cores: 64
    queuename: xahcnormal

    commands:
      - source ~/.bashrc
      - conda activate calphy

Any idea of what is going wrong?

no module name mpi4py input file error

Hi

I installed calphy through conda-forge

calphy version=1.2.4
I followed the potential workshop 2022 to calculate phase diagram, but I got those erreos
Screenshot from 2023-06-01 15-18-35

Screenshot from 2023-06-02 10-16-00
Screenshot from 2023-06-02 10-19-33

_pickle.UnpicklingError: invalid load key, ' '.

Moi,
I am trying to run a QUIP potential with lammps but it does not work. QUIP is fully supported. The persistent error is:

File "/usr/local/Miniconda/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 90, in _receive output = pickle.load(self._process.stdout) _pickle.UnpicklingError: invalid load key, ' '.

I can provide the complete output if needed, it's long and stems from

File "/usr/local/Miniconda/lib/python3.9/site-packages/calphy/solid.py", line 147, in run_averaging lmp.command('include {}'.format(self.calc.potential_file))

originally. I have looked through the examples but there is nothing that provides help for a potential like that. basically I need to include two lines (I wanted to try in two ways):

pair_style quip
pair_coeff * * name.xml "Potential label=GAP_blala" 15 28

while this line needs the quotes, which I suspect are part of the problem of internal stdin._send and ._receive procedures.
I have also tried added on option with pair_style quip and pair_coeff to the calphy input file but that produces the exact same error. I am running lammps on a regular basis with quip potentials so the error does not come from there. The potential itself is also tested and reliable.

At this point, the computations don't even start.

Any help would be appreciated, Jan

UnpicklingError when using MTP

Using my pr #46 it is possible to use MTPs with calphy without errors obviously related to the parsing of user specified input. However, there still seems to be a problem with the sub process output that is rather mysterious to me.
All calphy calculations I tried now produce a complete log.lammps without any errors and a calphy.log without errors, but ending with the line:
2022-10-13 12:42:16,565 calphy.helpers INFO pair_coeff: * *

The error traceback:

Traceback (most recent call last):
  File "/nfshome/leimeroth/.local/bin/calphy_kernel", line 33, in <module>
    sys.exit(load_entry_point('calphy==1.2.2', 'console_scripts', 'calphy_kernel')())
  File "/nfshome/leimeroth/git_projects/calphy_gpu/calphy/queuekernel.py", line 148, in main
    _ = routine_fe(job)
  File "/nfshome/leimeroth/git_projects/calphy_gpu/calphy/routines.py", line 341, in routine_fe
    job.run_averaging()
  File "/nfshome/leimeroth/git_projects/calphy_gpu/calphy/solid.py", line 160, in run_averaging
    self.run_zero_pressure_equilibration(lmp)
  File "/nfshome/leimeroth/git_projects/calphy_gpu/calphy/phase.py", line 362, in run_zero_pressure_equilibration
    lmp.command("run              %d"%int(self.calc.md.n_small_steps))
  File "/nfshome/leimeroth/git_projects/pylammpsmpi/pylammpsmpi/lammps_wrapper.py", line 72, in func_wrapper
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
    fut = func(*args, **kwargs)
  File "/nfshome/leimeroth/git_projects/pylammpsmpi/pylammpsmpi/utils/lammps.py", line 536, in command
    _ = self._receive()
  File "/nfshome/leimeroth/git_projects/pylammpsmpi/pylammpsmpi/utils/lammps.py", line 83, in _receive
    output = pickle.load(self._process.stdout)
_pickle.UnpicklingError: A load persistent id instruction was encountered,
but no persistent_load function was specified.

I am not sure whether this is a calphy bug, a pylammpsmpi bug or some problem with the lammps/mtp interface, since it is not an officially supported package of lammps.

pressure doesn't converge

Hi there, now Calphy runs with the correct version of LAMMPS installed. However, as I was trying to run example01, with the given input.yaml file, the pressure doesn't converge. Have you encountered this problem before, and any idea on what might go wrong?

Part of the calphy.log is appended here (asked the logger to also log the std value):

2022-04-24 23:13:43,319 calphy.helpers INFO     Temperature start: 100.000000 K, temperature stop: 100.000000 K, pressure: 0.000000 bar
2022-04-24 23:13:43,319 calphy.helpers INFO     Pressure adjusted in aniso
2022-04-24 23:13:43,346 calphy.helpers INFO     Lattice: bcc with a=2.884000
2022-04-24 23:13:43,346 calphy.helpers INFO     2 atoms in the unit cell
2022-04-24 23:13:43,346 calphy.helpers INFO     concentration:
2022-04-24 23:13:43,347 calphy.helpers INFO     [1]
2022-04-24 23:13:43,347 calphy.helpers INFO     250 atoms in 125 cells on 1 cores
2022-04-24 23:13:43,347 calphy.helpers INFO     pair_style: eam
2022-04-24 23:13:43,347 calphy.helpers INFO     pair_coeff: * * /Users/Michael_wang/Documents/venkat/calphy_prebuilt_lammps/examples/potentials/Fe.eam
2022-04-24 23:13:48,794 calphy.helpers INFO     At count 1 mean pressure is 16.932624 with 11.995132 vol/atom, std= 299.626010
2022-04-24 23:13:51,348 calphy.helpers INFO     At count 2 mean pressure is 9.912314 with 11.994195 vol/atom, std= 290.920191
2022-04-24 23:13:53,941 calphy.helpers INFO     At count 3 mean pressure is 9.774120 with 11.994355 vol/atom, std= 277.209145
2022-04-24 23:13:56,428 calphy.helpers INFO     At count 4 mean pressure is 10.967096 with 11.994192 vol/atom, std= 261.994094
...
2022-04-24 23:18:04,553 calphy.helpers INFO     At count 100 mean pressure is 3.642714 with 11.994638 vol/atom, std= 206.803695

Update docs

Update documentation to specify use of openmpi version of LAMMPS (#30 ) and add notes about pressure convergence (#31 ).

error cannot solved

Hi

I am running example-01 on a slurm cluster.
But I got these errors
image
image

and if I run it which login node

i got this error in fe-BCC-100-0.sub.err

image

Running example 4 results in TypeError

When example 4 is executed (calphy -i input.yml), it results in the following output:

Total number of 1 calculations found
Traceback (most recent call last):
File "/home/sebastian/software/miniconda3/envs/calphy/bin/calphy", line 33, in
sys.exit(load_entry_point('calphy==1.2.0', 'console_scripts', 'calphy')())
File "/home/sebastian/software/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.0-py3.10.egg/calphy/kernel.py", line 106, in main
run_jobs(args["input"])
File "/home/sebastian/software/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.0-py3.10.egg/calphy/kernel.py", line 60, in run_jobs
identistring = calc.create_identifier()
File "/home/sebastian/software/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.0-py3.10.egg/calphy/input.py", line 597, in create_identifier
identistring = "-".join([prefix, l, str(ts), ps])
TypeError: sequence item 3: expected str instance, int found

Update to 1.3

  • Update to pydantic for input handling
  • Remove pyscal2
  • Update solid/liquid distinction (see #94 )
  • Clean up code, remove unused methods
  • Fix #60

Keyword not respected

temperature_high keyword is not effective, as regardless of what the input, calphy does not read it. calphy uses the default value which is 2*tmax.

Raised by @ibrsam

Error running calphy from conda install in a clean conda environment

Hi there, as described I encountered a problem running calphy from conda install in a clean conda environment. The environment was created using:
conda create --name=only_calphy python=3.9
then within the environment, calphy was installed using:
conda install -c conda-forge calphy

When running calphy using calphy -i input.yaml, it gave me the following error:
[[email protected]] match_arg (utils/args/args.c:163): unrecognized argument oversubscribe [[email protected]] HYDU_parse_array (utils/args/args.c:178): argument matching returned error [[email protected]] parse_args (ui/mpich/utils.c:1603): error parsing input array [[email protected]] HYD_uii_mpx_get_parameters (ui/mpich/utils.c:1655): unable to parse user arguments [[email protected]] main (ui/mpich/mpiexec.c:128): error parsing parameters Traceback (most recent call last): File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/bin/calphy_kernel", line 10, in <module> sys.exit(main()) File "/Users/Michael_wang/.local/lib/python3.9/site-packages/calphy-0.8.0-py3.9.egg/calphy/queuekernel.py", line 254, in main _ = routine_fe(job) File "/Users/Michael_wang/.local/lib/python3.9/site-packages/calphy-0.8.0-py3.9.egg/calphy/queuekernel.py", line 50, in routine_fe job.run_averaging() File "/Users/Michael_wang/.local/lib/python3.9/site-packages/calphy-0.8.0-py3.9.egg/calphy/solid.py", line 86, in run_averaging lmp = ph.create_object(self.cores, self.simfolder, self.options["md"]["timestep"]) File "/Users/Michael_wang/.local/lib/python3.9/site-packages/calphy-0.8.0-py3.9.egg/calphy/helpers.py", line 61, in create_object lmp.units("metal") File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/lammps_wrapper.py", line 81, in command_wrapper fut = self.lmp.command(cmd) File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 487, in command _ = self._receive() File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 72, in _receive output = pickle.load(self._process.stdout) EOFError: Ran out of input Exception ignored in: <function LammpsBase.__del__ at 0x7f96a4c1ae50> Traceback (most recent call last): File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 628, in __del__ self.close() File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 618, in close self._send(command="close") File "/Users/Michael_wang/opt/anaconda3/envs/only_calphy/lib/python3.9/site-packages/pylammpsmpi/utils/lammps.py", line 57, in _send self._process.stdin.flush() BrokenPipeError: [Errno 32] Broken pipe

It is the same on either Mac OS or Linux, either install from conda or create an environment using environment.yml and then python setup.py install

Failing CI

CI fails as the conda-forge lammps recipe has been updated to July patch.

pressure 2D list is converted to 1D when old inputstyle is autotranslated to the new one

Hi Sarath,

calphy version: 1.3.7
pylammpsmpi version: 0.2.13

Thank you very much for your support. I need the barostat to control pressure anisotropically, aiming for 50 GPa. Following your suggestion and the calphy documentation, I used the keyword: pressure: [[500000,500000,500000]]

However, I encountered an error, which is attached below. Full versions of these files are also included as attachments
file.tar.gz.

(calphy) liang@xx30:~/xx/xx$ calphy -i input.yaml
/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/calphy-1.3.7-py3.11.egg/calphy/input.py:657: UserWarning: Old style input file calphy < v2 found. Converted input in new.input.yaml. Please check!
warnings.warn(f'Old style input file calphy < v2 found. Converted input in {outfile}. Please check!')
Traceback (most recent call last):
File "/home/liang/deepmd-kit3.0.0/envs/calphy/bin/calphy", line 33, in
sys.exit(load_entry_point('calphy==1.3.7', 'console_scripts', 'calphy')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/calphy-1.3.7-py3.11.egg/calphy/kernel.py", line 165, in main
run_jobs(args["input"])
File "/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/calphy-1.3.7-py3.11.egg/calphy/kernel.py", line 55, in run_jobs
calculations = read_inputfile(inputfile)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/calphy-1.3.7-py3.11.egg/calphy/input.py", line 551, in read_inputfile
calculations = _read_inputfile(outfile)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/calphy-1.3.7-py3.11.egg/calphy/input.py", line 561, in _read_inputfile
calculations.append(Calculation(**calc))
^^^^^^^^^^^^^^^^^^^
File "/home/liang/deepmd-kit3.0.0/envs/calphy/lib/python3.11/site-packages/pydantic/main.py", line 171, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 3 validation errors for Main input class
pressure.float
Input should be a valid number [type=float_type, input_value=[500000.0, 500000.0, 500000.0], input_type=list]
For further information visit https://errors.pydantic.dev/2.6/v/float_type
pressure.list[float]
List should have at most 2 items after validation, not 3 [type=too_long, input_value=[500000.0, 500000.0, 500000.0], input_type=list]
For further information visit https://errors.pydantic.dev/2.6/v/too_long
pressure.list[list[float]]
List should have at most 2 items after validation, not 3 [type=too_long, input_value=[500000.0, 500000.0, 500000.0], input_type=list]
For further information visit https://errors.pydantic.dev/2.6/v/too_long

Specify ts

Switching ts is specified for both fe and ts routines. An alternative would be to provide a list, then the integration times can be selected for each stage from this list.

TS in NVT

Add possibility for TS calculations in NVT; then convert to constant pressure condition. This could improve the convergence of calculations with small system size.

applicability of hybrid/scaled born potential for calphy

Using calphy, I want to calculate free energy of ionic liquid phase using born potential with pair style hybrid/scaled
From the previous questions, I undestand it is probably possible in the solid phase using potential_file keyword.

however, though the hybrid/scaled style is applicable, is it difficult to apply in the liquid phase?

The detailed input script in the Lammps is as follows.


atom_style charge
units real
boundary p p p

read_data ${T}.lmp

#*** define pair_style and pair_coeff for born and coulomb potential
pair_style hybrid/scaled 1.0 born 10 1.0 coul/long 10

pair_coeff 1 1 born 0.4202 0.420 3.999 0.000 0.000
pair_coeff 1 2 born 0.3261 0.326 3.484 0.000 0.000
pair_coeff 2 2 born 0.2320 0.232 2.970 0.000 0.000
pair_coeff * * coul/long

kspace_style ewald 1.0e-5


Solid detection algorithm for special structure

Hello every,

I have successfully installed calphy-1.3.1, The test of examples are good. When I use the deepmd potential to calculated the free energy of special structure with Ca O S atoms, an error occurs (Solid detection algorithm only works with BCC/FCC/HCP/SC/DIA. Detection algorithm can be turned off by setting conv: solid_frac: 0).

I add "solid_frac: 0" to input file, but still getting the error.

The input is added to attachment.

I hope you can give me some advice. Thank you.

Q. Li

err.txt

Ta_opt_2.txt

lammps data file issue

for lattice = conf.data

the log.lammps will not be in the calculating directory.
even the lammps calculation is finished, calphy will not do free energy calulation

KeyError: 'element'

Dear every,
I have install the calphy soft, but when I run the example I get the following error. I hope you give some suggests.
Thank you.
Q. Li

error:
Traceback (most recent call last):
File "/home/gswylq/miniconda3/envs/calphy/bin/calphy", line 8, in
sys.exit(main())
File "/home/gswylq/miniconda3/envs/calphy/lib/python3.8/site-packages/calphy/kernel.py", line 113, in main
run_jobs(args["input"])
File "/home/gswylq/miniconda3/envs/calphy/lib/python3.8/site-packages/calphy/kernel.py", line 55, in run_jobs
calculations = read_inputfile(inputfile)
File "/home/gswylq/miniconda3/envs/calphy/lib/python3.8/site-packages/calphy/input.py", line 795, in read_inputfile
calc = Calculation.generate(indata)
File "/home/gswylq/miniconda3/envs/calphy/lib/python3.8/site-packages/calphy/input.py", line 707, in generate
calc.element = indata["element"]
KeyError: 'element'

Inability to invoke "aniso" setting

calphy version: 1.3.7
pylammpsmpi version: 0.2.13

Even after specifying "iso: [False]" in the input file, the pressure remains consistently adjusted isotropically, as indicated by the "Pressure adjusted in iso" entry in the output log files. Below is a brief review of the input file "input.yaml" and the output file "calphy.log". Full versions of these files are also included as attachments.
file.tar.gz

(calphy) xx/xx$ cat input.yaml

element: ["O","Si"]
mass: [15.999,28.085]

calculations:

  • mode: ts
    temperature: [300,1500]
    pressure: [[500000]]
    lattice: [conf.data]
    iso: [False]
    reference_phase: solid
    pair_style: pace
    pair_coeff: '* * SiOx_potential.yace O Si'
    timestep: 0.001
    spring_constants: [2,4]
    n_equilibration_steps: 1000
    n_switching_steps: [1000,1000]
    n_iterations: 1
    equilibration_control: nose-hoover

nose_hoover:
thermostat_damping: 0.1
barostat_damping: 0.1

tolerance:
solid_fraction: 0

queue:
cores: 12

(calphy) xx/xx$ cat ts-conf.data-solid-300-500000/calphy.log

2024-03-22 12:12:24,471 calphy.helpers INFO Temperature start: 300.000000 K, temperature stop: 1500.000000 K, pressure: 500000.000000 bar
2024-03-22 12:12:24,471 calphy.helpers INFO Pressure adjusted in iso
2024-03-22 12:12:24,471 calphy.helpers INFO Reference phase is solid
2024-03-22 12:12:24,471 calphy.helpers INFO Equilibration stage is done using nose-hoover barostat/thermostat
2024-03-22 12:12:24,471 calphy.helpers INFO Nose-Hoover thermostat damping is 0.100000
2024-03-22 12:12:24,471 calphy.helpers INFO Nose-Hoover barostat damping is 0.100000
2024-03-22 12:12:24,471 calphy.helpers INFO These values can be tuned by adding in the input file:
2024-03-22 12:12:24,471 calphy.helpers INFO nose_hoover:
2024-03-22 12:12:24,471 calphy.helpers INFO thermostat_damping:
2024-03-22 12:12:24,471 calphy.helpers INFO barostat_damping:
2024-03-22 12:12:24,471 calphy.helpers INFO Integration stage is done using Nose-Hoover thermostat and barostat when needed
2024-03-22 12:12:24,471 calphy.helpers INFO Thermostat damping is 0.100000
2024-03-22 12:12:24,471 calphy.helpers INFO Barostat damping is 0.100000
2024-03-22 12:12:24,471 calphy.helpers INFO 576 atoms in 1 cells on 12 cores
2024-03-22 12:12:24,471 calphy.helpers INFO pair_style: pace
2024-03-22 12:12:24,471 calphy.helpers INFO pair_coeff: * * xx/xx/SiOx_potential.yace O Si

TypeError due to the keyword 'cmdargs'

I got this error while running calphy.

Traceback (most recent call last):
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/bin/calphy_kernel", line 33, in <module>
    sys.exit(load_entry_point('calphy==1.2.5', 'console_scripts', 'calphy_kernel')())
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/queuekernel.py", line 150, in main
    _ = routine_ts(job)
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/routines.py",line 360, in routine_ts
    routine_fe(job)
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/routines.py",line 341, in routine_fe
    job.run_averaging()
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/solid.py", line 139, in run_averaging
    lmp = ph.create_object(self.cores, self.simfolder, self.calc.md.timestep, self.calc.md.cmdargs)
  File "/home/eslam.ibrahim/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/helpers.py", line 54, in create_object
    lmp = LammpsLibrary(mode="local", cores=cores,
TypeError: LammpsLibrary.__init__() got an unexpected keyword argument 'cmdargs'

pair_coeff for deepmd potential

Hello every,

I have successfully installed calphy-1.2.13, The test result of Example 02 are consistent with the results of the tutorial using the eam potential. When I use the deepmd potential to calculated the phase transition, an error occurs.
It is normal when calculated using lammps (with deepmd potential) alone, and the input is added to attachment.

I hope you can give me some advice. Thank you.

Q. Li

The error is that (ERROR: pair_coeff: element /home/gswylq/soft_calphy/calphy/examples/AgAu/Li not found in the model (/home/conda/feedstock_root/build_artifacts/libdeepmd_1693540729941/work/source/lmp/pair_deepmd.cpp:1161)
Last command: pair_coeff * * /home/gswylq/soft_calphy/calphy/examples/AgAu/Li Si)

The deepmd potential is from the website (https://www.aissquare.com/models/detail?pageType=models&name=AgAu-nanoalloy-model)

AgAu.zip

mode melting_temperature with custom lattice

When specifying a file instead of a predefined lattice melting_temperature calculations fail with:

ValueError("Unknown lattice found. Allowed options are BCC, FCC, HCP, DIA, SC or LQD; or an input file.")

Trying to find the reason for the problem I edited

raise ValueError("Unknown lattice found. Allowed options are BCC, FCC, HCP, DIA, SC or LQD; or an input file.")
to
raise ValueError(f"Unknown lattice {calc.lattice} found. Allowed options are BCC, FCC, HCP, DIA, SC or LQD; or an input file.")

This prints
Unknown lattice ORC found.
which didn't really help me because I could not find out where my conf.data was transformed to ORC tbh.

My input file looks like this. I tried with a relative and an absolute path for the lattice, but this didn't change anything.

calculations:
- lattice: /nfshome/leimeroth/pyiron/projects/CalculationsForJochen/Calphy/Ga/TestPotentials/2003--Nord-J--Ga-N--LAMMPS--ipr1/melting_point/conf.data
  mode: melting_temperature
  nsims: 1
  pressure:
  - 0
element:
- Ga
mass:
- 69.723
md:
  dtemp: 100
  nsmall: 10000
  pair_coeff: '* * 2003_GaN.tersoff Ga N'
  pair_style: tersoff
  pdamp: 0.1
  tdamp: 0.1
  te: 10000
  tguess: 400
  timestep: 0.001
  ts: 15000
queue:
  cores: 1
  scheduler: local

Add support for non-orthogonal simulation cells

When running calphy with a non orthogonal lattice the structure will get artificial surfaces, because pyscals system.to_file() messes up the structure by writing an orthogonal box with wrong dimensions to the file. When looking at the structure with all atoms wrapped into the box an artifical surface is created.

Replicate:

import pyscal.core as pc
import ase.build

Zr = ase.build.bulk("Zr").repeat(15)
sys = pc.System()
sys.read_inputfile(Zr, format="ase")
sys.to_file("Test.dump")

Look at the resulting "Test.dump"

alchemy not used in integrate_path

It seems alchemy.py passes alchemy=True to find_w which just hands it through to integrate_path, but it's not used there at all. But I don't understand enough to see if it's not taken of somewhere else. I just noticed this in #114

Integration with Einstein crystal as reference model for water system leads to errors

I get this error during running TS calculations.

(calphy) -bash-4.2$ cat ../ts-ice_1h.dat-200-0.sub.err 
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 475, in <module>
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    output = select_cmd(input_dict["c"])(input_dict["d"])
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/../mpi/lmpmpi.py", line 406, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 25: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 17: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 5: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 7: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    job.command(funct_args)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 580, in command
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 13: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 12: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 26: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 0: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    with ExceptionCheck(self):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/lammps/core.py", line 49, in __exit__
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 19: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 22: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 23: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 11: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 15: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 18: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 20: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 8: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 14: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 27: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 10: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 6: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 4: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 16: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 3: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 1: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 2: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 21: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 9: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast command'
    raise self.lmp._lammps_exception
lammps.core.MPIAbortException: 'ERROR on proc 24: Variable dU2: Divide by 0 in variable formula (src/variable.cpp:2132)\nLast comman'
--------------------------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[9746,1],4]
  Exit code:    1
--------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/bin/calphy_kernel", line 33, in <module>
    sys.exit(load_entry_point('calphy==1.2.5', 'console_scripts', 'calphy_kernel')())
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/queuekernel.py", line 150, in main
    _ = routine_ts(job)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/routines.py", line 360, in routine_ts
    routine_fe(job)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/routines.py", line 348, in routine_fe
    job.run_integration(iteration=(i+1))
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/calphy-1.2.5-py3.10.egg/calphy/solid.py", line 285, in run_integration
    lmp.command("run               %d"%self.calc._n_switching_steps)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/lammps_wrapper.py", line 73, in func_wrapper
    fut = func(*args, **kwargs)
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/lammps.py", line 536, in command
    _ = self._receive()
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/lammps.py", line 83, in _receive
    output = pickle.load(self._process.stdout)
EOFError: Ran out of input
Exception ignored in: <function LammpsBase.__del__ at 0x7f03a1fe81f0>
Traceback (most recent call last):
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/lammps.py", line 677, in __del__
    self.close()
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/lammps.py", line 667, in close
    self._send(command="close")
  File "/home/users/saadie5f/miniconda3/envs/calphy/lib/python3.10/site-packages/pylammpsmpi/utils/lammps.py", line 68, in _send
    self._process.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe

Inconvenient handling of filepaths for potentials and structure files

Specifying a lattice file as shown in the documentation (f.e. as conf.data) throws an error because the file is not found. It works when specifying the full path to the file.

Similarly a potential file that is in the same directory as the input file and specified as f,e, "potfile.eam" is not found but instead one has to specify "../potfile.eam". Specifying structure files using ../conf.data does not work.

This is not really a bug, but I think it would be nice to mention it in the Documentation or handle by copying the files to the working directory of the calculations.

reset_timestep() got an unexpected keyword argument 'init_commands'

Dear Calphy developers!
I tried to run examples 8 and 9, but got the following output:
Traceback (most recent call last): File "/home/u0050/.local/bin/calphy_kernel", line 33, in <module> sys.exit(load_entry_point('calphy==1.2.8', 'console_scripts', 'calphy_kernel')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/u0050/.local/lib/python3.11/site-packages/calphy-1.2.8-py3.11.egg/calphy/queuekernel.py", line 150, in main _ = routine_ts(job) ^^^^^^^^^^^^^^^ File "/home/u0050/.local/lib/python3.11/site-packages/calphy-1.2.8-py3.11.egg/calphy/routines.py", line 360, in routine_ts routine_fe(job) File "/home/u0050/.local/lib/python3.11/site-packages/calphy-1.2.8-py3.11.egg/calphy/routines.py", line 341, in routine_fe job.run_averaging() File "/home/u0050/.local/lib/python3.11/site-packages/calphy-1.2.8-py3.11.egg/calphy/solid.py", line 188, in run_averaging self.process_traj("traj.equilibration_stage2.dat", "conf.equilibration.data") File "/home/u0050/.local/lib/python3.11/site-packages/calphy-1.2.8-py3.11.egg/calphy/phase.py", line 580, in process_traj ph.reset_timestep(conf, os.path.join(self.simfolder, "current.data"), init_commands=self.calc.md.init_commands) TypeError: reset_timestep() got an unexpected keyword argument 'init_commands'

At the same time, the Calphy tests run OK. I use pylammpsmpi 0.1.0 and its own test also run OK. LAMMPS version is lammps-2022.12.22, which is installed separately from Calphy but the python wrapper has been created and tested.

Thank you in advance for help,
Anton.

Run calphy with LJ/Tip3p model

I want to run simulations with calphy but with no potential file, but I would like to use LJ/Tip3p as follows,

units		real
boundary        p p p						## E in [eV], t in [ps], P in [10000 Pa], l in [A]
atom_style	full						       ## mass x y z vx vy vz 

# create groups ##
group H type 1
group O type 2
 
## set charges - beside manually ##
set group H charge  0.520
set group O charge -1.040
 
### TIP3P Potential Parameters ##
pair_style lj/cut/tip4p/long 2 1 1 1 0.15  10.0
pair_coeff * * 0.0 0.0
pair_coeff 2 2 0.1550 3.1536
bond_style harmonic
bond_coeff 1 450 0.9572
angle_style harmonic
angle_coeff 1 55 104.52
kspace_style pppm/tip4p 1.0e-5

temperature sweep with different starting temperatures

I tried to calculate the melting point of Ga potentials by doing a temperature sweep and than comparing free energies of liquid and solid phase. Now I am facing the problem that the results highly depend on the starting temperature of the temperature sweep.

Temperature sweeps were done from 50, 150, 250 and 350K to 550K respectively. The resulting melting point varies from not existent to slightly below 400K. When using low starting temperatures the Solid and Liquid free energy never cross, because the free energy of the solid decreases faster than that of the liquid. I don' really understand why this happens, because the structures start to melt when increasing the upper temperature limit, which led me to assume that the potential itself is at least reasonable.
The calculated free energy values depend heavily on the starting temperature for the solid and the liquid phase. For the solid the increase with increasing temperature, for the liquid they decrease.

Please find attached the input data and plots of the results. The only change in the input file for each calculation is a changed start temperature. It would be great if you could have a look at this, since I can't tell if this is some bug or me doing something wrong.
Input.zip
Results.zip

pylammpsmpi version should be specified in conda package

I've installed calphy with just micromamba install -c conda-forge calphy and ran into an MPI error. It turns out that I got pylammpsmpi==0.0.2 installed by default, because the conda package does not specify a version. I see now that the webpage lists the dependency correctly, but it would be nicer if conda could handle that directly.

I also had to swap out mpich and openmpi (and the corresponding version of pylammsmpi) at least on my local machine, but that might an issue specific to me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.