Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
JaGeo committed Jul 28, 2023
1 parent 29fab75 commit 0c675bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions src/atomate2/forcefields/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ class ForceFieldRelaxMaker(Maker):

@job(output_schema=ForceFieldTaskDocument)
def make(self, structure: Structure):
"""
Perform a relaxation of a structure using a forcefield.
Parameters
----------
structure: .Structure
pymatgen structure.
"""
if self.steps < 0:
logger.warning(
"WARNING: A negative number of steps is not possible. "
Expand Down Expand Up @@ -103,6 +111,15 @@ class ForceFieldStaticMaker(ForceFieldRelaxMaker):

@job(output_schema=ForceFieldTaskDocument)
def make(self, structure: Structure):
"""
Perform a static evaluation of energies, forces, stresses
using a forcefield.
Parameters
----------
structure: .Structure
pymatgen structure.
"""
if self.steps < 0:
logger.warning(

Check warning on line 124 in src/atomate2/forcefields/jobs.py

View check run for this annotation

Codecov / codecov/patch

src/atomate2/forcefields/jobs.py#L124

Added line #L124 was not covered by tests
"WARNING: A negative number of steps is not possible. "
Expand Down
4 changes: 2 additions & 2 deletions src/atomate2/forcefields/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utils for using a force field (aka an interatomic potential).
The following code has been taken and modified from
https://github.com/materialsvirtuallab/m3gnet
The code has been released under BSD 3-Clause License
Expand Down Expand Up @@ -44,8 +45,7 @@

class TrajectoryObserver:
"""
Trajectory observer is a hook in the relaxation process that saves the
intermediate structures.
Trajectory observer is a hook in the relaxation process that saves the intermediate structures.
"""

def __init__(self, atoms: Atoms):
Expand Down

0 comments on commit 0c675bd

Please sign in to comment.