Documentation for module graphcon

uses a combination of graphs and hashing to determine if two molecules are topologically equivalent, and if so, finds the one by one mapping

source: graphcon.F
Loading...

public Types:

graph_type
...
vertex
...

public Subroutines/Functions:

hashes a molecule to a number. Molecules that are the (topologically) the same have the same hash. However, there is a small chance that molecules with the same hash are different
If two molecules are topologically the same, finds the ordering that maps the unordered one on the ordered one.

public Types:

TYPE :: graph_type

...


TYPE(vertex),
POINTER, DIMENSION(:) :: graph ...

TYPE :: vertex

...


INTEGER
:: kind ...
INTEGER,
POINTER, DIMENSION(:) :: bonds ...

SUBROUTINEhash_molecule(reference, kind_ref, hash)

hashes a molecule to a number. Molecules that are the (topologically) the same have the same hash. However, there is a small chance that molecules with the same hash are different

Arguments:
TYPE(vertex),
INTENT(in)
:: reference(:) IN : molecule with atomic kinds and bonds
INTEGER,
INTENT(out)
:: kind_ref(:) OUT : an atomic hash which is the same for topologically equivalent atoms
INTEGER,
INTENT(out)
:: hash OUT : a hash which is the same for topologically equivalent molecules

SUBROUTINEreorder_graph(reference, unordered, order, matches)

If two molecules are topologically the same, finds the ordering that maps the unordered one on the ordered one.

Arguments:
TYPE(vertex),
INTENT(in)
:: reference(:) molecular description (see type definition)
TYPE(vertex),
INTENT(in)
:: unordered(:) molecular description (see type definition)
INTEGER,
INTENT(out)
:: order(:) the mapping reference=order(unordred) if matches=.TRUE. undefined if matches=.FALSE.
LOGICAL,
INTENT(out)
:: matches .TRUE. = the ordering was found