chfl_atom type

type chfl_atom

A chfl_atom is a particle in the current chfl_frame. It stores the following atomic properties:

  • atom name;
  • atom type;
  • atom mass;
  • atom charge.

The atom name is usually an unique identifier (H1, C_a) while the atom type will be shared between all particles of the same type: H, Ow, CH3.

The initialization routine for chfl_atom are chfl_atom%init(), chfl_atom%from_frame() and chfl_atom%from_topology().

Type fields:
subroutine chfl_atom%init(name[, status])

Initialize this atom with the given name, and set the atom type to name.

Parameters:name [character,len=*] :: atom name
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%copy(atom[, status])

Initialize this atom with a copy of atom.

Parameters:atom [chfl_atom] :: atom to copy
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%from_frame(frame, i[, status])

Initialize this atom with a copy the atom at index i from a frame.

Parameters:
  • frame [chfl_frame] :: frame
  • i [integer] :: atom index in the frame
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_atom%from_topology(topology, i[, status])

Initialize this atom with a copy the atom at index i from a topology.

Parameters:
  • topology [chfl_topology] :: topology
  • idx [integer] :: atom index in the topology
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_atom%mass(mass[, status])

Get the mass of tah atom in mass. The mass is in atomic mass units.

Parameters:mass [real] :: atom mass
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%set_mass(mass[, status])

Set the mass of the atom to mass. The mass should be in atomic mass units.

Parameters:mass [real] :: new atom mass
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%charge(charge[, status])

Get the charge of the atom in charge. The charge is in number of the electron charge e.

Parameters:charge [real] :: The atom charge
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%set_charge(charge[, status])

Get the charge of the atom to charge. The charge should be in number of the electron charge e.

Parameters:charge [real] :: new atom charge
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%name(name, buffsize[, status])

Get the name of an atom in the string buffer name.

The buffer size must be passed in buffsize. This function will truncate the name to fit in the buffer.

Parameters:
  • name [character,len=buffsize] :: string buffer to be filled with the atom name
  • buffsize :: length of the string buffer
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_atom%set_name(name[, status])

Set the name of an atom to name.

Parameters:name [character,len=*] :: new atom name
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%full_name(name, buffsize[, status])

Get the full name of an atom from its type in the string buffer name.

The buffer size must be passed in buffsize. This function will truncate the name to fit in the buffer.

Parameters:
  • name [character,len=buffsize] :: string buffer to be filled with the atom full name
  • buffsize :: length of the string buffer
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_atom%type(type, buffsize[, status])

Get the type of an atom in the string buffer type.

The buffer size must be passed in buffsize. This function will truncate the type to fit in the buffer.

Parameters:
  • name [character,len=buffsize] :: string buffer to be filled with the atom type
  • buffsize :: length of the string buffer
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_atom%set_type(type[, status])

Set the type of an atom to type.

Parameters:name [character,len=*] :: new atom type
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%vdw_radius(radius[, status])

Get the Van der Waals radius of an atom from the atom type in radius.

If the radius in unknown, this function set radius to -1.

Parameters:radius [real] :: Van der Waals radius
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%covalent_radius(radius[, status])

Get the covalent radius of an atom from the atom type in radius.

If the radius in unknown, this function set radius to -1.

Parameters:radius [real] :: covalent radius
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%atomic_number(number[, status])

Get the atomic number of an atom from the atom type in number.

If the atomic number in unknown, this function set number to -1.

Parameters:number [integer] :: atomic number
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_atom%free([status])

Destroy an atom, and free the associated memory

Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.