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

# sc\_SumIntCoor(3)

SumIntCoor is used to construct linear combinations of internal coordinates.

## NAME

sc::SumIntCoor - **SumIntCoor** is used to construct linear combinations of internal coordinates.

## SYNOPSIS

`#include <coor.h>`

Inherits **sc::IntCoor**.

### Public Member Functions

**SumIntCoor** (**StateIn** &)\
 **SumIntCoor** (const char \*)\
 This constructor takes a string containing a label for this coordinate.  **SumIntCoor** (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.  int **n** ()\
 Returns the number of coordinates in this linear combination.  void **add** (**Ref**\< **IntCoor** \> &, double coef)\
 Add a coordinate to the linear combination.  void **normalize** ()\
 This function normalizes all the coefficients.  double **preferred\_value** () const\
 Returns the value of the coordinate in a.u. and radians.  const char \* **ctype** () const\
 Always returns \`\`SUM''.  void **print\_details** (const **Ref**\< **Molecule** \> &, std::ostream &=**ExEnv::out0**()) const\
 Print the individual coordinates in the sum with their coefficients.  double **force\_constant** (**Ref**\< **Molecule** \> &)\
 Returns the weighted sum of the individual force constants.  void **update\_value** (const **Ref**\< **Molecule** \> &)\
 Recalculate the value of the coordinate.  void **bmat** (const **Ref**\< **Molecule** \> &, **RefSCVector** &bmat, double coef=1.0)\
 Fill in a row the the B matrix.  int **equivalent** (**Ref**\< **IntCoor** \> &)\
 Always returns 0.

### Additional Inherited Members

## Detailed Description

**SumIntCoor** is used to construct linear combinations of internal coordinates.

The following is a sample **ParsedKeyVal** input for a **SumIntCoor** object:

```
  sumintcoor<SumIntCoor>: (
    coor: [
      <StreSimpleCo>:( atoms = [ 1 2 ] )
      <StreSimpleCo>:( atoms = [ 2 3 ] )
      ]
    coef = [ 1.0 1.0 ]
    )
```

## Constructor & Destructor Documentation

### sc::SumIntCoor::SumIntCoor (const Ref\< KeyVal \> &)

The **KeyVal** constructor.

- `coor`

  A vector of **IntCoor** objects that define the summed coordinates.

- `coef`

  A vector of floating point numbers that gives the coefficients of the summed coordinates.

## Member Function Documentation

### void sc::SumIntCoor::add (Ref\< IntCoor \> &, double coef)

Add a coordinate to the linear combination. coef is the coefficient for the added coordinate.

### void sc::SumIntCoor::bmat (const Ref\< Molecule \> &, RefSCVector & bmat, double coef = `1.0`)` [virtual]`

Fill in a row the the B matrix.

Implements **sc::IntCoor**.

### const char \* sc::SumIntCoor::ctype () const` [virtual]`

Always returns \`\`SUM''.

Implements **sc::IntCoor**.

### int sc::SumIntCoor::equivalent (Ref\< IntCoor \> &)` [virtual]`

Always returns 0.

Implements **sc::IntCoor**.

### double sc::SumIntCoor::force\_constant (Ref\< Molecule \> &)` [virtual]`

Returns the weighted sum of the individual force constants.

Implements **sc::IntCoor**.

### double sc::SumIntCoor::preferred\_value () const` [virtual]`

Returns the value of the coordinate in a.u. and radians.

Reimplemented from **sc::IntCoor**.

### void sc::SumIntCoor::print\_details (const Ref\< Molecule \> &, std::ostream & = ExEnv::out0`()`) const` [virtual]`

Print the individual coordinates in the sum with their coefficients.

Reimplemented from **sc::IntCoor**.

### void sc::SumIntCoor::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::IntCoor**.

### void sc::SumIntCoor::update\_value (const Ref\< Molecule \> &)` [virtual]`

Recalculate the value of the coordinate.

Implements **sc::IntCoor**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
