Skip to content

PDB Parsers should provide an elements attribute #2647

@AmeyaHarmalkar

Description

@AmeyaHarmalkar

Elements attribute in PDBParser

Related to #2423, #2553 and #2630, the PDBParser does not provide an elements attribute. Primarily have an attribute to define the element of an atom as per the periodic table.

>>> import MDAnalysis as mda
>>> from MDAnalysis.tests.datafiles import *
>>> u = mda.Universe(PDB)
>>> u.atoms.elements
array(['N', 'C', 'C', 'O', 'C', 'Cu', 'Fe', 'Ca'], dtype=object)

Elements class exists and enforcing elements would be needed.

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