ACEsuit / ACE.jl

Parameterisation of Equivariant Properties of Particle Systems
65 stars 15 forks source link

combine(IP,c) with c vector from disk #5

Closed casv2 closed 4 years ago

casv2 commented 4 years ago

When reading a coefficients c vector from disk, combine(IP, c) should be converted from Any to Float64 first.

cortner commented 4 years ago

I don't see the problem in SHIPs. Does this happen when you read some coefficients other than through just saving and loading a potential? I.e., something along the lines of (pseudocode)

basis = constructmybasis(...)
c = fitthecoefficients(basis, data)
save(basis)
save(c)
basis = load()
c = load()
combine(basis, c)

? If this is the case, then I'm just going to be brutal and say it is the responsibility of the user to make sure the coefficients are converted correctly after reading from disk.

The following little trick will do the conversion automagically:

identity.(c)

Please just re-open if I've misunderstood.

cortner commented 4 years ago

P.S.: I've inserted the identity trick into a few places to make life a little easier. Should be available from 0.7.1 onwards.