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

update format #27

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions mamonca/mc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ cdef class MC:

def set_heisenberg_coeff(self, coeff, i=None, j=None, deg=1, index=0):
"""
Args:
coeff (float/list/ndarray/scipy.sparse): Heisenberg coefficient.
If a single number is given, the same parameter is applied
to all the pairs defined in me and neigh. Instead of
giving me and neigh, you can also give a n_atom x n_atom
tensor.
i (list/ndarray): list of indices i (s. def in the comment)
j (list/ndarray): list of indices j (s. def in the comment)
deg (int): polynomial degree
index (int): potential index for thermodynamic integration
(0 or 1; choose 0 if not thermodynamic integration)
Comment:
Heisenberg term is given by: -sum_ij coeff_ij*(m_i*m_j)^deg.
Beware of the negative sign.
Args:
coeff (float/list/ndarray/scipy.sparse): Heisenberg coefficient.
If a single number is given, the same parameter is applied
to all the pairs defined in me and neigh. Instead of
giving me and neigh, you can also give a n_atom x n_atom
tensor.
i (list/ndarray): list of indices i (s. def in the comment)
j (list/ndarray): list of indices j (s. def in the comment)
deg (int): polynomial degree
index (int): potential index for thermodynamic integration
(0 or 1; choose 0 if not thermodynamic integration)
Comment:
Heisenberg term is given by: -sum_ij coeff_ij*(m_i*m_j)^deg.
Beware of the negative sign.
"""
if i is None and j is None:
n = self.c_mc.get_number_of_atoms()
Expand Down Expand Up @@ -119,11 +119,11 @@ cdef class MC:

def clear_heisenberg_coeff(self, index=0):
"""
Args:
index (int): potential index for thermodynamic integration (0 or 1; choose 0 if
not thermodynamic integration)
Args:
index (int): potential index for thermodynamic integration (0 or 1; choose 0 if
not thermodynamic integration)

This function erases all the Heisenberg coefficients defined before.
This function erases all the Heisenberg coefficients defined before.
"""
self.c_mc.clear_heisenberg_coeff(index)

Expand Down
Loading