Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/classes/structure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ int Structure::nAtoms(Atom::Presence withPresence) const
{ return i->isPresence(withPresence); });
}

// Return atom at index
StructureAtom *Structure::atomAt(int i) { return atoms_[i].get(); }

// Return atoms
const std::vector<std::unique_ptr<StructureAtom>> &Structure::atoms() const { return atoms_; }
std::vector<std::unique_ptr<StructureAtom>> &Structure::atoms() { return atoms_; }
Expand Down
2 changes: 2 additions & 0 deletions src/classes/structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ class Structure : public Serialisable<>
void removeAtoms(const std::vector<const StructureAtom *> &atoms);
// Return the number of atoms
int nAtoms(Atom::Presence withPresence = Atom::Presence::Any) const;
// Return atom at index
StructureAtom *atomAt(int i);
// Return atoms
const std::vector<std::unique_ptr<StructureAtom>> &atoms() const;
std::vector<std::unique_ptr<StructureAtom>> &atoms();
Expand Down
Loading
Loading