libAtoms / QUIP

libAtoms/QUIP molecular dynamics framework: https://libatoms.github.io
347 stars 121 forks source link

Descriptor explanation #596

Open sthinius87 opened 1 year ago

sthinius87 commented 1 year ago

Just wanted to ask if there is a comprehensive or short explanation of the descriptor available in the code? descriptors.f95 I could not find it in the docs nor access it through "--help". Or do I need to through publications?

Many thanks

albapa commented 1 year ago

We've just submitted a manuscript that (among other things) explains some of the most commonly used descriptors that we have implemented. Once finalised, we'll also put this information on our documentation page. For now, if you let me know which one in particular you're interested in, I'll be more than happy to give a short overview.

sthinius87 commented 1 year ago

Thank you for the answer. I was just playing around, describing a polymer system. So far I got pretty accurate results (validation against forces energy and radial distribution functions) using a combination of distance2b, distance3b, angle3b (and soap). Since the last two descriptors seemed to be very expensive in the simulation time, I was looking for alternative descriptors, but I was afraid using them without knowing anything. If you have any suggestions, let me know. Otherwise I will wait util your paper is published.

albapa commented 1 year ago

Do you mean distance_nb?

The 3-body descriptors (angle_3b or distance_nb order=3) scale as the number of neighbours squared, therefore they're indeed more expensive than the 2-body descriptor (distance_2b or distance_nb order=2). What is the cutoff that you're using? Maybe for the 3-body terms a smaller cutoff is sufficient - this can save a lot of computational effort.

Otherwise, the soap descriptor when used with soap_exponent=1 (or equivalently zeta=1) behaves as a three-body descriptor. Depending on the your parameters and system, there will be a crossover between soap and the 3-body descriptors in computational time.

The 3-body descriptors still have the advantage that they're low dimensional and somewhat more interpretable than soap.

I hope this helps.

sthinius87 commented 1 year ago

Do you mean distance_nb? exactly with n=3

That is my gap-setup so far: gap={ \ distance_2b cutoff=4.5 covariance_type=ard_se delta=0.50 add_species=T n_sparse=11 sparse_method=uniform theta_uniform=1.0: \ distance_Nb order=3 cutoff=4.5 covariance_type=ard_se delta=0.50 add_species=T n_sparse=40 sparse_method=uniform theta_uniform=1.0: \ angle_3b cutoff=4.5 covariance_type=ard_se delta=0.50 add_species=T n_sparse=80 sparse_method=uniform theta_uniform=1.0: \ soap cutoff=4.0 covariance_type=dot_product zeta=4 delta=0.016 atom_sigma=0.7 l_max=4 n_max=8 n_sparse=90 sparse_method=cur_points}

I will try reducing cutoff for 3-body terms. Do you see any other DONT'S in the setup?

albapa commented 1 year ago

You definitely shouldn't need both distance_Nb order=3 and angle_3b.

sthinius87 commented 1 year ago

I was thinking the same. However it has an effect on the radial distribution functions. image

albapa commented 1 year ago

Interesting. You don't say what the dotted line means, though.

Perhaps keeping e.g. angle_3b and tweaking the parameters (mostly n_sparse, theta_uniform and delta) would help you recover the distance_Nb order=3 + angle_3b result.

sthinius87 commented 1 year ago

Interesting. You don't say what the dotted line means, though.

Well. That is the ab-initio reference (optB88-vdW). Same curve all through.

Thanks for help, @albapa

gabor1 commented 1 year ago

your deltas for the 3b are quite large. remember it's the expected energy per triplet! (and it's excess energy after the 2b is taken into account)