Commit cd1e9528 by Maarten L. Hekkelman

residue::create_new_atom

parent 996f1e42
...@@ -350,7 +350,12 @@ class atom ...@@ -350,7 +350,12 @@ class atom
std::string get_pdb_ins_code() const { return get_property("pdbx_PDB_ins_code"); } ///< Return the pdb_ins_code property std::string get_pdb_ins_code() const { return get_property("pdbx_PDB_ins_code"); } ///< Return the pdb_ins_code property
/// Return true if this atom is an alternate /// Return true if this atom is an alternate
bool is_alternate() const { return not get_label_alt_id().empty(); } bool is_alternate() const
{
if (auto alt_id = get_label_alt_id(); alt_id.empty() or alt_id == ".")
return false;
return true;
}
/// Convenience method to return a string that might be ID in PDB space /// Convenience method to return a string that might be ID in PDB space
std::string pdb_id() const std::string pdb_id() const
...@@ -575,6 +580,10 @@ class residue ...@@ -575,6 +580,10 @@ class residue
m_auth_seq_id == rhs.m_auth_seq_id); m_auth_seq_id == rhs.m_auth_seq_id);
} }
/// @brief Create a new atom and add it to the list
/// @return newly created atom
virtual atom create_new_atom(atom_type inType, const std::string &inAtomID, point inLocation);
protected: protected:
/** @cond */ /** @cond */
residue() {} residue() {}
...@@ -675,6 +684,8 @@ class monomer : public residue ...@@ -675,6 +684,8 @@ class monomer : public residue
return m_polymer == rhs.m_polymer and m_index == rhs.m_index; return m_polymer == rhs.m_polymer and m_index == rhs.m_index;
} }
atom create_new_atom(atom_type inType, const std::string &inAtomID, point inLocation) override;
private: private:
const polymer *m_polymer; const polymer *m_polymer;
std::size_t m_index; std::size_t m_index;
...@@ -1094,6 +1105,9 @@ class structure ...@@ -1094,6 +1105,9 @@ class structure
/// \brief emplace the moved atom @a atom /// \brief emplace the moved atom @a atom
atom &emplace_atom(atom &&atom); atom &emplace_atom(atom &&atom);
/// \brief Reorder atom_site atoms based on 'natural' ordering
void reorder_atoms();
private: private:
friend polymer; friend polymer;
friend residue; friend residue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment