Skip to content

Conversation

YuuuXie
Copy link
Collaborator

@YuuuXie YuuuXie commented Aug 13, 2021

This pull request wraps up B1, B2, B3 descriptors into a Bk descriptor module. And should be merged after #12

  1. When initializing the descriptor, previous setting
descriptor_settings = [n_species, n_max, l_max]
desc = B2(..., descriptor_settings)

is equivalent to current setting

K = 2 # body order. K = 1 -> B1, K = 2 -> B2, K = 3 -> B3
descriptor_settings = [n_species, K, n_max, l_max]
desc = Bk(..., descriptor_settings)

The lammps files are changed correspondingly.

  1. Another feature: add atom_indices to sparse_gp.py/update_db and sparse_gp.cpp/add_training_structure to allow adding a subset of force labels, such that the Kuf matrix is smaller in the "f" dimension

Notes:

  1. To add descriptors with higher body order, just need to add coefficients (l1, l2, l3 ...; m1, m2, m3, ...) to coeffs.cpp and add indices (n1 l1 m1, n2 l2 m2, ... nk lk mk) in indices.cpp.

  2. The original b1/2/3.cpp are kept for unit test, but we could delete them and might find better way of doing this.

  • Finish unit test for lammps
  • Change compute command for variance to Bk descriptors

Todo

The lammps code can be further optimized:

  • The trick as Rewrite b2 lmp #12 is not implemented
  • The search of neighbor list and the computation of single bonds are duplicated for each kernel. But we can do it only once by using the maximal cutoff, n_max and l_max
  • put lammps B2 back to the code

@YuuuXie YuuuXie changed the title [WIP] Bk descriptors Bk descriptors Sep 7, 2021
@YuuuXie YuuuXie changed the base branch from master to like_grad_stable December 8, 2021 22:31
@YuuuXie YuuuXie changed the base branch from like_grad_stable to master December 8, 2021 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant