-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5558bfb
commit 7ed418d
Showing
30 changed files
with
369 additions
and
636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,12 @@ | ||
class CaseData: | ||
""" | ||
A test case. | ||
Attributes | ||
---------- | ||
building_block : :class:`.BuildingBlock` | ||
The building block to test. | ||
functional_groups : :class:`tuple` of :class:`.FunctionalGroup` | ||
The functional groups :attr:`.building_block` should be | ||
holding. | ||
known_repr : str | ||
The representation of the building block. | ||
core_atom_ids : :class:`tuple` of :class:`int` | ||
The correct core atom ids for :attr:`.building_block`. | ||
placer_ids : :class:`tuple` of :class:`int` | ||
The correct *placer* ids for :attr:`.building_block`. | ||
""" | ||
import stk | ||
from dataclasses import dataclass | ||
from collections.abc import Sequence | ||
|
||
def __init__( | ||
self, | ||
building_block, | ||
functional_groups, | ||
known_repr, | ||
core_atom_ids, | ||
placer_ids, | ||
): | ||
""" | ||
Initialize a :class:`.CaseData` instance. | ||
|
||
Parameters | ||
---------- | ||
building_block : :class:`.BuildingBlock` | ||
The building block to test. | ||
functional_groups : :class:`tuple` of :class:`.FunctionalGroup` | ||
The functional groups `building_block` should be holding. | ||
known_repr : str | ||
The representation of the building block. | ||
core_atom_ids : :class:`tuple` of :class:`int` | ||
The correct core atom ids for `building_block`. | ||
placer_ids : :class:`tuple` of :class:`int` | ||
The correct *placer* ids for `building_block`. | ||
""" | ||
|
||
self.building_block = building_block | ||
self.functional_groups = functional_groups | ||
self.known_repr = known_repr | ||
self.core_atom_ids = core_atom_ids | ||
self.placer_ids = placer_ids | ||
@dataclass(slots=True, frozen=True) | ||
class CaseData: | ||
building_block: stk.BuildingBlock | ||
functional_groups: Sequence[stk.FunctionalGroup] | ||
known_repr: str | ||
core_atom_ids: Sequence[int] | ||
placer_ids: Sequence[int] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 11 additions & 89 deletions
100
tests/molecular/molecules/building_block/fixtures/init_from_file.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 7 additions & 10 deletions
17
tests/molecular/molecules/building_block/test_get_core_atom_ids.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.