Bsoft 2.1.4
Bernard's software package
rwatomprop.cpp File Reference

Library routines to read and write atom properties. More...

#include "rwatomprop.h"
#include "star.h"
#include "mol_tags.h"
#include "linked_list.h"
#include "utilities.h"

Classes

struct  atom_type
 

Functions

Batomtyperead_atom_prop_star (Bstring &filename)
 
int write_atom_prop_star (Bstring &filename, Batomtype *at_first)
 
Batomtypeget_atom_properties (Bstring &filename)
 Reading atomic properties from parameter files. More...
 
int write_atom_properties (Bstring &filename, Batomtype *at)
 Writing atomic properties from parameter files. More...
 
Batomtypeatom_type_add (Batomtype **atype, const char *aname)
 Adds an atom type structure to a linked list. More...
 
int atom_type_kill (Batomtype *atype)
 Destroys an atom type. More...
 
map< string, int > atom_type_tags ()
 

Variables

int verbose
 

Detailed Description

Library routines to read and write atom properties.

Author
Bernard Heymann
Date
Created: 19991114
Modified: 20210214

Function Documentation

◆ atom_type_add()

Batomtype * atom_type_add ( Batomtype **  atype,
const char *  aname 
)

Adds an atom type structure to a linked list.

Parameters
**atypepointer to any atom type in the list.
*anameatom type name.
Returns
Batomtype* new atom type.
The function allocates memory for a new atom type structure.
If the content of the pointer is null, the new structure is
the first in the list. Otherwise, the end of the list is found
and the new structure added to it.

◆ atom_type_kill()

int atom_type_kill ( Batomtype atype)

Destroys an atom type.

Parameters
atypethe atom type.
Returns
int 0.

◆ atom_type_tags()

map< string, int > atom_type_tags ( )

◆ get_atom_properties()

Batomtype * get_atom_properties ( Bstring filename)

Reading atomic properties from parameter files.

Parameters
&filenamefile name (if empty, use a default file).
Returns
Batomtype* atom property structure, NULL on failure.

◆ read_atom_prop_star()

Batomtype * read_atom_prop_star ( Bstring filename)

◆ write_atom_prop_star()

int write_atom_prop_star ( Bstring filename,
Batomtype at_first 
)

◆ write_atom_properties()

int write_atom_properties ( Bstring filename,
Batomtype at 
)

Writing atomic properties from parameter files.

Parameters
&filenamefile name.
*atthe atom property structure.
Returns
int error code (<0 means failure).

Variable Documentation

◆ verbose

int verbose
extern