stk.O

class stk.O(id, charge=0)[source]

Bases: AtomImpl

Initialize an Atom.

Parameters:
  • id (int) – The id of the atom.

  • atomic_number – The atomic number.

  • charge (int) – The formal charge.

Methods

clone

Return a clone.

get_atomic_number

Get the atomic number of the atom.

get_charge

Get the charge of the atom.

get_id

Get the id of the atom.

with_id

Get a clone but with a different id.

clone()[source]

Return a clone.

Returns:

The clone.

Return type:

O

get_atomic_number()

Get the atomic number of the atom.

Returns:

The atomic number.

Return type:

int

get_charge()

Get the charge of the atom.

Returns:

The charge.

Return type:

int

get_id()

Get the id of the atom.

Returns:

The id.

Return type:

int

with_id(id)[source]

Get a clone but with a different id.

Parameters:

id (int) – The id of the clone.

Returns:

A clone with a new id.

Return type:

O