-
Notifications
You must be signed in to change notification settings - Fork 5
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
Espaloma performance #19
Comments
This is the code I used to obtain the parameters: off_mol = OFFMolecule.from_file("./BEN.sdf")
from espaloma_charge.openff_wrapper import EspalomaChargeToolkitWrapper
toolkit_registry = EspalomaChargeToolkitWrapper()
# Espaloma doesn't like conformations so remove it and add it back afterwards
conf = off_mol.conformers[0].copy()
del off_mol.conformers[0]
off_mol.assign_partial_charges(
"espaloma-am1bcc", toolkit_registry=toolkit_registry
)
off_mol.add_conformer(conf) # Add conformer back
top = off_mol.to_topology()
ff = ForceField("Sage")
mol2 = Interchange.from_smirnoff(
force_field=ff, topology=top, charge_from_molecules=[off_mol]
)
mol2.to_prmtop(tmpprm)
mol2.to_pdb(tmppdb)
prm = parmed.amber.AmberParameterSet.from_structure(parmed.load_file(tmpprm)) By the way, also the warning Espaloma gives (for which I'm deleting here the conformer) seems a bit excessive. It feels to me like it could just silently ignore the existence of conformers in the molecule.
|
Thanks for the detailed analysis, @stefdoerr! Could you also attach a ZIP file containing the
Yeah, that's weird---we'll look into where this warning is generated. We should just ignore conformers if present. |
Sure, here is the SDF file. Thanks! |
@stefdoerr : Hm, the charge RMS here is 0.098, which is not extraordinarily large, but it is in the tail of the EspalomaCharge for a molecule of this charge (left) and part of a second hump for molecules of this size (right; see red asterisk). The data shows that AmberTools is worse on average for molecules of this charge and size. In the Supporting Information, we explore some other evaluation metrics (some fast, some slow) that we could integrate into the loss function beyond just charge deviation L2 loss. The surprising impact of the modest charge deviations on the torsion profile suggests we should consider conformer electrostatic energies as well (cc @yuanqing-wang). |
Sorry I meant just the torsion constrained.
I checked, apparently it doesn't matter at all to AM1-BCC so you are right, it must be doing a minimization itself. In any case I have the feeling that the issue here is the resonance. Can you check if OpenEye gives same charges to all nitrogen Hs like AM1-BCC? |
Good point---we used the Other options, such as |
Hi, I just tested pure Espaloma (not espaloma_charge) version 0.3.1 and it gave symmetrical charges for my molecule. Does this mean this repo is deprecated? I have not seen here any significant development since January. Does Espaloma use the same method as espaloma_charge for the charge estimation? Is it trained on AM1-BCC charges? |
We are in the process of porting all the fixes back to espaloma_charge and retraining it on a superset of the espaloma 0.3.1 dataset! Apologies for the delay here---we were tied up with the CADD GRC until recently. Thanks again for the great issue report that led us to important fixes! |
@stefdoerr Thank you for this very detailed report! We are getting ready to release an updated version! |
Hi all and thanks for this repo!
I tried to evaluate on my favorite toy (Benzamidine) and I didn't get very good performance and was curious if you had any comment on it.
First of all the charges look very different from AM1-BCC charges (init here is Espaloma, fit is AM1-BCC)
Beyond that, if I use Espaloma charges for torsion scans of the C-C-C-N torsion I get very weird torsion profiles compared to AM1-BCC. Left: AM1-BCC, Right: Espaloma. Focus on the green curve which is the initial MM evaluation with Sage FF and AM1-BCC and Espaloma respectively. I find it concerning that it considers the barrier at 0 degrees the highest instead of the one at 90 degrees which is also shown by xTB to be the highest barrier.
The text was updated successfully, but these errors were encountered: