---
name: "sc_CartMolecularCoor"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_CartMolecularCoor"
---

# sc\_CartMolecularCoor(3)

The CartMolecularCoor class implements Cartesian coordinates in a way suitable for use in geometry optimizations.

## NAME

sc::CartMolecularCoor - The **CartMolecularCoor** class implements Cartesian coordinates in a way suitable for use in geometry optimizations.

## SYNOPSIS

`#include <coor.h>`

Inherits **sc::MolecularCoor**.

### Public Member Functions

**CartMolecularCoor** (**Ref**\< **Molecule** \> &mol)\
 **CartMolecularCoor** (**StateIn** &)\
 **CartMolecularCoor** (const **Ref**\< **KeyVal** \> &)\
 The **KeyVal** constructor.  void **save\_data\_state** (**StateOut** &)\
 Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them.  virtual **RefSCDimension** **dim** ()\
 These implement the virtual functions inherited from **MolecularCoor**.  virtual int **to\_cartesian** (const **Ref**\< **Molecule** \> &, const **RefSCVector** &internal)\
 virtual int **to\_internal** (**RefSCVector** &internal)\
 Fill in the vector \`\`internal'' with the current internal coordinates.  virtual int **to\_cartesian** (**RefSCVector** &cartesian, **RefSCVector** &internal)\
 Convert the internal coordinate gradients in \`\`internal'' to Cartesian coordinates and copy these Cartesian coordinate gradients to \`\`cartesian''.  virtual int **to\_internal** (**RefSCVector** &internal, **RefSCVector** &cartesian)\
 Convert the Cartesian coordinate gradients in \`\`cartesian'' to internal coordinates and copy these internal coordinate gradients to \`\`internal''.  virtual int **to\_cartesian** (**RefSymmSCMatrix** &cart, **RefSymmSCMatrix** &internal)\
 Convert the internal coordinate Hessian `internal'' to Cartesian coordinates and copy the result to`cartesian''.  virtual int **to\_internal** (**RefSymmSCMatrix** &internal, **RefSymmSCMatrix** &cart)\
 Convert the Cartesian coordinate Hessian `cartesian'' to internal coordinates and copy the result to`internal''.  virtual void **print** (std::ostream &=**ExEnv::out0**()) const\
 Print the coordinate.  virtual void **print\_simples** (std::ostream &=**ExEnv::out0**()) const\
 void **guess\_hessian** (**RefSymmSCMatrix** &hessian)\
 Calculate an approximate hessian and place the result in \`\`hessian''.  **RefSymmSCMatrix** **inverse\_hessian** (**RefSymmSCMatrix** &)\
 Given an Hessian, return the inverse of that hessian.

### Protected Member Functions

virtual void **init** ()\
 Initializes the dimensions.

### Protected Attributes

**RefSCDimension** **dim\_**\

### Additional Inherited Members

## Detailed Description

The **CartMolecularCoor** class implements Cartesian coordinates in a way suitable for use in geometry optimizations.

**CartMolecularCoor** is a **SavableState** has **StateIn** and **KeyVal** constructors. **CartMolecularCoor** is derived from **MolecularCoor**.

## Member Function Documentation

### virtual RefSCDimension sc::CartMolecularCoor::dim ()` [virtual]`

These implement the virtual functions inherited from **MolecularCoor**.

Implements **sc::MolecularCoor**.

### void sc::CartMolecularCoor::guess\_hessian (RefSymmSCMatrix & hessian)` [virtual]`

Calculate an approximate hessian and place the result in \`\`hessian''.

Implements **sc::MolecularCoor**.

### RefSymmSCMatrix sc::CartMolecularCoor::inverse\_hessian (RefSymmSCMatrix &)` [virtual]`

Given an Hessian, return the inverse of that hessian. For singular matrices this should return the generalized inverse.

Implements **sc::MolecularCoor**.

### virtual void sc::CartMolecularCoor::print (std::ostream & = ExEnv::out0`()`) const` [virtual]`

Print the coordinate.

Implements **sc::MolecularCoor**.

### virtual void sc::CartMolecularCoor::print\_simples (std::ostream & = ExEnv::out0`()`) const` [virtual]`

Implements **sc::MolecularCoor**.

### void sc::CartMolecularCoor::save\_data\_state (StateOut &)` [virtual]`

Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_cartesian (const Ref\< Molecule \> &, const RefSCVector & internal)` [virtual]`

Implements **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_cartesian (RefSCVector & cartesian, RefSCVector & internal)` [virtual]`

Convert the internal coordinate gradients in \`\`internal'' to Cartesian coordinates and copy these Cartesian coordinate gradients to \`\`cartesian''. Only the variable internal coordinate gradients are transformed.

Implements **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_cartesian (RefSymmSCMatrix & cartesian, RefSymmSCMatrix & internal)` [virtual]`

Convert the internal coordinate Hessian `internal'' to Cartesian coordinates and copy the result to`cartesian''. Only the variable internal coordinate force constants are transformed.

Implements **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_internal (RefSCVector & internal)` [virtual]`

Fill in the vector \`\`internal'' with the current internal coordinates. Note that this member will update the values of the variable internal coordinates.

Implements **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_internal (RefSCVector & internal, RefSCVector & cartesian)` [virtual]`

Convert the Cartesian coordinate gradients in \`\`cartesian'' to internal coordinates and copy these internal coordinate gradients to \`\`internal''. Only the variable internal coordinate gradients are calculated.

Implements **sc::MolecularCoor**.

### virtual int sc::CartMolecularCoor::to\_internal (RefSymmSCMatrix & internal, RefSymmSCMatrix & cartesian)` [virtual]`

Convert the Cartesian coordinate Hessian `cartesian'' to internal coordinates and copy the result to`internal''. Only the variable internal coordinate force constants are calculated.

Implements **sc::MolecularCoor**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
