Running tests on a new model

Hi,

I want to run some tests on a modified version of a model which already exists on the OpenKIM database.
This modified version will likely go through more iterations of changes before it’s final version, so I don’t want to upload it to the OpenKIM database at this point.
Is there a best way to go about this? I already have the docker container running and am able to run tests on models already in the database

Thank you for any help,
Sebastian

Hi Sebastian!

Because you already have the Docker running and are able to run tests on existing OpenKIM models, this will be very easy for you. I think it is best explained with an example.

Let’s say I wanted to modify and test EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 in the Docker

I would just download the model to the docker using

kimitems install EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005

This puts the model as a directory in ~/models/
You can just look inside this directory and see how all the files are structured. The relevant ones for running a model locally are kimspec.edn, CMakeLists.txt and any parameter files. If it is a simulator model, you will also need to look at smspec.edn

To modify the model, just pick a new name and number, say EAM_Dynamo_Nikiforov_2023_Al__MO_000000666666_000 (our convention is to have the first 6 numbers be zero for in-development items)

Then make a renamed copy of the new directory and replace the old name with the new name in any files (you can delete build since you will be rebuilding the model). Make your changes to the parameter files.

Now you can do

kimitems build EAM_Dynamo_Nikiforov_2023_Al__MO_000000666666_000

and it will be installed in your Docker just like a proper KIM model.

Hopefully that explains it, let me know if you have any more questions!

Cheers, ilia

1 Like

Hi Ilia,

I appreciate the fast response!
I’ve got it working now, thank you for your help.

Best,
Sebastian

I’ve encountered an issue when running some tests.

I’ve been able to run LatticeConstantCubicEnergy_fcc_Ni__TE_155729527943_007 without any issue and it found a value for the lattice constant.

But when I now try and run CohesiveEnergyVsLatticeConstant_fcc_Ni__TE_887529368698_004 it fails to run as when it queries the database for a lattice constant value it doesn’t get a value:
Error: a_0 read in is empty. If using a query, check that it returns a non-empty value. Exiting…

I’ve tried querying the database through the python api and it returns [] for the lattice constant value.

I’m unsure of what to try to resolve this

Cheers,
Sebastian

Hi Sebastian,

Sorry for the slow response! I did not notice the message. This is because the Docker is trying to query openkim.org for the equilibrium lattice constant, but because you are using a model that is not on openkim.org, it gets an empty response.

You need to do the following sequence:

  1. Run the command
    pipeline-database set local
    This will tell the Docker to write to and read from a local database instead of openkim.org. Other useful commands: pipeline-database status pipeline-database delete
  2. Re-run LatticeConstantCubicEnergy_fcc_Ni__TE_155729527943_007, so it saves the result to the local database
  3. Re-run CohesiveEnergyVsLatticeConstant_fcc_Ni__TE_887529368698_004 . As long as the database is set to local, it should query correctly.

Hi Ilia,

Likewise!

All of the tests are running without any problems now.
Thank you for your help.

1 Like