calphy 1.3.8__py3-none-any.whl → 1.3.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
calphy/__init__.py CHANGED
@@ -4,7 +4,7 @@ from calphy.solid import Solid
4
4
  from calphy.alchemy import Alchemy
5
5
  from calphy.routines import MeltingTemp
6
6
 
7
- __version__ = "1.3.8"
7
+ __version__ = "1.3.9"
8
8
 
9
9
  def addtest(a,b):
10
10
  return a+b
calphy/input.py CHANGED
@@ -40,7 +40,7 @@ from pyscal3.core import structure_dict, element_dict, _make_crystal
40
40
  from ase.io import read, write
41
41
  import shutil
42
42
 
43
- __version__ = "1.3.8"
43
+ __version__ = "1.3.9"
44
44
 
45
45
  def read_report(folder):
46
46
  """
@@ -72,7 +72,12 @@ def _to_int(val):
72
72
  if np.isscalar(val):
73
73
  return int(val)
74
74
  else:
75
- return [int(x) for x in val]
75
+ return [int(x) for x in val]
76
+
77
+ def _to_none(val):
78
+ if val in ['none', 'None',]:
79
+ return None
80
+ return val
76
81
 
77
82
  def _to_float(val):
78
83
  if np.isscalar(val):
@@ -558,6 +563,8 @@ def _read_inputfile(file):
558
563
  for count, calc in enumerate(data['calculations']):
559
564
  calc['kernel'] = count
560
565
  calc['inputfile'] = file
566
+ if 'pressure' in calc.keys():
567
+ calc['pressure'] = _to_none(calc['pressure'])
561
568
  calculations.append(Calculation(**calc))
562
569
  return calculations
563
570
 
calphy/liquid.py CHANGED
@@ -56,7 +56,12 @@ class Liquid(cph.Phase):
56
56
 
57
57
  def melt_structure(self, lmp):
58
58
  """
59
- """
59
+ """
60
+ if self.calc._fix_lattice and self.calc.melting_cycle:
61
+
62
+ raise ValueError("Cannot fix lattice and melt structure (set to False) at the same time")
63
+
64
+
60
65
  melted = False
61
66
 
62
67
  #this is the multiplier for thigh to try melting routines
@@ -136,11 +141,14 @@ class Liquid(cph.Phase):
136
141
  if self.calc.melting_cycle:
137
142
  self.melt_structure(lmp)
138
143
 
139
- #now assign correct temperature and equilibrate
140
- self.run_zero_pressure_equilibration(lmp)
144
+ if not self.calc._fix_lattice:
145
+ #now assign correct temperature and equilibrate
146
+ self.run_zero_pressure_equilibration(lmp)
141
147
 
142
- #converge pressure
143
- self.run_pressure_convergence(lmp)
148
+ #converge pressure
149
+ self.run_pressure_convergence(lmp)
150
+ else:
151
+ self.run_constrained_pressure_convergence(lmp)
144
152
 
145
153
  #check melted error
146
154
  self.dump_current_snapshot(lmp, "traj.equilibration_stage1.dat")
calphy/phase.py CHANGED
@@ -622,6 +622,7 @@ class Phase:
622
622
  self.lz = np.round(np.mean(lz[-ncount+1:]), decimals=3)
623
623
  self.volatom = volatom
624
624
  self.vol = self.lx*self.ly*self.lz
625
+ self.rho = self.natoms/(self.lx*self.ly*self.lz)
625
626
  self.logger.info("finalized vol/atom %f at pressure %f"%(self.volatom, mean))
626
627
  self.logger.info("Avg box dimensions x: %f, y: %f, z:%f"%(self.lx, self.ly, self.lz))
627
628
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: calphy
3
- Version: 1.3.8
3
+ Version: 1.3.9
4
4
  Summary: free energy calculation for python
5
5
  Home-page: https://github.com/ICAMS/calphy
6
6
  Author: Sarath Menon, Yury Lysogorskiy, Ralf Drautz
@@ -1,14 +1,14 @@
1
- calphy/__init__.py,sha256=jJPLUeJFKfa7dCVgQ0_d1yXSSgim9KpQLN3LbiBlRws,233
1
+ calphy/__init__.py,sha256=RKi3orWUQRK_qYHCQKFzfbyTptYDonS9673vtVdelso,233
2
2
  calphy/alchemy.py,sha256=epv_vJoAMVbj-S1TuPSbBGr4w_a9qEr4EIxKlgwdlSo,12893
3
3
  calphy/clitools.py,sha256=oDqaw0s-LJ7tAdW_Njk2SFljVx6K34Rs8sdMz48SNSI,4125
4
4
  calphy/composition_transformation.py,sha256=Hh240-iVGC8ATlJ3nQK757qVZIBrE2aw7dsF46mi3oo,15353
5
5
  calphy/errors.py,sha256=KN47RWTLbg1H_NZMrhCiJCbqjqJScJ1pgQAuzj1-l84,1268
6
6
  calphy/helpers.py,sha256=nj8g53H6ScohQtyV7Enzms8Rv_89PRrDDY1IHjFSZdQ,8292
7
- calphy/input.py,sha256=BNSxEKTvORN-TJs5fqlmUnK-yqv2Iul4wNftUTYbqSo,29533
7
+ calphy/input.py,sha256=Z8h-Y3dz5HJy6eOGYffMtUV9Q-NPall8dnPiFKkXUEw,29717
8
8
  calphy/integrators.py,sha256=CcK3oqIwZ3z41v3fh3IvswY_l-ZbLRluWuDNJlXCXfg,20680
9
9
  calphy/kernel.py,sha256=rd_-EfCiBhQjkxcVaoLtVJB2_qDgS-g-dQ0BZBTJQ_A,6190
10
- calphy/liquid.py,sha256=8KH4t0mcpumR1KlOoWHjlr8lcQaWLXQPcA438A08hfM,13450
11
- calphy/phase.py,sha256=5ZA7tn6ZyZozZW7wMiZSfkRQZAa5Wg9XtIjNofu21cg,44730
10
+ calphy/liquid.py,sha256=a5NTAjc3VsrPBQoEMGe9O1WXfv1vxGoB0xPguf0fOyM,13762
11
+ calphy/phase.py,sha256=ukqad4MJ-MNGiyOsq2_jntG2s10UHbJVi2Ounpg_S2U,44787
12
12
  calphy/phase_diagram.py,sha256=2EwmT_qkT5BEP6Sx0_rm09kPP2RWh5JY4sogIBK_AhA,12992
13
13
  calphy/queuekernel.py,sha256=4GMIYnjMiAPipoLNKP5noYcfeEOI_vCqm84zgokk7Xw,5321
14
14
  calphy/routines.py,sha256=W6OZEPv6HEG11EYsoIbum2WVrO3Ly36i5UWsYQ4oBdQ,17473
@@ -16,9 +16,9 @@ calphy/scheduler.py,sha256=9p1MdMlB2QtMV6-LmjBU9E0GOxx-fdDEvAb3LOVsRPM,8468
16
16
  calphy/solid.py,sha256=49gT0wNOP3h8lRDXarULP-bU09lIrnDCTUcyxE7X-UE,19795
17
17
  calphy/splines.py,sha256=BGwUVz_qXQxUzpUCuZo6CsELcd5JVNWzI-Ttcz22G_E,61627
18
18
  calphy/utils.py,sha256=0UpsYoxjS5N-iGs-cdm0YDMkLF8IHvKO3smXDHrj3eg,3818
19
- calphy-1.3.8.dist-info/LICENSE,sha256=XIHGB5RZLIhOjjoO1bPf0II-qDbjhP5Cv5HJMRE9v1g,16651
20
- calphy-1.3.8.dist-info/METADATA,sha256=IczeMseQTEJMkgpGF6A7gNfzwuFiJzzIvfulp-n291c,4215
21
- calphy-1.3.8.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
22
- calphy-1.3.8.dist-info/entry_points.txt,sha256=W9qq254koyWnAgo1jtfQP9bO5Q7sgZrzc8BMnfo3vf4,386
23
- calphy-1.3.8.dist-info/top_level.txt,sha256=w871dhMqPwgjjbifBWdkT9_aOnK1ek4Odrh8UnSG3PE,7
24
- calphy-1.3.8.dist-info/RECORD,,
19
+ calphy-1.3.9.dist-info/LICENSE,sha256=XIHGB5RZLIhOjjoO1bPf0II-qDbjhP5Cv5HJMRE9v1g,16651
20
+ calphy-1.3.9.dist-info/METADATA,sha256=OoDJsMjXCuKp1w4IxKX-RL9baeg3b4Co_BzHtaydQnc,4215
21
+ calphy-1.3.9.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
22
+ calphy-1.3.9.dist-info/entry_points.txt,sha256=W9qq254koyWnAgo1jtfQP9bO5Q7sgZrzc8BMnfo3vf4,386
23
+ calphy-1.3.9.dist-info/top_level.txt,sha256=w871dhMqPwgjjbifBWdkT9_aOnK1ek4Odrh8UnSG3PE,7
24
+ calphy-1.3.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (70.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5