diff --git a/prody/database/bioexcel.py b/prody/database/bioexcel.py index 1d80961a9..8450adf92 100644 --- a/prody/database/bioexcel.py +++ b/prody/database/bioexcel.py @@ -278,12 +278,15 @@ def convertXtcToDcd(filepath, **kwargs): else: acc = basename(splitext(filepath)[0]) + if not isfile(acc): + acc = fetchBioexcelTopology(acc, **kwargs) + try: import mdtraj except ImportError: raise ImportError('Please install mdtraj to convert to dcd.') else: - top = mdtraj.load_psf(fetchBioexcelTopology(acc, **kwargs)) + top = mdtraj.load_topology(acc) traj = mdtraj.load_xtc(filepath, top=top) filepath = filepath.replace('xtc', 'dcd') traj.save_dcd(filepath)