Skip to content

Commit

Permalink
neb.final_chain is added
Browse files Browse the repository at this point in the history
  • Loading branch information
hjnpark committed Oct 13, 2023
1 parent e35b59f commit 8289de4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qcportal/qcportal/neb/record_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class NEBRecord(BaseRecord):
# Caches
########################################
initial_chain_: Optional[List[Molecule]] = None
final_chain_: Optional[List[SinglepointRecord]] = None
optimizations_cache_: Optional[Dict[str, OptimizationRecord]] = None
singlepoints_cache_: Optional[Dict[int, List[SinglepointRecord]]] = None

Expand Down Expand Up @@ -213,6 +214,8 @@ def _handle_includes(self, includes: Optional[Iterable[str]]):

if "initial_chain" in includes:
self._fetch_initial_chain()
if "final_chain" in includes:
self._fetch_singlepoints()
if "singlepoints" in includes:
self._fetch_singlepoints()
if "optimizations" in includes:
Expand All @@ -224,6 +227,10 @@ def initial_chain(self) -> List[Molecule]:
self._fetch_initial_chain()
return self.initial_chain_

@property
def final_chain(self) -> List[SinglepointRecord]:
return self.singlepoints[max(self.singlepoints.keys())]

@property
def singlepoints(self) -> Dict[int, List[SinglepointRecord]]:
if self.singlepoints_cache_ is None:
Expand Down

0 comments on commit 8289de4

Please sign in to comment.