From 92d5f08faad5f70495e541876e874f781c2e0e1f Mon Sep 17 00:00:00 2001 From: Antonio Mirarchi Date: Mon, 29 Jul 2024 10:42:30 +0200 Subject: [PATCH] avoid error due to temperatures list, force str dtype --- torchmdnet/datasets/mdcath.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchmdnet/datasets/mdcath.py b/torchmdnet/datasets/mdcath.py index f9ae052e..3c52afff 100644 --- a/torchmdnet/datasets/mdcath.py +++ b/torchmdnet/datasets/mdcath.py @@ -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: @@ -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]