OpenMS
Loading...
Searching...
No Matches
IonNaming.h File Reference
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/OpenMSConfig.h>
#include <cctype>
#include <climits>
#include <string>

Go to the source code of this file.

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::IonNaming
 Reading and writing the charge notation used in fragment ion names.
 

Functions

std::string chargeSuffix (int charge)
 The charge notation to append to an ion name, e.g. "+" for 1, "--" for -2.
 
int chargeFromName (const std::string &ion_name)
 The charge an ion name spells out, or 0 if it does not spell one.
 
std::string withCharge (const std::string &ion_name, int charge)
 The ion name to display for a peak annotated with ion_name and charge.
 
UInt ordinalFromName (const std::string &ion_name)
 The fragment ordinal an ion name spells out ("y12++" -> 12), or 0 if it does not spell one.
 

Variables

constexpr int MAX_REPEATED_SIGNS = 8
 Largest charge magnitude still written as a run of signs.