Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model_devi | sort models in default&support user-defined order #610

Merged
merged 3 commits into from
Dec 8, 2021

Commits on Dec 7, 2021

  1. model_devi | sort models in default&support user-defined order

    current behavior:
    1)the list of models written in input.lammps for model_devi is created by "glob" without "sort" --> may give different (random) orders in different machine environments  --> would randomly alter the model being used to sample configurations (always use the first model written in imput.lammps)
    ---> could lead to unexpected performance, such as, when using together with "model_devi_activation_func" that allows four models to be nonequivalent.
    2)when preparing input.lammps from iuser-provided template, the line begin with "pair_style deepmd" will be overwritten by dpgen, thus overwrites the user defined order of models ---> could lead to unexpected performance, such as, when using together with "model_devi_activation_func" that allows four models to be nonequivalent and users indeed expected a specific order of models.
    
    changes:
    1)sorted the list of models in default, thus always use graph.000.pb to sample configurations;
    2)check weather user writes the full line of begin with "pair_style deepmd" (by checking the length),  if yes, leave it be; if not, overwrites with the default settings (use graph.000.pb to sample); besides, the original error trigger is retained if key words "pair_style deepmd" are not provided in the template.
    Vibsteamer committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    f9016c7 View commit details
    Browse the repository at this point in the history
  2. adjust space/tab

    Vibsteamer committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    19b681d View commit details
    Browse the repository at this point in the history
  3. adjust annotation

    Vibsteamer committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    388b8f1 View commit details
    Browse the repository at this point in the history