Skip to content

Commit

Permalink
Added DualProgramArgs object.
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonbh committed Aug 18, 2023
1 parent 873c7f5 commit 90dc2e1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [unreleased]

### Added

- `DualProgramArgs` object.

## [0.4.1]

### Fixed
Expand Down
3 changes: 3 additions & 0 deletions qcio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@
"SinglePointComputedProps",
"Wavefunction",
"ProgramFailure",
"ProgramArgs",
"QCProgramArgs",
"DualProgramArgs",
]
7 changes: 2 additions & 5 deletions qcio/models/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing_extensions import Self

from .inputs_base import InputBase, ProgramArgs, QCProgramArgs, StructuredInputBase
from .inputs_base import DualProgramArgs, InputBase, QCProgramArgs, StructuredInputBase
from .molecule import Molecule

__all__ = [
Expand Down Expand Up @@ -50,7 +50,7 @@ class ProgramInput(StructuredInputBase, QCProgramArgs):
"""


class DualProgramInput(StructuredInputBase, ProgramArgs):
class DualProgramInput(StructuredInputBase, DualProgramArgs):
"""Input for a two program calculation.
Attributes:
Expand All @@ -64,9 +64,6 @@ class DualProgramInput(StructuredInputBase, ProgramArgs):
development and scratch space.
"""

subprogram_args: QCProgramArgs
subprogram: str


if __name__ == "__main__":
# Test geometry optimization input
Expand Down
15 changes: 14 additions & 1 deletion qcio/models/inputs_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"QCProgramArgs",
"InputBase",
"StructuredInputBase",
"DualProgramArgs",
]


Expand Down Expand Up @@ -69,7 +70,7 @@ class Model(BaseModel):


class QCProgramArgs(ProgramArgs):
"""Core arguments for a QC program. Breaks out model from keywords.
"""Core arguments for a calculation on a molecule. Breaks out model from keywords.
Attributes:
model: The model for the quantum chemistry calculation.
Expand All @@ -78,6 +79,18 @@ class QCProgramArgs(ProgramArgs):
model: Model


class DualProgramArgs(ProgramArgs):
"""Core arguments for a DualProgramInput without calctype and molecule.
Attributes:
subprogram_args: The input arguments for the subprogram.
subprogram: The name of the subprogram to be used.
"""

subprogram_args: QCProgramArgs
subprogram: str


class StructuredInputBase(ProgramArgs):
"""Base class for all structured qcio input classes.
Expand Down

0 comments on commit 90dc2e1

Please sign in to comment.