Hello everyone,
I am learning how to use Forcebalance. I can't understand the weight setting, because there are weight, w_rho, and rho_denom. What do these parameters mean? especially the rho_denom in data.csv.
I have done a few attempts, and I have found that the weight was the weight of target and the w_rho was the weight of density in targets/Liquid. But I haven't understand the rho_denom.
And how to set the weight of the energy and force (QM data) ?
Thanks in advance!
Best wishes,
Huanxi
About weight setting
- Lee-Ping Wang
- Posts: 102
- Joined: Sun Jun 19, 2011 5:14 pm
Re: About weight setting
Hello Huanxi,
It's great to hear that you're interested in using ForceBalance!
The weights and denominators are mathematically similar in the thermodynamic property optimization, though conceptually they are different. The overall pre-factor in the objective function for each property, "rho" for example, goes as w_rho / d_rho**2. So if you increase rho_denom by a factor of 2, and also increase w_rho by a factor of 4, the effect is exactly the same (assuming you are not normalizing the w's, which I believe is the default).
As for setting the weight of energy vs. force, the approach I usually use is to set them equal to each other, or set the weights so that the contributions of the energy and force terms are roughly equal at the start of the optimization. But for some functional forms, you might always have a very large force error, and you may prefer to just fit energies. There is no "best choice" as far as I know. There are also a whole field of "force matching" where the forces alone are fitted. I think this is because there are many functional forms where the forces are linear in the parameters, and you can achieve the optimum fit without having to do a nonlinear optimization.
Thanks,
- Lee-Ping
It's great to hear that you're interested in using ForceBalance!
The weights and denominators are mathematically similar in the thermodynamic property optimization, though conceptually they are different. The overall pre-factor in the objective function for each property, "rho" for example, goes as w_rho / d_rho**2. So if you increase rho_denom by a factor of 2, and also increase w_rho by a factor of 4, the effect is exactly the same (assuming you are not normalizing the w's, which I believe is the default).
As for setting the weight of energy vs. force, the approach I usually use is to set them equal to each other, or set the weights so that the contributions of the energy and force terms are roughly equal at the start of the optimization. But for some functional forms, you might always have a very large force error, and you may prefer to just fit energies. There is no "best choice" as far as I know. There are also a whole field of "force matching" where the forces alone are fitted. I think this is because there are many functional forms where the forces are linear in the parameters, and you can achieve the optimum fit without having to do a nonlinear optimization.
Thanks,
- Lee-Ping
Re: About weight setting
Hello Lee-ping,
Thank you for that. I can't follow you. What does "the overall pre-factor in the objective function" mean? The objective function = w_rho / d_rho**2 * (rho_cal - rho_exp) + w_hvap / d_hvap**2 * (hvap_cal - hvap_exp)... + w_energy /d_energy**2 * (energy_cal - energy_QM), is it?
I have another question. The normalize_weights has been set to false in input file, why does the output file print "Weights have been renormalized to 1.0 Physical quantity Density uses denominator = 2.0000 "? And the density contribution =weight * ( rho_cal - rho_exp), the weight is equal to 1.
Thank you very much!
Huanxi.
Thank you for that. I can't follow you. What does "the overall pre-factor in the objective function" mean? The objective function = w_rho / d_rho**2 * (rho_cal - rho_exp) + w_hvap / d_hvap**2 * (hvap_cal - hvap_exp)... + w_energy /d_energy**2 * (energy_cal - energy_QM), is it?
I have another question. The normalize_weights has been set to false in input file, why does the output file print "Weights have been renormalized to 1.0 Physical quantity Density uses denominator = 2.0000 "? And the density contribution =weight * ( rho_cal - rho_exp), the weight is equal to 1.
Thank you very much!
Huanxi.