Skip to content

Commit

Permalink
support non-solvent in the batch calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
minhuanli committed Apr 17, 2024
1 parent d7ae427 commit cfa3fea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion SFC_Torch/Fmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,9 +1074,11 @@ def calc_fprotein_batch(self, atoms_position_batch, Return=False, PARTITION=20):
if not self.HKL_array is None:
# type: ignore
self.Fprotein_HKL_batch = self.Fprotein_asu_batch[:, self.asu2HKL_index]
self.Fmask_HKL_batch = torch.zeros_like(self.Fprotein_HKL_batch)
if Return:
return self.Fprotein_HKL_batch
else:
self.Fmask_asu_batch = torch.zeros_like(self.Fprotein_asu_batch)
if Return:
return self.Fprotein_asu_batch

Expand Down Expand Up @@ -1220,7 +1222,7 @@ def calc_ftotal_batch(self, bins=None, Return=True):
for bin_i in bins:
index_i = self.bins == bin_i
ftotal_asu_batch[index_i] = self._calc_ftotal_batch_bini(
bin_i, index_i, self.Hasu_array, self.Fprotein_asu, self.Fmask_asu
bin_i, index_i, self.Hasu_array, self.Fprotein_asu_batch, self.Fmask_asu_batch
)
self.Ftotal_asu_batch = ftotal_asu_batch
if Return:
Expand Down

0 comments on commit cfa3fea

Please sign in to comment.