Skip to content

Commit

Permalink
chore: cleanup docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Jun 20, 2024
1 parent 0931908 commit 2f9063e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/py/mat3ra/made/basis/basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class Basis(RoundNumericValuesMixin, BaseModel):
coordinates: ArrayWithIds = ArrayWithIds(values=[0, 0, 0])
units: str = AtomicCoordinateUnits.crystal
cell: Optional[Cell] = None
# TODO: isolate labels to a separate class
labels: Optional[ArrayWithIds] = ArrayWithIds(values=[])
constraints: Optional[ArrayWithIds] = ArrayWithIds(values=[])

Expand Down
13 changes: 8 additions & 5 deletions src/py/mat3ra/made/tools/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

def scale_one_lattice_vector(material, key="a", factor=1.0):
"""
Scales one lattice vector for the given material.
:param material: The material acted upon.
:param key: Lattice vector key.
:param factor: Float scaling factor.
Scales one lattice vector for the given material in place.
Args:
material: The material to scale.
key: The key of the lattice vector to scale.
factor: The factor to scale the lattice vector by
"""
material.to_cartesian()

Expand All @@ -23,7 +25,8 @@ def get_basis_config_translated_to_center(material):
"""
Updates the basis of a material by translating the coordinates
so that the center of the material and lattice are aligned.
:param material: The material to update.
Args:
material: The material to update.
"""
original_units = material.basis.units
material.to_cartesian()
Expand Down

0 comments on commit 2f9063e

Please sign in to comment.