Skip to content

Commit

Permalink
updated V0.11.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mushroomfire committed Nov 12, 2024
1 parent 271b8a1 commit 6caac3f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ReleaseNotes.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Release Notes
--------------

Mdapy 0.11.4 (Under development)
Mdapy 0.11.4 (Nov 13, 2024)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

🏆 Highlights
---------------
- Add feature to Minimizer class for optimizing the box.
- Add many options for calculating SteinhardtBondOrientation, including the Voronoi neighbor, weighted by Voronoi face area and average version.

🐞 Bug fixes
-----------------
Expand Down
14 changes: 7 additions & 7 deletions mdapy/minimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,17 @@ def compute(self):
nep = NEP(r"D:\Study\Gra-Al\potential_test\validating\graphene\itre_45\nep.txt")

element_name, lattice_constant, lattice_type, potential = (
"Al",
4.1,
"FCC",
"C",
1.42,
"GRA",
nep,
)
x, y, z = 5, 5, 5
x, y, z = 5, 5, 1
fmax = 1e-5
max_itre = 200
lat = LatticeMaker(lattice_constant, lattice_type, x, y, z)
lat.compute()

lat.box[2, 2] += 20
# pe_atom, _, _ = potential.compute(
# lat.pos, lat.box, [element_name], lat.type_list, [1, 1, 1]
# )
Expand Down Expand Up @@ -279,11 +279,11 @@ def compute(self):
lat.type_list,
fmax=fmax,
max_itre=max_itre,
volume_change=True,
volume_change=False,
hydrostatic_strain=True,
)
mini.compute()
print(mini.box / 5)
print(mini.box)

# e, f, v = potential.compute(mini.pos, mini.box, [element_name], lat.type_list)
# vol = np.inner(mini.box[0], np.cross(mini.box[1], mini.box[2]))
Expand Down
4 changes: 4 additions & 0 deletions mdapy/steinhardt_bond_orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ class SteinhardtBondOrientation:
wlflag (bool, optional): whether calculate the third-order invariants :math:`W_{\ell}`. Defaults to False.
wlhatflag (bool, optional): whether calculate the normalized third-order invariants :math:`\hat{W}_{\ell}`. If :math:`wlflag` is False, this parameter has no effect. Defaults to False.
max_neigh (int, optional): a given maximum neighbor number per atoms. Defaults to 60.
use_weight (bool, optional): whether use weight. Defaults to False.
weight (np.ndarray, optional): a given weight to calculate the qlm. Such as a voronoi face area array. Defaults to None.
voronoi (bool, optional): indicate that whether the neighbor is Voronoi neighbor. Defaults to False.
average (bool, optional): whether average the qlm within the neighbor atoms. Defaults to False.
Outputs:
- **qnarray** (np.ndarray) - (math:`N_p, len(qlist)*(1+wlflag+wlhatflag)`) consider the :math:`qlist=[4, 6]` and :math:`wlflag` and :math:`wlhatflag` is True, the columns of :math:`qnarray` are [:math:`Q_4, Q_6, W_4, W_6, \hat{W}_4, \hat{W}_6`].
Expand Down
3 changes: 3 additions & 0 deletions mdapy/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,9 @@ def cal_steinhardt_bond_orientation(
rc (float, optional): cutoff distance to find neighbors. Defaults to 0.0.
wlflag (bool, optional): whether calculate the third-order invariants :math:`W_{\ell}`. Defaults to False.
wlhatflag (bool, optional): whether calculate the normalized third-order invariants :math:`\hat{W}_{\ell}`. If :math:`wlflag` is False, this parameter has no effect. Defaults to False.
use_voronoi (bool, optional): whether use Voronoi neighbor. Defaults to False.
use_weight (bool, optional): whether use Voronoi face area to weight the qlm. Defaults to False.
average (bool, optional): whether avcerage the qlm with the neighbor atoms. Defaults to False.
solidliquid (bool, optional): whether identify the solid/liquid phase. Defaults to False.
max_neigh (int, optional): a given maximum neighbor number per atoms. Defaults to 60.
threshold (float, optional): threshold value to determine the solid bond. Defaults to 0.7.
Expand Down

0 comments on commit 6caac3f

Please sign in to comment.