from polymetrizer import Polymetrizer, HYDROGEN_CAP
from polymetrizer.tests.smiles import ALA, SER, CYS, ACE, NME
from openff.toolkit.typing.engines.smirnoff import ForceField
met = Polymetrizer(monomers=dict(Ser=SER, Ala=ALA, Cys=CYS, Ace=ACE, Nme=NME),
caps=[ACE, NME],
r_linkages = {1: {2, 6}, 3: {4, 5}, 7: {2}, 8: {3}})
original_ff = ForceField("openff_unconstrained-1.3.0.offxml")
new_ff = met.polymetrize(original_ff,
n_neighbor_monomers=1, # builds tripeptides
n_overlapping_atoms=3,
# minimize before doing AM1BCC charges with MMFF
minimize_geometry=True,
# optimization too expensive, but if so....
optimize_geometry=False,
optimize_method="m06-2x/def2-TZVP",
)
offmol = met.oligomers[-1].to_openff()
new_ff.create_openmm_system(offmol.to_topology())
However, it's not finding some torsions. 😩
UnassignedProperTorsionParameterException: ProperTorsionHandler was not able to find parameters for the following valence terms:
- Topology indices (20, 16, 18, 33): names and elements ( N), ( C), ( C), ( H),
- Topology indices (13, 16, 18, 33): names and elements ( C), ( C), ( C), ( H),
- Topology indices (17, 16, 18, 33): names and elements ( H), ( C), ( C), ( H),
It's probably something to do with finding central nodes/indices vs caps.
I would like for this example to work:
However, it's not finding some torsions. 😩
It's probably something to do with finding central nodes/indices vs caps.