Function manipulating CHFL_ATOMΒΆ

CHFL_ATOM * chfl_atom(const char * name)

Create an atom from an atomic name.

Return
A pointer to the new atom, or NULL in case of error
Parameters
  • name -

    The new atom name

CHFL_ATOM * chfl_atom_from_frame(const CHFL_FRAME * frame, size_t idx)

Get a specific atom from a frame.

Return
A pointer to the new atom, or NULL in case of error or if idx is out of bounds
Parameters
  • frame -

    The frame

  • idx -

    The atom index in the frame

CHFL_ATOM * chfl_atom_from_topology(const CHFL_TOPOLOGY * topology, size_t idx)

Get a specific atom from a topology.

Return
A pointer to the new atom, or NULL in case of error or if idx is out of bounds
Parameters
  • topology -

    The topology

  • idx -

    The atom index in the topology

int chfl_atom_mass(const CHFL_ATOM * atom, float * mass)

Get the mass of an atom, in atomic mass units.

Return
The status code
Parameters
  • atom -

    The atom

  • mass -

    The atom mass

int chfl_atom_set_mass(CHFL_ATOM * atom, float mass)

Set the mass of an atom, in atomic mass units.

Return
The status code
Parameters
  • atom -

    The atom

  • mass -

    The new atom mass

int chfl_atom_charge(const CHFL_ATOM * atom, float * charge)

Get the charge of an atom, in number of the electron charge e.

Return
The status code
Parameters
  • atom -

    The atom

  • charge -

    The atom charge

int chfl_atom_set_charge(CHFL_ATOM * atom, float charge)

Set the charge of an atom, in number of the electron charge e.

Return
The status code
Parameters
  • atom -

    The atom

  • charge -

    The new atom charge

int chfl_atom_name(const CHFL_ATOM * atom, char * name, size_t buffsize)

Get the name of an atom.

Return
The status code
Parameters
  • atom -

    The atom

  • name -

    A string buffer to be filled with the name

  • buffsize -

    The size of the string buffer

int chfl_atom_set_name(CHFL_ATOM * atom, const char * name)

Set the name of an atom.

Return
The status code
Parameters
  • atom -

    The atom

  • name -

    A null terminated string containing the new name

int chfl_atom_full_name(const CHFL_ATOM * atom, char * name, size_t buffsize)

Try to get the full name of an atom from the short name.

Return
The status code
Parameters
  • atom -

    The atom

  • name -

    A string buffer to be filled with the name

  • buffsize -

    The size of the string buffer

int chfl_atom_vdw_radius(const CHFL_ATOM * atom, double * radius)

Try to get the Van der Waals radius of an atom from the short name.

Return
The status code
Parameters
  • atom -

    The atom

  • radius -

    The Van der Waals radius of the atom or -1 if no value could be found.

int chfl_atom_covalent_radius(const CHFL_ATOM * atom, double * radius)

Try to get the covalent radius of an atom from the short name.

Return
The status code
Parameters
  • atom -

    The atom

  • radius -

    The covalent radius of the atom or -1 if no value could be found.

int chfl_atom_atomic_number(const CHFL_ATOM * atom, int * number)

Try to get the atomic number of an atom from the short name.

Return
The status code
Parameters
  • atom -

    The atom

  • number -

    The atomic number, or -1 if no value could be found.

CHFL_ATOM_TYPES enum

Available types of atoms.

Values:

  • CHFL_ATOM_ELEMENT = = 0 -

    Element from the periodic table of elements.

  • CHFL_ATOM_COARSE_GRAINED = = 1 -

    Coarse-grained atom are composed of more than one element: CH3 groups, amino-acids are coarse-grained atoms.

  • CHFL_ATOM_DUMMY = = 2 -

    Dummy site, with no physical reality.

  • CHFL_ATOM_UNDEFINED = = 3 -

    Undefined atom type.

int chfl_atom_type(const CHFL_ATOM * atom, chfl_atom_type_t * type)

Get the atom type.

Return
The status code
Parameters
  • atom -

    the atom to read

  • type -

    the type of the atom

int chfl_atom_set_type(CHFL_ATOM * atom, chfl_atom_type_t type)

Set the atom type.

Return
The status code
Parameters
  • atom -

    the atom to modify

  • type -

    the new type of the atom

int chfl_atom_free(CHFL_ATOM * atom)

Destroy an atom, and free the associated memory.

Return
The status code
Parameters
  • atom -

    The atom to destroy