Open andrrizzi opened 5 years ago
What would the API look like for extending Molecule.from_file()
?
Perhaps
# Read only the first molecule
one_molecule = Molecule.from_file('data/molecules/MiniDrugBank.sdf', molecule_indices=7)
# Read specific molecules
molecules_from_indices = Molecule.from_file('data/molecules/MiniDrugBank.sdf', molecule_indices=[0,3,17])
# Read a range of molecules
molecules_from_range = Molecule.from_file('data/molecules/MiniDrugBank.sdf', molecule_indices=range(10,20))
# Read all molecules
all_molecules = Molecule.from_file('data/molecules/MiniDrugBank.sdf')
That's exactly what I had in mind.
For files containing a lot of molecules (e.g.
data/molecules/MiniDrugBank.sdf
) this should help cutting the time necessary to run the toolkit.