Closed UnixJunkie closed 2 years ago
Yes, you need to do something like this:
molecules = ase_read(input_fn, "{}:{}".format(start, start + length))
soap_encoded_molecules = soap.transform(molecules)
soap_np_array = soap_encoded_molecules.get_features(soap)
This gives you a n_atoms x n_features
numpy array.
There are a handful more function to get the gradients of the representation, or some metadata describing the rows of the returned array.
The columns of the returned array are described by soap.get_feature_index_mapping()
Thanks a lot!
I gave it a try, but it prints me things like:
I was expecting a vector of floats.
My trial can be seen here: https://github.com/UnixJunkie/librascal/blob/SOAP_test_01/soap_test.py