Skip to content

Using mapping instead of beads to specify coarse-graining rules doesn't fill in the complete topology information in the output GSD file. #82

Description

@chrisjonesBSU

The issue arises in CG_System because the _set_mapping method is called when you pass in beads, but it isn't called when passing in mapping instead.

        if beads is not None:
            # get compounds
            self._get_compounds(
                beads=beads,
                allow_overlap=allow_overlap,
                length_scale=length_scale,
                conversion_dict=conversion_dict,
                add_hydrogens=add_hydrogens,
                aniso_beads=aniso_beads,
            )

            # calculate the bead mappings for the entire trajectory
            self._set_mapping()
        elif mapping is not None:
            if not isinstance(mapping, dict):
                with open(mapping, "r") as f:
                    mapping = json.load(f)
            self.mapping = mapping

Inside the _set_mapping method, the bond information is populated, and this information is needed to infer angles and dihedrals as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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