Skip to content

Commit

Permalink
avoid error due to temperatures list, force str dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioMirarchi committed Jul 29, 2024
1 parent 45f7f57 commit 92d5f08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions torchmdnet/datasets/mdcath.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def load_pdb_list(pdb_list):
"""Load PDB list from a file or return list directly."""
if isinstance(pdb_list, list):
return pdb_list
return [str(pdb) for pdb in pdb_list]
elif isinstance(pdb_list, str) and os.path.isfile(pdb_list):
logger.info(f"Reading PDB list from {pdb_list}")
with open(pdb_list, "r") as file:
Expand Down Expand Up @@ -192,7 +192,7 @@ def _setup_idx(self):


def process_specific_group(self, pdb, file, temp, repl, conf_idx):
# do not use attributes from h5group beause is will cause memory leak
# do not use attributes from h5group because is will cause memory leak
# use the read_direct and np.s_ to get the coords and forces of interest directly
conf_idx = conf_idx*self.skip_frames
slice_idxs = np.s_[conf_idx:conf_idx+1]
Expand Down

0 comments on commit 92d5f08

Please sign in to comment.