Esempio n. 1
0
def test_make_lmdb_dataset():
    # Load PDB dataset
    dataset = da.load_dataset('tests/test_data/pdb', 'pdb')
    assert len(dataset) == 4
    # Create LMDB dataset from PDB dataset
    da.make_lmdb_dataset(dataset, 'tests/test_data/_output_lmdb',
                         filter_fn=None, serialization_format='json',
                         include_bonds=False)
    # Try to load generated dataset
    new_dataset = da.load_dataset('tests/test_data/_output_lmdb', 'lmdb')
    assert len(new_dataset) == 4
    # Remove temporary files
    os.remove('tests/test_data/_output_lmdb/data.mdb')
    os.remove('tests/test_data/_output_lmdb/lock.mdb')
    os.rmdir('tests/test_data/_output_lmdb')
Esempio n. 2
0
from atom3d.datasets import load_dataset, make_lmdb_dataset
import sys

in_path = sys.argv[1]
out_path = sys.argv[2]

dataset = load_dataset(in_path, 'lmdb')

make_lmdb_dataset(dataset, out_path, filter_fn=lambda x: not x)