Run rocketsled together with atomate

rocketsled is a very exciting tool and I am curious on how to run it together with atomate for first-principles calculations.

For instance, we want to get the “global” minimum of a structure, which can be searched by varying initial positions of some atoms and carrying out DFT calculations for local structure optimization. Regarding the objective function y = f (x), y is the total energy and x is a list of atomic coordinates. The following is our preliminary thinking on the use of rocketsled/atomate.

  1. x_dim: the range of internal coordinates of certain atoms.

  2. definition of run_task:
    (1) The x vector is combined with other atomic coordinates (not variables but constants) to give the input structure.
    (2) create a workflow of structure optimization and do DFT calculations using the default settings of atomate. The data of total energy is then stored into MongoDB ( (db: dft) by Custodian automatically.
    (3) return y (the total energy) by making a query to the MongoDB (db: dft).

  3. definition of wf_creator:
    the same as in the rocketsled/examples/, where the db info is based on a new database (db: rsled).

  4. Setting and execution of MissionControl: similar to

I am not sure if the above thinking is practicable or not. Will the OptTask generate a x vector and run the same code as in the run_task? In my knowledge, rocketsled is an extension of FireWorks and running it with atomate (MongoDB/FireWorks/Custodian/Pymatgen) should be possible in principle.

I have been searching for sample python scripts on the integration of atomate/rocketsled, but haven’t found any yet. I would be very grateful to comments and suggestions. Thank you very much.

Hey Takeshi

Author of rocketsled here. That sounds like a good plan.

Your workflow creator should:

  1. take in the atomic coordinates x and get an atomate workflow based on that
  2. create a separate firework with OptTask in it (this way if your optimization fails for any reason, you can just rerun the firework without rerunning the DFT calculation) and add it to the workflow from (1).
  3. make sure the firework is receiving the x and y data via a FWAction (passing the data from a firework in (1) and that the data are written to the correct spec fields for OptTask (_x and _y)

Running rocketsled with atomate was actually one of the core objectives of developing rocketsled. Let us know how it goes, and ping this thread if you run into trouble! Just make sure to include some of your code so we can help you debug.