Skip to content

graph generation file for formats without occupancy information #2

Description

@pegerto

Using main branch:

when a trajectory file do not contain occupancy,
and a developer try to generate graph
then graph generation file due expected occupancy information.

src/graphpro/graphgen.py:32: in generate
    G = rep.generate(self.ag, self.name)
src/graphpro/graphgen.py:20: in generate
    ca_position = ag.c_alphas_positions(self.chain)
src/graphpro/model.py:39: in c_alphas_positions
    return self._c_alphas(chain).positions
src/graphpro/model.py:29: in _c_alphas
    atoms_filtered = [ag[ag.occupancies.tolist().index(
src/graphpro/model.py:29: in <listcomp>
    atoms_filtered = [ag[ag.occupancies.tolist().index(
../ml/lib/python3.10/site-packages/MDAnalysis/core/groups.py:2537: in __getattr__
    return super(AtomGroup, self).__getattr__(attr)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <AtomGroup with 1 atom>, attr = 'occupancies'

    def __getattr__(self, attr):
        selfcls = type(self).__name__
        if attr in _TOPOLOGY_ATTRS:
            cls = _TOPOLOGY_ATTRS[attr]
            if attr == cls.singular and attr != cls.attrname:
                err = ('{selfcls} has no attribute {attr}. '
                       'Do you mean {plural}?')
                raise AttributeError(err.format(selfcls=selfcls, attr=attr,
                                                plural=cls.attrname))
            else:
                err = 'This Universe does not contain {singular} information'
>               raise NoDataError(err.format(singular=cls.singular))
E               MDAnalysis.exceptions.NoDataError: This Universe does not contain occupancy information


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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions