IGMPlot: src/reader.cpp File Reference

IGMPlot 3.16 Optimized IGMplot version able to use wfn/wfx/xyz files

Loading...
Searching...
No Matches
Functions | Variables
reader.cpp File Reference

Implementation of methods declared in reader.h. More...

`#include <reader.h>`
Include dependency graph for reader.cpp:

## Functions
int | conversionAtom (std::string &tmp)
| This function is used to convert an atom name in char into an integer. Note that the integer corresponds to the atomic number of the atom minus one to fit easily with the C indexes.
int | conversionParam (std::string &param)
| This function is used to convert a type of parameter from string to int so it may be used in a switch case.
bool | isANumber (const std::string &s)
| This function is used to check whether a string is a number or not.
void | readParam (const char *parameterFileName, param_t *params)
| Read the file param.nci.
ProgData * | readxyzMinMax (param_t *params)
| Reads files (.xyz) and find the Min (MinX,MinY,MinZ) and the Max (MinX,MinY,MinZ)
bool | isWFmodeActivated ()
| Tool function which indicates if the current calculus is based on wfn/wfx/rkf files.
bool | isWFXmodeActivated ()
| Tool function which indicates if the current calculus is based on wfx file.
bool | isWFNmodeActivated ()
| Tool function which indicates if the current calculus is based on wfn file.
bool | isRKFmodeActivated ()
| Tool function which indicates if the current calculus is based on rkf file.
bool | isIBSImodeActivated ()
| Tool function which indicates if the current calculus uses IBSI mode.
bool | isELFmodeActivated ()
| Tool function which indicates if ELF analysis is to be performed.
bool | isfullAOAccActivated ()
| Indicates if full accuracy is used for AO calculations.
bool | isHirshmodeActivated ()
| Tool function which indicates if the current calculus uses Hirsh mode.
bool | isCriticmodeActivated ()
| Tool function which indicates if the current calculus uses Critic mode.
bool | isdgSCALED ()
| Tool function which indicates if the dgSCALED mode is enabled.
bool | isParseRKF ()
| Tool function which indicates if RKF has to be parsed without grid calculation.
bool | isPauli ()
| Tool function which indicates if The Pauli exchange has to be estimated.
bool | isPauliAtomic ()
| Tool function which indicates if The Pauli exchange has to be estimated with atomic contrib.
bool | isCriticMEDIUMmodeActivated ()
| Tool function which indicates if the current calculus uses CriticMEDIUM mode.
bool | isCriticFINEmodeActivated ()
| Tool function which indicates if the current calculus uses CriticFINE mode.
bool | isCriticULTRAFINEmodeActivated ()
| Tool function which indicates if the current calculus uses CriticULTRAFINE mode.
bool | isCriticAddSeedsmodeActivated ()
| Tool function which indicates if additional seeds are use for cp search.
bool | isPeakFocusIntraActivated ()
| Tool function which indicates if a peakFocusIntra has been required by user.
bool | isPeakFocusInterActivated ()
| Tool function which indicates if a peakFocusInter has been required by user.
void | setFrag (const std::string definition, const param_types_t FRAG, const int nbAtoms)
| This function is used to ascribe FRAG atom indexes from string definition given in param.igm input file.
bool | isInMoleculeA (unsigned int atomNaturalIndex)
| Function which indicated if the given atom (natural index coming from WFN file) belongs to molecule A.
bool | isInMoleculeB (unsigned int atomNaturalIndex)
| Function which indicated if the given atom (natural index coming from WFN file) belongs to molecule B.
std::string | getMoleculeAatomDefinition ()
| Tool function which returns a string description of the FRAG1 atoms (given in param.igm)
std::string | getMoleculeBatomDefinition ()
| Tool function which returns a string description of the FRAG2 atoms (given in param.igm)
unsigned int | wfn_getMoleculeAnbAtoms ()
| Tool function which indicates the number of atoms in molecule A.
unsigned int | wfn_getMoleculeBnbAtoms ()
| Tool function which indicates the number of atoms in molecule B.
std::string | getCondensedDescriptionOfMoleculeA ()
| Function which returns the description of atoms included in molecule A.
std::string | getCondensedDescriptionOfMoleculeB ()
| Function which returns the description of atoms included in molecule B.
void | howUsingIGMplot ()
| Tool function which prints how the application can be launched.
std::vector< std::pair< unsigned int, unsigned int > > & | getChosenBonds ()
| Function to gain access to the chosen bonds.
bool | atomBondsHaveBeenRegistered ()
| Tool function which indicates if atom bonds have been registered.
void | checkKeywords (param_t *params)
| Function to check the keywords compatibility.

## Variables
bool | wfMode =false
| Flag to indicate if we are using wfn/wfx files or not.
bool | wfxMode =false
| Flag to indicate if we are using wfx files or not.
bool | wfnMode =false
| Flag to indicate if we are using wfn files or not.
bool | rkfMode =false
| Flag to indicate if we are using rkf files or not.
bool | parseRKF =false
| Flag to indicate if we are parsing rkf without grid calculation.
bool | pauli =false
| Flag to indicate if the Pauli exchange is to be estimated.
bool | pauliatomic =false
| Flag to indicate if the Pauli exchange is to be estimated with atomic contributions.
bool | ibsiMode =false
| Flag to indicate if we are using the IBSI mode.
bool | elfMode =false
| Flag to indicate if we are using the ELF mode.
bool | HirshMode =false
| Flag to indicate if we are using the HIRSH mode.
bool | CriticMode =false
| Flag to indicate if we are searching for critical points.
bool | dgSCALED =false
| Flag to indicate if the dgSCALED mode is enabled.
bool | fullaoaccMode =false
| Flag to indicate if the full level of accuracy is enabled for AO calculation.
bool | CriticMEDIUMMode =true
bool | CriticFINEMode =false
bool | CriticULTRAFINEMode =false
bool | CriticAddSeedsMode =false
bool | peakFocusIntra =false
| Flag to indicate if we the user has defined a peakfocus.
bool | cubeIncrement = false
| Flag to indicate if increment have been set for a cube.
bool | frag1Defined =false
| Flag to indicate if FRAG1/FRAG2 are defined.
bool | setLIGAND =false
| Flag to indicate if the user has provided the index of the ligand within the set of two supplied fragments.
std::set< int > | moleculeAatoms
| The value associated to the keyword MOL2ID.
std::set< int > | moleculeBatoms
std::string | moleculeAatomDefinition
| The original user definition of the molecule A.
std::vector< std::pair< unsigned int, unsigned int > > | chosenBonds
| The chosen bond i.e. pair of indexes.

## Detailed Description

Implementation of methods declared in reader.h.

## Function Documentation

## ◆ atomBondsHaveBeenRegistered()

bool atomBondsHaveBeenRegistered | ( |  | ) |

Tool function which indicates if atom bonds have been registered.

Returns
  True if one or more bonds have been registered

Here is the caller graph for this function:

## ◆ checkKeywords()

void checkKeywords | ( | param_t * | params | ) |

Function to check the keywords compatibility.

Parameters

  params | The object gathering data read from param.igm

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ conversionAtom()

int conversionAtom | ( | std::string & | tmp | ) |

This function is used to convert an atom name in char into an integer. Note that the integer corresponds to the atomic number of the atom minus one to fit easily with the C indexes.

Parameters

  tmp | : the atomic symbole in char*.

Here is the caller graph for this function:

## ◆ conversionParam()

int conversionParam | ( | std::string & | param | ) |

This function is used to convert a type of parameter from string to int so it may be used in a switch case.

Parameters

  param | : the parameter as a string.

Returns
  the parameter as an integer.

Here is the caller graph for this function:

## ◆ getChosenBonds()

std::vector< std::pair< unsigned int, unsigned int > > & getChosenBonds | ( |  | ) |

Function to gain access to the chosen bonds.

Returns
  The wanted registered bonds

Here is the caller graph for this function:

## ◆ getCondensedDescriptionOfMoleculeA()

std::string getCondensedDescriptionOfMoleculeA | ( |  | ) |

Function which returns the description of atoms included in molecule A.

Returns
  The wanted description (compute at each call)

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getCondensedDescriptionOfMoleculeB()

std::string getCondensedDescriptionOfMoleculeB | ( |  | ) |

Function which returns the description of atoms included in molecule B.

Returns
  The wanted description (compute at each call)

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ getMoleculeAatomDefinition()

std::string getMoleculeAatomDefinition | ( |  | ) |

Tool function which returns a string description of the FRAG1 atoms (given in param.igm)

Returns
  The string description

Here is the caller graph for this function:

## ◆ getMoleculeBatomDefinition()

std::string getMoleculeBatomDefinition | ( |  | ) |

Tool function which returns a string description of the FRAG2 atoms (given in param.igm)

Returns
  The string description

Here is the caller graph for this function:

## ◆ isANumber()

bool isANumber | ( | const std::string & | s | ) |

This function is used to check whether a string is a number or not.

Parameters

  s | : the string to check.

Returns
  true if the string was a number, false otherwise.

## ◆ isCriticAddSeedsmodeActivated()

bool isCriticAddSeedsmodeActivated | ( |  | ) |

Tool function which indicates if additional seeds are use for cp search.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isCriticFINEmodeActivated()

bool isCriticFINEmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses CriticFINE mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isCriticMEDIUMmodeActivated()

bool isCriticMEDIUMmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses CriticMEDIUM mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isCriticmodeActivated()

bool isCriticmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses Critic mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isCriticULTRAFINEmodeActivated()

bool isCriticULTRAFINEmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses CriticULTRAFINE mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isdgSCALED()

bool isdgSCALED | ( |  | ) |

Tool function which indicates if the dgSCALED mode is enabled.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isELFmodeActivated()

bool isELFmodeActivated | ( |  | ) |

Tool function which indicates if ELF analysis is to be performed.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isfullAOAccActivated()

bool isfullAOAccActivated | ( |  | ) |

Indicates if full accuracy is used for AO calculations.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isHirshmodeActivated()

bool isHirshmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses Hirsh mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isIBSImodeActivated()

bool isIBSImodeActivated | ( |  | ) |

Tool function which indicates if the current calculus uses IBSI mode.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isInMoleculeA()

bool isInMoleculeA | ( | unsigned int | atomNaturalIndex | ) |

Function which indicated if the given atom (natural index coming from WFN file) belongs to molecule A.

Parameters

  atomNaturalIndex | The atom index

Returns
  true if the atom is in molecule A

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ isInMoleculeB()

bool isInMoleculeB | ( | unsigned int | atomNaturalIndex | ) |

Function which indicated if the given atom (natural index coming from WFN file) belongs to molecule B.

Parameters

  atomNaturalIndex | The atom index

Returns
  true if the atom is in molecule B

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ isParseRKF()

bool isParseRKF | ( |  | ) |

Tool function which indicates if RKF has to be parsed without grid calculation.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isPauli()

bool isPauli | ( |  | ) |

Tool function which indicates if The Pauli exchange has to be estimated.

Returns
  True if Pauli exchange has to be estimated

Here is the caller graph for this function:

## ◆ isPauliAtomic()

bool isPauliAtomic | ( |  | ) |

Tool function which indicates if The Pauli exchange has to be estimated with atomic contrib.

Returns
  True if Pauli exchange has to be estimated

Here is the caller graph for this function:

## ◆ isPeakFocusInterActivated()

bool isPeakFocusInterActivated | ( |  | ) |

Tool function which indicates if a peakFocusInter has been required by user.

Returns
  True if PEAKFOCUSINTER keyword found in param.igm

Here is the caller graph for this function:

## ◆ isPeakFocusIntraActivated()

bool isPeakFocusIntraActivated | ( |  | ) |

Tool function which indicates if a peakFocusIntra has been required by user.

Returns
  True if PEAKFOCUSINTRA keyword found in param.igm

Here is the caller graph for this function:

## ◆ isRKFmodeActivated()

bool isRKFmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus is based on rkf file.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isWFmodeActivated()

bool isWFmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus is based on wfn/wfx/rkf files.

Returns
  The value of the corresponding flag

Here is the caller graph for this function:

## ◆ isWFNmodeActivated()

bool isWFNmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus is based on wfn file.

Returns
  The value of the corresponding flag

## ◆ isWFXmodeActivated()

bool isWFXmodeActivated | ( |  | ) |

Tool function which indicates if the current calculus is based on wfx file.

Returns
  The value of the corresponding flag

## ◆ readParam()

void readParam | ( | const char * | parameterFileName,
|  | param_t * | params )

Read the file param.nci.

Parameters

  parameterFileName | The parameter file name
  params | the parameters.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ readxyzMinMax()

ProgData * readxyzMinMax | ( | param_t * | params | ) |

Reads files (.xyz) and find the Min (MinX,MinY,MinZ) and the Max (MinX,MinY,MinZ)

Parameters

  params | : the read parameters.

Returns
  the data to fill.

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ setFrag()

void setFrag | ( | const std::string | definition,
|  | const param_types_t | FRAG,
|  | const int | nbAtoms )

This function is used to ascribe FRAG atom indexes from string definition given in param.igm input file.

Parameters

  definition | : The string defining the fragment (for instance: 1-3; 8; 10-13)
  FRAG | : The selected fragment (FRAG1 or FRAG2) to be associated with string definition
  nbAtoms | : The total number of atoms in the molecular system

Here is the call graph for this function:

## ◆ wfn_getMoleculeAnbAtoms()

unsigned int wfn_getMoleculeAnbAtoms | ( |  | ) |

Tool function which indicates the number of atoms in molecule A.

Returns
  The size of the molecule A

Here is the caller graph for this function:

## ◆ wfn_getMoleculeBnbAtoms()

unsigned int wfn_getMoleculeBnbAtoms | ( |  | ) |

Tool function which indicates the number of atoms in molecule B.

Returns
  The size of the molecule B

Here is the caller graph for this function:

## Variable Documentation

## ◆ CriticAddSeedsMode

bool CriticAddSeedsMode =false

Flag to indicate if we add seeds at the center of triangles formed by 3 atoms for critical point search (time-consumming)

## ◆ CriticFINEMode

bool CriticFINEMode =false

Flag to indicate if we are searching for critical points with fine promolecular grid

## ◆ CriticMEDIUMMode

bool CriticMEDIUMMode =true

Flag to indicate if we are searching for critical points with medium promolecular grid

## ◆ CriticULTRAFINEMode

bool CriticULTRAFINEMode =false

Flag to indicate if we are searching for critical points with ultrafine promolecular grid

## ◆ moleculeAatoms

std::set<int> moleculeAatoms

The value associated to the keyword MOL2ID.

The indexes of the atom belonging to the molecule A according to the user definition Indexes start a index 1 (Natural numbering)

## ◆ moleculeBatoms

std::set<int> moleculeBatoms

The indexes of the atom belonging to the molecule B according to the user definition Indexes start a index 1 (Natural numbering)