Skip to content

Commit

Permalink
chore: blackening
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisborn committed May 23, 2024
1 parent dfed5d8 commit ac5e161
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def validate_output(self, sequences: List[Any]) -> Tuple[List[Any], List[int]]:
if isinstance(self.tokenizer.text_tokenizer, PolymerGraphTokenizer):
# Copolymer models require specific validation
return validate_molecules(
pattern_list=list(zip(*sequences))[0], # type: ignore
pattern_list=list(zip(*sequences))[0], # type: ignore
input_type=MoleculeFormat.copolymer,
)

Expand Down
4 changes: 3 additions & 1 deletion src/gt4sd/frameworks/cgcnn/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def expand(self, distances: np.ndarray) -> np.ndarray:
Expanded distance matrix with the last dimension of length
len(self.filter).
"""
return np.exp(-((distances[..., np.newaxis] - self.filter) ** 2) / self.var**2)
return np.exp(
-((distances[..., np.newaxis] - self.filter) ** 2) / self.var**2
)


class AtomInitializer:
Expand Down
5 changes: 4 additions & 1 deletion src/gt4sd/frameworks/gflownet/dataloader/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ class GFlowNetDataset(Dataset):
"""A dataset for gflownet."""

def __init__(
self, h5_file: str | None = None, target: str = "gap", properties: List[str] = []
self,
h5_file: str | None = None,
target: str = "gap",
properties: List[str] = [],
) -> None:

"""Initialize a gflownet dataset.
Expand Down

0 comments on commit ac5e161

Please sign in to comment.