NuriKit v0.1.0b2
Loading...
Searching...
No Matches
crdgen.h
Go to the documentation of this file.
1//
2// Project NuriKit - Copyright 2024 SNU Compbio Lab.
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef NURI_ALGO_CRDGEN_H_
7#define NURI_ALGO_CRDGEN_H_
8
10#include <utility>
12
13#include "nuri/eigen_config.h"
14#include "nuri/core/molecule.h"
15
16namespace nuri {
25extern bool generate_coords(const Molecule &mol, Matrix3Xd &conf,
26 int max_trial = 10);
27
39inline bool generate_coords(Molecule &mol, int max_trial = 10) {
40 Matrix3Xd conf(3, mol.num_atoms());
41 bool success = generate_coords(mol, conf, max_trial);
42 if (success)
43 mol.confs().push_back(std::move(conf));
44 return success;
45}
46} // namespace nuri
47
48#endif /* NURI_ALGO_CRDGEN_H_ */
Read-only molecule class.
Definition molecule.h:943
int num_atoms() const
Get the number of atoms in the molecule.
Definition molecule.h:1011
std::vector< Matrix3Xd > & confs()
Get all atomic coordinates of the conformers.
Definition molecule.h:1387
Definition crdgen.h:16
bool generate_coords(const Molecule &mol, Matrix3Xd &conf, int max_trial=10)
Generate 3D coordinates for the molecule.