Loading [MathJax]/extensions/TeX/AMSmath.js
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
polymer.hpp File Reference

This file contains everything needed to create a start-up configuration of polymer chains which may respect already existing particles and/or constraints. More...

#include "system/System.hpp"
#include <utils/Vector.hpp>
#include <vector>
+ Include dependency graph for polymer.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::vector< std::vector< Utils::Vector3d > > draw_polymer_positions (System::System const &system, int n_polymers, int beads_per_chain, double bond_length, std::vector< Utils::Vector3d > const &start_positions, double min_distance, int max_tries, int use_bond_angle, double bond_angle, int respect_constraints, int seed)
 Determines valid polymer positions and returns them.
 

Detailed Description

This file contains everything needed to create a start-up configuration of polymer chains which may respect already existing particles and/or constraints.

Implementation in polymer.cpp.

Definition in file polymer.hpp.

Function Documentation

◆ draw_polymer_positions()

std::vector< std::vector< Utils::Vector3d > > draw_polymer_positions ( System::System const &  system,
int  n_polymers,
int  beads_per_chain,
double  bond_length,
std::vector< Utils::Vector3d > const &  start_positions,
double  min_distance,
int  max_tries,
int  use_bond_angle,
double  bond_angle,
int  respect_constraints,
int  seed 
)

Determines valid polymer positions and returns them.

Parameters
systemparticle system
n_polymershow many polymers to create
beads_per_chainmonomers per chain
bond_lengthlength of the bonds between two monomers
start_positionsstarting positions of each polymers
min_distanceminimum distance between all particles
max_trieshow often a monomer/polymer should be reset if current position collides with a previous particle
use_bond_anglewhether to use the bond_angle argument
bond_angledesired bond-angle to be fixed
respect_constraintswhether to respect constraints
seedseed for RNG

Definition at line 143 of file polymer.cpp.

References System::System::box_geo, is_valid_position(), Random::mt19937(), random_position(), random_unit_vector(), Utils::vec_rotate(), and vector_product().

Referenced by ScriptInterface::Particles::Polymer::do_call_method().