seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
seams::Fingerprint Class Reference

Owned topological fingerprint. More...

#include <include/seams.hpp>

Inheritance diagram for seams::Fingerprint:

Public Member Functions

std::string key () const
 Frame fingerprint text.
std::string atom (int index) const
 Local key of one atom.
std::vector< int > rings () const
 Primitive-ring census stored on the fingerprint.
Public Member Functions inherited from seams::detail::Handle< seams_topo, seams_fingerprint_destroy >
 Handle ()=default
Handle & operator= (const Handle &)=delete
 ~Handle ()
 operator bool () const noexcept

Additional Inherited Members

Protected Member Functions inherited from seams::detail::Handle< seams_topo, seams_fingerprint_destroy >
seams_topo * get () const noexcept
void reset () noexcept
Protected Attributes inherited from seams::detail::Handle< seams_topo, seams_fingerprint_destroy >
seams_topo * ptr_

Detailed Description

Owned topological fingerprint.

Definition at line 837 of file seams.hpp.

Member Function Documentation

◆ atom()

std::string seams::Fingerprint::atom ( int index) const
inlinenodiscard

Local key of one atom.

Parameters
indexAtom index in the frame.
Returns
The local key.

Definition at line 858 of file seams.hpp.

858 {
859 std::size_t n_out = 0;
860 detail::check(seams_fingerprint_atom(get(), index, nullptr, 0, &n_out), get());
861 std::string text(n_out + 1, '\0');
862 detail::check(seams_fingerprint_atom(get(), index, text.data(), text.size(), &n_out), get());
863 text.resize(n_out);
864 return text;
865 }
SEAMS_API seams_status seams_fingerprint_atom(const seams_topo *fp, int index, char *buf, size_t cap, size_t *n_out)
Local key of one atom.
void check(int status, const void *handle)
Definition seams.hpp:557

◆ key()

std::string seams::Fingerprint::key ( ) const
inlinenodiscard

Frame fingerprint text.

Returns
The key, without a trailing NUL.

Definition at line 845 of file seams.hpp.

845 {
846 return detail::copy_text(
847 [](const void *handle, char *buf, std::size_t cap, std::size_t *n_out) {
848 return seams_fingerprint_key(static_cast<const seams_topo *>(handle), buf, cap, n_out);
849 },
850 get());
851 }
SEAMS_API seams_status seams_fingerprint_key(const seams_topo *fp, char *buf, size_t cap, size_t *n_out)
Frame key text.
struct seams_topo seams_topo
Topological fingerprint of one bonded frame.
Definition seams.h:251
std::string copy_text(Call call, const void *handle)
Definition seams.hpp:597

◆ rings()

std::vector< int > seams::Fingerprint::rings ( ) const
inlinenodiscard

Primitive-ring census stored on the fingerprint.

Returns
counts[k] is the number of rings of size k. Length 13.

Definition at line 871 of file seams.hpp.

871 {
872 std::vector<int> counts(13);
873 detail::check(seams_fingerprint_rings(get(), counts.data(), counts.size()), get());
874 return counts;
875 }
SEAMS_API seams_status seams_fingerprint_rings(const seams_topo *fp, int *counts, size_t counts_len)
Primitive-ring census stored on the fingerprint.

The documentation for this class was generated from the following file: