We first note that upon making the simple_snII project with ./project_make, the files my_rates.cpp and my_rates.h are copied from the projects/simple_snII/my_user_default/ directory to a directory projects/nucnet-tools-code/my_user/. This only happens, however, if the file my_rates.cpp does not already exist in projects/nucnet-tools-code/my_user/; thus, if you modify the files my_rates.cpp and my_rates.h in projects/nucnet-tools-code/my_user/, a subsequent re-making of the project will not overwrite those files.
The procedure to change or add reaction rate formulae is then simple. Add your rate formula to the files my_rates.cpp and my_rates.h in projects/nucnet-tools-code/my_user/. The rate expression must have the prototype
to interface with libnucnet properly. p_reaction is a pointer to a libnucnet reaction structure, d_t9 is the temperature in billions of Kelvins, and p_data is a pointer to a user-defined data structure. Your rate expression must return the rate per interacting multiplet of species. For the default my_rates.cpp, no extra data are required for the rate calculation. If your rate expression needs extra data, please refer to libnucnet documentation.
You will also need to register your rate function. The routine register_my_rate_functions in my_rates.cpp shows how to do that. Registering the rate function lets the network code know which routine to use to calculate the rate. You could, for example, have several rate expressions in my_rates.cpp for the same reaction but called by different names. The one you register will be the one used to compute the rate.
Finally, you will need to include the reaction in the input XML. For this project, the file n15_study_rates.xml in projects/nucnet-tools-code/data_pub/, downloaded as described here, contains the list of reactions to be updated. Note that it uses XInclude to include the data from individual files in the directory projects/nucnet-tools-code/data_pub/n15_study/. The individual files contain the data for the reaction. In the case of a rate formula, you give the reactants and products and then a user_rate key. The key is the same as that used to register the rate function. If you add a reaction to the list, you will need to add it to the main XML file of all updated reactions as well as creating an individual reaction file.
It is worth noting that the routines in my_rates.cpp are in the my_user namespace. The my_user directory and namespace are not version-controlled in NucNet Tools or this project. This prevents them from colliding with routines in the user directory and namespace, which are version-controlled. You can therefore place your versions of my_rates.cpp/h under your own version control and check them out in projects/nucnet-tools-code/my_user/.