Cartesius Library
buildparticle Module Reference

Data Types

interface  build_system
 
type  scfslg_group_line_data
 

Functions/Subroutines

subroutine init_from_old_data_noalloc (system, filename, input_format, laboratory, system_name, stat)
 Allocates and returns a new particle tree "system" from the existing data in various formats. More...
 
subroutine init_from_old_data (system, filename, input_format, laboratory, system_name, stat)
 allocates the polymorphic tree system and positions it in the origin of the laboratory frame. Next fills the the polymorphic tree system by data read from historical formats. If format is not supported deallocates system by this defining null system. 12.09.2021 ALT More...
 
procedure(build_system) function, pointer select_system_initer (input_format)
 
subroutine init_not_implemented (filename, system, stat)
 
subroutine init_from_poscar_or_adamas (filename, system, stat)
 
subroutine init_from_wxdragoninternal (filename, system, stat)
 
subroutine init_from_simplexyzwrittenbywxdragon (filename, system, stat)
 
subroutine init_from_ecf (filename, system, stat)
 
subroutine init_from_molcryst (filename, system, stat)
 
subroutine init_from_gaussianviewfragment (filename, system, stat)
 
subroutine init_from_catal (filename, system, stat)
 
subroutine init_from_geomo (filename, system, stat)
 
subroutine init_from_bfscf (filename, system, stat)
 
subroutine init_from_magiixtic (filename, system, stat)
 
subroutine init_from_bfecf (filename, system, stat)
 
subroutine init_from_mult (filename, system, stat)
 
subroutine init_from_scfslg_file (filename, system, stat)
 
subroutine read_cif (filename, atomicNumbers, atomicCoordinates, unit_cell)
 
subroutine read_poscar (filename, atomicNumbers, atomicCoordinates, unit_cell)
 
integer function getatomicnumberfromuppercasesymbol (Element_Identifier)
 
integer function getatomicnumberfromsymbol (Element_Identifier)
 
subroutine createatom (newAtom, NewAtomId, Atomic_Number, frame, shift)
 Function that creates an atom with given attributes and adds its location to the given frame's spaceTree. More...
 
subroutine createandaddatomtosystem (system, ParentID, NewAtomId, Atomic_Number, frame, shift, new_atom)
 Creates an atom with given atomic number, weight, and position and adds it to tree of the molecule: More...
 
subroutine displaceatom (atom, givenDisplacement)
 
subroutine add_origin_unit_cell (system)
 Creates origin unit cell and adds it to the list of attribute. It is required when one has to save input unit cell before optimization. More...
 
subroutine parse_sp_weights_bfscf (line, atoms_array, coefs, atom_ind, ios, sym_op)
 Parses the s- and p-weights and the corresponding atom from a *.bfscf-like line. More...
 

Variables

character(len=8), parameter, private default_system_name = 'molecule'
 

Function/Subroutine Documentation

◆ add_origin_unit_cell()

subroutine buildparticle::add_origin_unit_cell ( type(node), intent(inout)  system)

Creates origin unit cell and adds it to the list of attribute. It is required when one has to save input unit cell before optimization.

Note
Unit cell should be defined for the system.

◆ createandaddatomtosystem()

subroutine buildparticle::createandaddatomtosystem ( type(node), intent(inout), target  system,
character(len=*), intent(in)  ParentID,
character(len=*), intent(in)  NewAtomId,
integer, intent(in)  Atomic_Number,
type(point), intent(in), target  frame,
type(vector), intent(in)  shift,
type(particle), intent(out), optional, pointer  new_atom 
)

Creates an atom with given atomic number, weight, and position and adds it to tree of the molecule:

Here is the call graph for this function:

◆ createatom()

subroutine buildparticle::createatom ( type(particle), intent(out), pointer  newAtom,
character(len=*), intent(in)  NewAtomId,
integer, intent(in)  Atomic_Number,
type(point), intent(in), target  frame,
type(vector), intent(in)  shift 
)

Function that creates an atom with given attributes and adds its location to the given frame's spaceTree.

Parameters
newAtomResult of the procedure. atom of type particle.
NewAtomIdString with the ID of the atom.
Atomic_NumberThe atomic number. It will be written, along with the corresponding weight, to the list of its properties.
frameLaboratory, Atomic, etc. Specifies the frame within which the coordinates are given.
shiftAtom location within the local frame's coordinate system (explicitly assumed to be cartesian).
Attention
Creation of atoms currently assumes only one existing isotope for every atom.

◆ displaceatom()

subroutine buildparticle::displaceatom ( type(particle), intent(inout)  atom,
class(*), intent(in)  givenDisplacement 
)

◆ getatomicnumberfromsymbol()

integer function buildparticle::getatomicnumberfromsymbol ( character(len=2), intent(in)  Element_Identifier)

◆ getatomicnumberfromuppercasesymbol()

integer function buildparticle::getatomicnumberfromuppercasesymbol ( character(len=2), intent(in)  Element_Identifier)

◆ init_from_bfecf()

subroutine buildparticle::init_from_bfecf ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_bfscf()

subroutine buildparticle::init_from_bfscf ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Warning
DR 27.04.2021 We might want to introduce a new naming system. It is hard to find an atom by its number after the file has been read.
Note
For "*.bfscf" this currently adds all atoms as children of the whole system, since fragments are not implemented yet.
Why it is so? What id wrong with Multiplicity itself? Why not to define integer pElectronicGroupMultiplicity? 12.09.2021 ALT
Here is the call graph for this function:

◆ init_from_catal()

subroutine buildparticle::init_from_catal ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_ecf()

subroutine buildparticle::init_from_ecf ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_gaussianviewfragment()

subroutine buildparticle::init_from_gaussianviewfragment ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_geomo()

subroutine buildparticle::init_from_geomo ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_magiixtic()

subroutine buildparticle::init_from_magiixtic ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_molcryst()

subroutine buildparticle::init_from_molcryst ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Todo:
Needs to be expanded up to forming the particle containing the unit cell of Molecular crystal 12.09.2021 ALT
Here is the call graph for this function:

◆ init_from_mult()

subroutine buildparticle::init_from_mult ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_old_data()

subroutine buildparticle::init_from_old_data ( type(node), intent(out), allocatable, target  system,
character(len=*), intent(in)  filename,
character(len=*), intent(in)  input_format,
type(point), intent(inout), pointer  laboratory,
character(len=*), intent(in), optional  system_name,
integer, intent(out), optional  stat 
)

allocates the polymorphic tree system and positions it in the origin of the laboratory frame. Next fills the the polymorphic tree system by data read from historical formats. If format is not supported deallocates system by this defining null system. 12.09.2021 ALT

Note
Ilya, please have a look on the comments
Here is the call graph for this function:

◆ init_from_old_data_noalloc()

subroutine buildparticle::init_from_old_data_noalloc ( type(node), intent(out), target  system,
character(len=*), intent(in)  filename,
character(len=*), intent(in)  input_format,
type(point), intent(inout), pointer  laboratory,
character(len=*), intent(in), optional  system_name,
integer, intent(out), optional  stat 
)

Allocates and returns a new particle tree "system" from the existing data in various formats.

Todo:
Break up the cases into individual subroutines to make cleaner code

@Attention About spaceTree, since every node in the spaceTree ends with 'point', I think it makes sense to rename the 'root' node to 'rootpoint' and make sure the laboratory point's id is the same, maybe (see comment right above). If the spaceTree root node name is changed, 'organicum' will not compile because of one line. it can be found by searching for 'DR 30.09.2021'. CreateAtom and CreateAndAddAtomToSystem will not break, but I didn't check others. Moreover, we might want to add a key for 'root' either in Attributes or in polymorphic_tree_mod.

Todo:
Add a property to rootParticle that would allow to identify it as a fragment.
Here is the call graph for this function:

◆ init_from_poscar_or_adamas()

subroutine buildparticle::init_from_poscar_or_adamas ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_scfslg_file()

subroutine buildparticle::init_from_scfslg_file ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Todo:
Add check for correct geometry of unit cell for given space group
Todo:
Properly deallocate scfslg system in case of error during init.
Here is the call graph for this function:

◆ init_from_simplexyzwrittenbywxdragon()

subroutine buildparticle::init_from_simplexyzwrittenbywxdragon ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_from_wxdragoninternal()

subroutine buildparticle::init_from_wxdragoninternal ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)
Here is the call graph for this function:

◆ init_not_implemented()

subroutine buildparticle::init_not_implemented ( character(len=*), intent(in)  filename,
type(node), intent(inout), target  system,
integer, intent(out), optional  stat 
)

◆ parse_sp_weights_bfscf()

subroutine buildparticle::parse_sp_weights_bfscf ( character(len=*), intent(in)  line,
type(particle_ptr), dimension(:), intent(in), allocatable  atoms_array,
real, dimension(0:3), intent(out)  coefs,
integer, intent(out)  atom_ind,
integer, intent(out), optional  ios,
type(point), intent(out), optional  sym_op 
)

Parses the s- and p-weights and the corresponding atom from a *.bfscf-like line.

Parameters
lineCharacter string to be parsed
fragmentThe (sub)system in which the atom exists
cs,cpx,cpy,cpzThe s, px, py, pz coefficients
atom_indIndex of the atom whose hybrid coefficients are being calculated
ios(optional) The parsing state. 0 means normal calculation. 1, 2, 3 mean the corresponding atom's name has not been identified. 4 means the bfscf string was input incorrectly.
Here is the call graph for this function:

◆ read_cif()

subroutine buildparticle::read_cif ( character(len=*), intent(in)  filename,
integer, dimension(:), intent(out), allocatable  atomicNumbers,
real, dimension(:,:), intent(out), allocatable  atomicCoordinates,
type(unitcell), intent(inout)  unit_cell 
)
Here is the call graph for this function:

◆ read_poscar()

subroutine buildparticle::read_poscar ( character(len=*), intent(in)  filename,
integer, dimension(:), intent(out), allocatable  atomicNumbers,
real, dimension(:,:), intent(out), allocatable  atomicCoordinates,
type(unitcell), intent(inout)  unit_cell 
)
Here is the call graph for this function:

◆ select_system_initer()

procedure(build_system) function, pointer buildparticle::select_system_initer ( character(len=*), intent(in)  input_format)
Here is the call graph for this function:

Variable Documentation

◆ default_system_name

character(len=8), parameter, private buildparticle::default_system_name = 'molecule'
private