toolPhysic

toolPhysic — introduce physical values for the chemical species.

Functions

Types and Values

enum ToolUnits

Description

This is a data base associating symbol names and atomic numbers. One can also get the covalent radius of chemical species. It is convenient to plot bindings.

Functions

tool_physic_getSymbolFromZ ()

gboolean
tool_physic_getSymbolFromZ (gchar **name,
                            float *radcov,
                            float *mass,
                            int zele);

Get the symbol or the covalence radius of the argument zele .

Parameters

name

a pointer on an unallocated string (can be NULL) ;.

[out][allow-none]

radcov

a pointer on a float (can be NULL) ;.

[out][allow-none]

mass

a pointer on a float (can be NULL) ;.

[out][allow-none]

zele

the atomic number.

 

Returns

TRUE if zele is known in the atomic built-in list.


tool_physic_getZFromSymbol ()

gboolean
tool_physic_getZFromSymbol (int *zele,
                            float *radcov,
                            float *mass,
                            const gchar *symbol);

Get the the covalence radius or the atomic number of a given atomic symbol .

Parameters

zele

a pointer on an integer (can be NULL) ;.

[out][allow-none]

radcov

a pointer on a float (can be NULL) ;.

[out][allow-none]

mass

a pointer on a float (can be NULL) ;.

[out][allow-none]

symbol

the symbol of an atom.

 

Returns

TRUE if symbol is known in the atomic built-in list.


tool_physic_getUnitNames ()

const gchar **
tool_physic_getUnitNames (void);

It provides the names corresponding to each units.

Returns

an array, null terminated of strings. It is owned by V_Sim.

[transfer none][array zero-terminated=1]

Since: 3.5


tool_physic_getUnitLabel ()

const gchar *
tool_physic_getUnitLabel (ToolUnits unit);

This routine provides the label representing the unit, not its name, see tool_physic_getUnitNames().

Parameters

unit

a given unit.

 

Returns

a UTF8 string, not translated.

Since: 3.8


tool_physic_getUnitValueInMeter ()

float
tool_physic_getUnitValueInMeter (ToolUnits unit);

It provides the factor used to transform unit into meters.

Parameters

unit

a ToolUnits.

 

Returns

a factor.

Since: 3.5


tool_physic_getUnitConversionFactor ()

float
tool_physic_getUnitConversionFactor (ToolUnits from,
                                     ToolUnits to);

Retrieve the factor used to convert from from to to .

Parameters

from

a ToolUnits.

 

to

a ToolUnits.

 

Returns

a factor.

Since: 3.8


tool_physic_getUnitFromName ()

ToolUnits
tool_physic_getUnitFromName (const gchar *name);

Find the unit corresponding to the name . If none is found, TOOL_UNITS_UNDEFINED is returned.

Parameters

name

a unit name.

 

Returns

a ToolUnits.

Since: 3.5

Types and Values

enum ToolUnits

The possible length units defined in V_Sim. The special case TOOL_UNITS_UNDEFINED means that a unit must be defined before any conversion operations may be done.

Members

TOOL_UNITS_UNDEFINED

the units are undefined.

 

TOOL_UNITS_BOHR

the length are given in Bohr (1ang = 0.529177Bohr);

 

TOOL_UNITS_ANGSTROEM

the length are given in angstroems ;

 

TOOL_UNITS_NANOMETER

the length are given in nanometers.

 

TOOL_UNITS_N_VALUES

private.

 

Since: 3.5