chfl_property
type¶chfl_property
¶A chfl_property
holds data used in properties in
chfl_frame
, chfl_atom
and chfl_residue
.
A property is associated with a name and can contain data of various types:
logical, real, string or 3 dimensional array (vector3d
). The property
kind is used to know which kind of data is stored in the property.
Type fields: |
|
---|
chfl_property%
init
(value[, status])¶This is a generic subroutine for initialization of a property. It allocate
memory which must be released with chfl_property%free()
.
value
can be a real number, a logical value, a string
(string
) or an 3-dimensional array of real numbers.
Options: | status [integer(chfl_status)] :: status code of the operation. If it is not
CHFL_SUCCESS , use chfl_last_error() to learn more
about the error. |
---|
chfl_property%
kind
([status])¶Get the property kind, a number indicating which type of value this property
holds. The possible kinds are represented by integer of the
chfl_property_kind
kind.
chfl_property_kind
[integer]¶Kind parameter for the integer values describing chfl_property
kinds.
CHFL_PROPERTY_BOOL
[integer(chfl_property_kind)]¶Kind used for logical
(bool
in C++) values.
CHFL_PROPERTY_DOUBLE
[integer(chfl_property_kind)]¶Kind used for real(real64)
(double
in C++) values.
CHFL_PROPERTY_STRING
[integer(chfl_property_kind)]¶Kind used for string
(std::string
in C++) values.
CHFL_PROPERTY_VECTOR3D
[integer(chfl_property_kind)]¶Kind used for real(real64), dimension(3)
(vector3d
in C++)
values.
Return: | integer (chfl_property_kind) |
---|---|
Options: | status [integer(chfl_status)] :: status code of the operation. If it
is not CHFL_SUCCESS , use chfl_last_error() to learn
more about the error. |
chfl_property%
bool
([status])¶Get the logical value stored in this property. If the property do not store
a logical value, status
will be CHFL_PROPERTY_ERROR
.
Return: | logical |
---|---|
Options: | status [integer(chfl_status)] :: status code of the operation. If it
is not CHFL_SUCCESS , use chfl_last_error() to learn
more about the error. |
chfl_property%
double
([status])¶Get the real value stored in this property. If the property do not store
a real value, status
will be CHFL_PROPERTY_ERROR
.
Return: | real [real64] |
---|---|
Options: | status [integer(chfl_status)] :: status code of the operation. If it
is not CHFL_SUCCESS , use chfl_last_error() to learn
more about the error. |
chfl_property%
string
([status])¶Get the string stored in this property. If the property do not store a
string, status
will be CHFL_PROPERTY_ERROR
. If the string is
longer than CHFL_STRING_LENGTH
, it will be truncated.
Return: | character (len=CHFL_STRING_LENGTH) |
---|---|
Options: | status [integer(chfl_status)] :: status code of the operation. If it
is not CHFL_SUCCESS , use chfl_last_error() to learn
more about the error. |
chfl_property%
vector3d
([status])¶Get the 3 dimensional array value stored in this property. If the property
do not store an array, status
will be CHFL_PROPERTY_ERROR
.
Return: | real [dimension(3), kind(real64)] |
---|---|
Options: | status [integer(chfl_status)] :: status code of the operation. If it
is not CHFL_SUCCESS , use chfl_last_error() to learn
more about the error. |
chfl_property%
free
()¶Destroy a property, and free the associated memory