Skip to content

get_subtopology function missing when parameterize openmm system #39

@HaoLan-compchem

Description

@HaoLan-compchem

NameError Traceback (most recent call last)
Cell In[12], line 9
5 grappa_ff = OpenmmGrappa.from_tag('grappa-1.4.1-radical')
7 # Overwrite bonded parameters with those predicted by grappa.
8 # Grappa will neither change the ion or solvent nor the nonbonded parameters.
----> 9 system_1 = grappa_ff.parametrize_system(system_1, pdb.topology, plot_dir='.')

File ~/anaconda3/envs/grappa/lib/python3.10/site-packages/grappa/wrappers/openmm_wrapper.py:60, in OpenmmGrappa.parametrize_system(self, system, topology, exclude_residues, plot_dir, charge_model)
54 warnings.warn("The charge_model argument for OpenmmGrappa.parametrize_system is deprecated, has no effect and will be removed in the future.", DeprecationWarning)
56 # convert openmm_topology (and system due to partial charges and impropers) to a Molecule
57
58 # create a sub topology excluding certain residue names (e.g. water, ions)
59 # the atom.id of the atoms in this sub topology will be the same as the atom index in the original topology, i.e. as in the system.
---> 60 sub_topology = get_subtopology(topology, exclude_residues=exclude_residues)
62 molecule = Molecule.from_openmm_system(openmm_system=system, openmm_topology=sub_topology)
64 try:

NameError: name 'get_subtopology' is not defined

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions