Skip to content

Commit 55938ab

Browse files
committed
Update docstrings
1 parent 1bad845 commit 55938ab

File tree

1 file changed

+38
-17
lines changed

1 file changed

+38
-17
lines changed

atomate/vasp/workflows/base/magnetism.py

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,21 @@ def __init__(
163163
a magnetic structure obtained by experiment, to measure
164164
the performance of the workflow.
165165
166-
:param structure: input structure
167-
:param default_magmoms: (optional, defaults provided) dict of
166+
Args:
167+
structure: input structure
168+
default_magmoms: (optional, defaults provided) dict of
168169
magnetic elements to their initial magnetic moments in µB, generally
169170
these are chosen to be high-spin since they can relax to a low-spin
170171
configuration during a DFT electronic configuration
171-
:param strategies: different ordering strategies to use, choose from:
172+
strategies: different ordering strategies to use, choose from:
172173
ferromagnetic, antiferromagnetic, antiferromagnetic_by_motif,
173174
ferrimagnetic_by_motif and ferrimagnetic_by_species (here, "motif",
174175
means to use a different ordering parameter for symmetry inequivalent
175176
sites)
176-
:param automatic: if True, will automatically choose sensible strategies
177-
:param truncate_by_symmetry: if True, will remove very unsymmetrical
178-
orderings that are physically implausible
179-
:param transformation_kwargs: keyword arguments to pass to
177+
automatic: if True, will automatically choose sensible strategies
178+
truncate_by_symmetry: if True, will remove very unsymmetrical
179+
orderings that are likely physically implausible
180+
transformation_kwargs: keyword arguments to pass to
180181
MagOrderingTransformation, to change automatic cell size limits, etc.
181182
"""
182183

@@ -251,6 +252,11 @@ def _sanitize_input_structure( input_structure):
251252
"""
252253
Sanitize our input structure by removing magnetic information
253254
and making primitive.
255+
256+
Args:
257+
input_structure: Structure
258+
259+
Returns: Structure
254260
"""
255261

256262
input_structure = input_structure.copy()
@@ -280,6 +286,12 @@ def _generate_transformations(self, structure):
280286
and later discard any duplicates that might be found by multiple
281287
strategies. This approach is not ideal, but has been found to be
282288
relatively robust over a wide range of magnetic structures.
289+
290+
Args:
291+
structure: A sanitized input structure (_sanitize_input_structure)
292+
293+
Returns: A dict of a transformation class instance (values) and name of
294+
enumeration strategy (keys)
283295
"""
284296

285297
formula = structure.composition.reduced_formula
@@ -497,6 +509,17 @@ def _generate_ordered_structures(self, sanitized_input_structure, transformation
497509
Apply our input structure to our list of transformations and output a list
498510
of ordered structures that have been pruned for duplicates and for those
499511
with low symmetry (optional).
512+
513+
Args:
514+
sanitized_input_structure: A sanitized input structure
515+
(_sanitize_input_structure)
516+
transformations: A dict of transformations (values) and name of
517+
enumeration strategy (key), the enumeration strategy name is just
518+
for record keeping
519+
520+
Returns: None (sets self.ordered_structures
521+
and self.ordered_structures_origins instance variables)
522+
500523
"""
501524

502525
ordered_structures = self.ordered_structures
@@ -654,28 +677,26 @@ def _add_structures(
654677
self.ordered_structures = ordered_structures
655678
self.ordered_structure_origins = ordered_structures_origins
656679

657-
return
658-
659680
def get_wf(
660681
self, scan=False, perform_bader=True, num_orderings_hard_limit=16, c=None
661682
):
662683
"""
663684
Retrieve the FireWorks workflow.
664685
665-
:param scan: if True, use the SCAN functional instead of GGA+U, since
686+
Args:
687+
scan: if True, use the SCAN functional instead of GGA+U, since
666688
the SCAN functional has shown to have improved performance for
667689
magnetic systems in some cases
668-
:param perform_bader: if True, make sure the "bader" binary is in your
690+
perform_bader: if True, make sure the "bader" binary is in your
669691
path, will use Bader analysis to calculate atom-projected magnetic
670692
moments
671-
:param num_orderings_soft_limit: will make sure total number of magnetic
672-
orderings does not exceed this number, unless there are extra magnetic
673-
orderings of equivalent symmetry
674-
:param num_orderings_hard_limit: will make sure total number of magnetic
693+
num_orderings_hard_limit: will make sure total number of magnetic
675694
orderings does not exceed this number even if there are extra orderings
676695
of equivalent symmetry
677-
:param c: additional config dict (as in elsewhere in atomate)
678-
:return:
696+
c: additional config dict (as used elsewhere in atomate)
697+
698+
Returns: FireWorks Workflow
699+
679700
"""
680701

681702
c = c or {"VASP_CMD": VASP_CMD, "DB_FILE": DB_FILE}

0 commit comments

Comments
 (0)