Open dishu1 opened 7 months ago
It looks like it worked fine until you changed the hydrogens?
How so? OpenMM does not know how to add hydrogens to NRQ unless specified in xml. I need to create the topology and assign forcefield parameters for the entire system, not for just one molecule.
The template-matching code has some requirements about the molecule's atoms and bond graph being the same when you call createSystem
as when the template generator is constructed. Then, you modified the topology, which may have modified the ligand, causing the template to no longer match the molecule it was constructed with. That's what the error message indicates.
At what moment did I modify the topology?
Actually, your error is different than it appeared at first glance. You're re-creating multiple objects from different sources and assigning them the same name which confused me. This didn't throw an error
modeller = Modeller(pdbfile.topology, pdbfile.positions)
....
system = forcefield.createSystem(modeller.topology, nonbondedMethod=PME, nonbondedCutoff=1.0*nanometer, rigidWater=True, constraints=HBonds)
which indicates that the molecule used to generate the template matches the one that's in the topology. But later on the same call does throw an error
modeller = Modeller(pdb.topology, pdb.positions)
...
system = forcefield.createSystem(modeller.topology)
which led me to believe you're modifying the topology. But it's a different topology altogether. Something differs between the mol
file you provided earlier (succeeds in template matching) and the ligand you have in the PDB file you use later on. Maybe a peptide bond?
Perhaps it is a peptide bond. I had to draw the ligand manually in Avogadro or something and then parameterize it. Also, it is confusing how exactly the ligand needs to be cut out to be parameterized. How to do all this properly?
Hello,
I'm trying to parameterize a fluorescent ligand in a protein using Espaloma template generator but I'm struggling to understand how to fix such an issue. It does not look self-explanatory and the documentation is almost absent. What do I do?
The output is truncated, of course.
Issue.zip