Skip to content

Commit

Permalink
import future annotations for 3.8 and 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
minhuanli committed Nov 12, 2023
1 parent 8718add commit 12d35a3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions SFC_Torch/Fmodel.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

"""
Calculate Structural Factor from an atomic model: F_model = k_total * (F_calc + k_mask * F_mask)
Expand All @@ -8,12 +9,12 @@
Written in PyTorch
"""
from __future__ import annotations

__author__ = "Minhuan Li"
__email__ = "minhuanli@g.harvard.edu"

from typing import Optional, List

import gemmi
import time
import numpy as np
Expand All @@ -40,13 +41,13 @@ def __init__(
mtzdata: str | rs.DataSet = None,
n_bins: int = 10,
dmin: Optional[float] = None,
anomalous: bool=False,
wavelength: Optional[float]=None,
set_experiment: bool=True,
expcolumns: List[str]=["FP", "SIGFP"],
freeflag: str="FreeR_flag",
testset_value: int=0,
device: torch.device=try_gpu()
anomalous: bool = False,
wavelength: Optional[float] = None,
set_experiment: bool = True,
expcolumns: List[str] = ["FP", "SIGFP"],
freeflag: str = "FreeR_flag",
testset_value: int = 0,
device: torch.device = try_gpu()
) -> None:
"""
Initialize with necessary reusable information, like spacegroup, unit cell info, HKL_list, et.c.
Expand Down

0 comments on commit 12d35a3

Please sign in to comment.