dscribe icon indicating copy to clipboard operation
dscribe copied to clipboard

SOAP computation hangs when `calc` is not `None` in ASE trajectory

Open tsitsvero opened this issue 2 years ago • 2 comments

Seems like there's a bug that hangs computations of SOAP descriptors when the input ASE trajectory snapshots have calculators assigned. Tried with dscribe 1.2.1.

for mol in mol_traj:
        mol.calc=XTB(method="GFN2-xTB")     
        ... # some calculations
        mol.calc=None # without this line SOAP calculation hangs...

soap = SOAP(
            species=["H", "C", "O"],
            periodic=False,
            rcut=5.0,
            sigma=0.5,
            nmax=5,
            lmax=5,
            average="outer",
            crossover=True,
            dtype='float64
            )


pos = [0,1,4,5]

derivatives, descriptors = soap.derivatives(
            mol_traj,
            positions=[pos] * len(mol_traj),
            n_jobs=10,
            # method="analytical"
            )

tsitsvero avatar Mar 08 '22 04:03 tsitsvero

That is quite interesting... DScribe is not directly using the calculator objects for anything, so I'm not sure where this is coming from. DScribe could always unassign the calc-property from the systems, but that does not seem right either if the user is not expecting this. Making a copy is an option but it may be quite expensive to do. Needs some thinking, but the workaround of unassigning the calc-property should do before there is a better fix.

lauri-codes avatar Aug 01 '22 19:08 lauri-codes

Thanks! I'll also let know if this problem will persist in the future.

tsitsvero avatar Aug 04 '22 09:08 tsitsvero