Skip to content
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

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

Open
chrisjonesBSU opened this issue Sep 30, 2024 · 0 comments

Comments

@chrisjonesBSU
Copy link
Member

chrisjonesBSU commented Sep 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant