# Class atom_type_traits

- Defined in File atom_type.hpp

## Nested Relationships

### Nested Types

- Struct atom_type_traits::SFData

## Class Documentation

class atom_type_traits

  A traits class to access information for known elements.

  Public Functions

  atom_type_traits(atom_type a)

    Constructor taking an atom_type a.

  atom_type_traits(const std::string &symbol)

    Constructor based on the element as a string in symbol.

  inline atom_type type() const

    Returns the atom_type.

  inline std::string name() const

    Returns the name of the element.

  inline std::string symbol() const

    Returns the symbol of the element.

  inline float weight() const

    Returns the average weight of the element.

  inline bool is_metal() const

    Returns true if the element is a metal.

  inline float radius(radius_type type = radius_type::single_bond) const

    Return the radius for the element, use type to select which radius to return.

    Parameters:

      type – The selector for which radius to return

    Returns:

      The requested radius or kNA if not known (or applicable)

  float crystal_ionic_radius(int charge) const

    Return the radius for a charged version of this atom in a solid crystal.

    Parameters:

      charge – The charge of the ion

    Returns:

      The radius of the ion

  float effective_ionic_radius(int charge) const

    Return the radius for a charged version of this atom in a non-solid environment.

    Parameters:

      charge – The charge of the ion

    Returns:

      The radius of the ion

  inline float ionic_radius(int charge, ionic_radius_type type = ionic_radius_type::effective) const

    Return the radius for a charged version of this atom, returns the effective radius by default.

    Parameters:

      - charge – The charge of the ion

      - type – The requested ion radius type

    Returns:

      The radius of the ion

  const SFData &wksf(int charge = 0) const

    Return the Waasmaier & Kirfel scattering factor values for the element.

    The coefficients from Waasmaier & Kirfel (1995), Acta Cryst. A51, 416-431.

    Parameters:

      charge – The charge for which the structure values should be returned, use kWSKFVal to return the Cval and Siva values

    Returns:

      The scattering factors as a SFData struct

  const SFData &elsf() const

    Return the electron scattering factor values for the element.

    Returns:

      The scattering factors as a SFData struct

  bool has_sf(int charge) const

    Clipper doesn’t like atoms with charges that do not have a scattering factor. And rightly so, but we need to know in advance if this is the case

  Public Static Functions

  static bool is_element(const std::string &symbol)

    Return true if the symbol in symbol actually exists in the list of known elements in atom_type.

  static bool is_metal(const std::string &symbol)

    Return true if the symbol in symbol exists and is a metal.

  Public Static Attributes

  static constexpr int kWKSFVal = -99

    to get the Cval and Siva scattering factor values, use this constant as charge:

  struct SFData

    data type encapsulating the scattering factors in a simplified form (only a and b).