Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Find new names for confusing Atom attribute names (e.g., residId) #50

Open
charlestonchas opened this issue Nov 10, 2016 · 1 comment
Open
Assignees
Milestone

Comments

@charlestonchas
Copy link
Contributor

charlestonchas commented Nov 10, 2016

Attributes of class Atom are currently named using camelCase and include the lowercase name of the class, which can be redundant or clumsy

For example, if an Atom object is named atom1, accessing its attributes involves writing atom twice. Also, because "resid" was chosen instead of "residue" or "res", one has the unfortunate attribute name residId. Here are some current examples of referencing these attributes:

  • atom1.atomId # atom index number
  • atom1.atomType # CA, N, HN1, ...
  • atom1.atomElement # C, N, H, O, etc.
  • atom1.residId # residue number of the residue the atom is in
  • atom1.residType # LEU, ARG, ...
  • atom1.chainId # A, B, etc.
  • atom1.atomCharge # atom charge
  • atom1.extra # extra data

Suggested changes:

  • atom1.id # atom index number (*)
  • atom1.type # CA, N, HN1, ...
  • atom1.element # C, N, H, O, etc.
  • atom1.resid # residue number of the residue the atom is in
  • atom1.restype # LEU, ARG, ...
  • atom1.chainid # A, B, etc.
  • atom1.charge # atom charge
  • atom1.extra # extra data

* Note that id and type technically clash with the reserved python words, but I don't think they introduce very much chance of confusion.

@charlestonchas charlestonchas changed the title identifier change suggestion 1: residId --> resid or resID identifier change suggestion 1: residId --> resid or resID or resId Nov 10, 2016
@charlestonchas charlestonchas changed the title identifier change suggestion 1: residId --> resid or resID or resId identifier change suggestion: residId --> resid or resID or resId Nov 10, 2016
@charlestonchas charlestonchas added this to the Release 2.0.0 milestone Dec 7, 2016
@chantalprevost
Copy link

This an be modified when modifying the nomenclature. resId was the most appropriate with the former nomenclature.

@charlestonchas charlestonchas changed the title identifier change suggestion: residId --> resid or resID or resId Find new names for confusing Atom attribute names (e.g., residId) Jul 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants