fast-equilibration-workflow documentation

43
Fast-Equilibration-Workflow Documentation Release 0.1.1 David Ozog, Jay McCarty, Marina Guenza, Josh Frye, and The Gue August 10, 2016

Upload: others

Post on 18-Dec-2021

34 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-WorkflowDocumentation

Release 0.1.1

David Ozog, Jay McCarty, Marina Guenza, Josh Frye, and The Guenza Lab

August 10, 2016

Page 2: Fast-Equilibration-Workflow Documentation
Page 3: Fast-Equilibration-Workflow Documentation

Contents

1 Welcome! 1

2 Documentation 3

3 Table of contents 53.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.4 Adjustable Parameters: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.5 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.6 API reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.7 Documentation for this documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4 Indices and tables 33

Python Module Index 35

i

Page 4: Fast-Equilibration-Workflow Documentation

ii

Page 5: Fast-Equilibration-Workflow Documentation

CHAPTER 1

Welcome!

Welcome to the Fast-Equilibration-Workflow polymer simulation project! Within, you will find tools for transformingbetween coarse-grained and united atom simulations in LAMMPS, including a streamlined and automated interface.

1

Page 6: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

2 Chapter 1. Welcome!

Page 7: Fast-Equilibration-Workflow Documentation

CHAPTER 2

Documentation

The documentation for the Fast-Equilibration-Workflow is built using Sphinx and Read the Docs

3

Page 8: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

4 Chapter 2. Documentation

Page 9: Fast-Equilibration-Workflow Documentation

CHAPTER 3

Table of contents

Note: Some sections are placeholders.

3.1 Getting started

For system requirements, installation instructions, and basic usage information, see our GitHub page

The workflow is an iterative equilibration that transforms between the United Atom (UA) and Coarse-Grained (CG)representations. This graphic rougly depicts this process for two polymers (each with 10 monomers) with 2 CG unitsassigned to each polymer:

The workflow itself consists of the following 7 steps:

5

Page 10: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

For more information about each individual step, please see our 2015 paper in the Journal of Computational Science.

After installation, running a workflow is easy:

automated_fastequil -nchains 100 -nmonomers 200 -sitesperchain 4 ...

To see the list of adustable parameters, either type

automated_fastequil -h

or refer to the list of supported UA/CG Adjustable Parameters:.

There are also several individual helper tools that can be used without the full workflow. Some of those tools arecurrently listed in the wiki.

3.2 Glossary

Definitions of “jargon” and commonly used acronyms.

c_not Direct correlation function at zero wave vector. A parameter used in coarse-graining.

chain General term for a polymer that is represented by UA or CG coordinates.

CG See coarse-grained.

COM Abbreviation for center of mass.

6 Chapter 3. Table of contents

Page 11: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

coarse-grained, coarse-graining Refers to polymers represented by multi-block potentials (as in “a coarse-grainedsimulation”).

PE Abbreviation for polyethylene. Much of the project is currently hard-coded to work for this polymer only.

Rg2 Radius of gyration squared.

site General term for either a CG or UA coordinate.

UA See united atom.

united atom Refers to polymers represented by the coordinates of their monomers (as in “a united atom simulation”).

3.3 Overview

Please see the Getting started Guide.

3.4 Adjustable Parameters:

-nchain number of chains (default: 15)

-nmonomer number of monomers (default: 640)

-rhostar rhostar, or number density (default: 0.03355 inv ang^3)

-iseed random number generator seed value (default: 455824)

-nsets # of polymer types (default: 1)

-swaptype algorithm switch parameter: 0, 1, or 2 (default: 0)

-viz visualize the chain with VMD (default: False)

-ntype number of types (default: 1)

-nbondtype number of bond types (default: 1)

-bondlength bondlength (default: 1.55 ang)

-restrict closest approach distance (default: 1.540016 ang)

-sitesperchain number of coarse grained sites per chain (default: 10)

-rg2 radius of gyration squared (default: calculated at runtime)

-cnot c_not (default: calculated at runtime)

-temp temperature (default: 450 K)

-cut cut (default: 2)

-nvt nvt/nve (default: nvt)

-mono_mass monomer mass in g/mol (default: 14 g/mol)

-timestep timestep in femtoseconds (default: 1.0 fs)

-database filename of the sqlit3 database (default: workflow_database.db)

-hmmrthresh Threshold for the maximum percent error change in hmmr (default: 2.0)

3.3. Overview 7

Page 12: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

3.5 Tutorials

Please see the Getting started Guide.

3.6 API reference

This section contains source code documentation on a technical level. For higher level usage information, see thetutorials.

3.6.1 src

src package

Subpackages

src.backmapping package

Subpackages

src.backmapping.backmap_cones_package package

Submodules

src.backmapping.backmap_cones_package.chain module Functions of Chain objects.

Note: All units use the LAMMPS “real” units; see the units command docs.

class src.backmapping.backmap_cones_package.chain.Chain(list_of_vectors)A list of coordinates representing the sites of a polymer.

__eq__(other)Test all sites in both chains for equality.

Same as self == other

Parameters other (Chain) –

Returns

Return type bool

__getitem__(index)Return the item at index.

Parameters index (int or slice) –

Returns

Return type numpy.array

__len__()Return the number of sites in the chain.

8 Chapter 3. Table of contents

Page 13: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Returns

Return type int

__repr__()Represent Chain objects by this expression.

Returns

Return type str

__setitem__(index, site)Replace the site at index with input site.

Parameters

• index (int) –

• site (numpy.array) –

Returns

Return type None

append(site)Append site to the end of chain’s list.

Parameters site (numpy.array) – Site to be appended to the end of the chain list.

Returns

Return type None

copy()Return a copy of this chain.

Chain objects are mutable, so this is used when one does not want to alter the original chain.

Returns

Return type Chain

equal_upto_pbc(other, box_halfwidths, decimals=6)Test all sites in both chains for equality, correcting for term:pbc.

That is, returns True if this chain is equal to the other chain after periodic boundary conditions areenforced.

Parameters

• other (Chain) – Chain to test for equality.

• box_halfwidths (list[float]) – Half-width dimensions of the box.

• decimals (int) – Number of decimal places to round to

Returns

Return type bool

get_average_bond_angle()Return the average bond angle of the chain.

Specifically, this calculates the angles between adjacent bonds in the chain’s site list, and averages thoseangles.

Returns Average bond angle.

Return type float

3.6. API reference 9

Page 14: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Examples

A chain with a right angle bond:

>>> ch = Chain([\... np.array([0, 0, 0]),\... np.array([1, 0, 0]),\... np.array([1, 1, 0])])>>> ch.get_average_bond_angle()1.5707963267948966

See also:

get_bond_angle()

get_average_bond_length()Return the average bond length of the chain.

Specifically, this calculates the distances between adjacent vectors in the chain’s site list, and averagesthose distances.

Returns Average bond length.

Return type float

Examples

A chain with a length 1 bond:

>>> ch = Chain([np.array([1, 0, 0]), np.array([2, 0, 0])])>>> ch.get_average_bond_length()1.0

See also:

get_bond_length()

get_average_dihedral_angle()Return the average dihedral angle of the chain.

Returns Chain’s average dihedral angle.

Return type float

Examples

A chain with two right angle bonds:

>>> ch = Chain([\... np.array([0, 0, 0]),\... np.array([1, 0, 0]),\... np.array([1, 1, 0]),\... np.array([1, 1, 1])])>>> ch.get_average_dihedral_angle()1.5707963267948966

See also:

get_dihedral_angle()

10 Chapter 3. Table of contents

Page 15: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

get_bond_angle(index)Return the bond angle between self[index], self[index + 1], and self[index + 2]

Parameters index (int) – Must be in range(len(self) - 2) Index of the site in thechain to get the bond angle of WRT the next two sites.

Returns Angle between the bond from index + 1 to index and the bond from index +2 and index + 1

Return type float

Examples

A chain with a right angle bond:

>>> ch = Chain([\... np.array([0, 0, 0]),\... np.array([1, 0, 0]),\... np.array([1, 1, 0])])>>> ch.get_bond_angle(0)1.5707963267948966

get_bond_length(index)Return the bond length from site self[index] to self[index + 1]

Parameters index (int) – Must be in range(len(self) - 1) Index of the site in thechain to get the bond length of WRT the next site.

Returns Distance from the site at index to the site at index + 1.

Return type float

Examples

A chain with a length 1 bond:

>>> ch = Chain([np.array([1, 0, 0]), np.array([2, 0, 0])])>>> ch.get_average_bond_length()1.0

get_centroid()Return the centroid of the chain’s sites

Returns

Return type np.ndarray

get_centroids_of_subdivisions(number_of_subdiv)Return a the centroids of equal-sized subdivisions of the chain.

For example, for a chain with 8 sites, one could get the midpoints between each pair of sites usingname_of_chain.get_centroids_of_subdivisions(4).

Parameters number_of_subdiv (int) – Must cleanly divide len(self) The chain willbe subdivided into this many groups of sites

Returns List of size number_of_subdiv containing numpy.ndarray corresponding tothe centroids of each subdivision.

Return type list

3.6. API reference 11

Page 16: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

get_dihedral_angle(index)Return the dihdedral angle between the four sites starting at index.

Specifically, this calculates the angles between dihedral planes formed by every three bonds (For threebonds in a chain, the first and third bond form two planes with respect to the second bond. The dihedralangle is the angle between these planes).

Parameters index (int) – Must be in range(len(self) - 3) Index of the site in thechain to get the dihedral angle of WRT the next three sites.

Returns Dihedral angle of the four sites from index to index + 3.

Return type float

Examples

A chain with two right angle bonds:

>>> ch = Chain([\... np.array([0, 0, 0]),\... np.array([1, 0, 0]),\... np.array([1, 1, 0]),\... np.array([1, 1, 1])])>>> ch.get_dihedral_angle(0)1.5707963267948966

insert(index, site)Insert site before index in chain’s list.

Parameters

• index (int) – Index before which the vector will be inserted in the chain.

• site (numpy.array) – Site to insert into the chain.

Returns

Return type None

recenter(old_centroid)Translate chain so that its centroid becomes input coordinate.

Usually, this input coordinate will be the chain’s previous centroid.

Parameters old_centroid (numpy.array) – The chain will be moved so its centroid ishere.

Returns

Return type None

redo_pbc(box_halfwidths, box_center=<Mock name=’mock()’ id=‘139813426795728’>)Redo the periodic boundary conditions if the chain crosses a boundary.

Also makes sure the chains are actually within the simulation boundaries.

Parameters

• box_halfwidths (list[float]) – Halfwidth dimensions of the box.

• box_center (numpy.array, optional) – Location of the center of the PBC boxUsually this is the origin.

Returns

12 Chapter 3. Table of contents

Page 17: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Return type None

See also:

undo_pbc()

Notes

Unlike undo_pbc(), this method will not have false positives.

rescale(scalar)Rescale chain by scalar with respect to its centroid.

Parameters scalar (float) – Rescaling factor.

Returns

Return type None

reverse_indices()Reverse the order of the elements of chain’s site list.

Returns

Return type None

rounded(decimals=0)Round the entries of all vectors in the chain’s list to decimals.

Primarily for unit tests.

Parameters decimals (int) – Number of decimal places to round to.

Returns

Return type Chain

translate(vector)Translate chain by vector.

Parameters vector (numpy.array) – Vector to translate the chain by.

Returns

Return type None

undo_pbc(box_halfwidths, box_center=<Mock name=’mock()’ id=‘139813426796048’>)Undo the periodic boundary conditions if the chain crosses a boundary.

Parameters

• box_halfwidths (list[float]) – Halfwidth dimensions of the PBC box.

• box_center (numpy.array, optional) – Location of the center of the PBC boxUsually this is the origin.

Returns

Return type None

See also:

redo_pbc()

3.6. API reference 13

Page 18: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Notes

This method is not safe, in the sense that if there is a chain that happens to have a bond longer than thebox halfwidth, it will be modified by this method erroneously. This actually happens frequently with smallnumbers of chains (< 20), but less frequently with large numbers of chains.

A much safer approach would be to have LAMMPS inform the code directly. It appears that LAMMPShas this functionality, known as unwrapping.

Unfortunately, I have not been able to get this to work. See the discussion here for more information.

src.backmapping.backmap_cones_package.chain.are_in_same_chain(point1, point2,chain_list)

Return True if two ‘flattened points’ are in the same chain.

‘Flattened points’ are usually elements of a list of points returned by flatten().

Parameters

• point1 (int) – Index of first point in flatten(chain_list)() to be checked forbeing in the same chain.

• point2 (int) – Index of other point in flatten(chain_list)() to be checked forbeing in the same chain.

• chain_list (list[Chain]) – List of Chain that the input points are within.

Returns True if the two points are in the same chain.

Return type bool

See also:

flatten(), unflatten()

src.backmapping.backmap_cones_package.chain.flatten(chain_list, re-turn_index_key=False)

Return a flat list of the position vectors in chain list.

It is sometimes useful to have a list of every position vector in the simulation.

Parameters

• chain_list (list[Chain]) – List of Chain objects to be flattened.

• return_index_key (bool, optional) – If True, this function will return both theflattened chain list and a corresponding list of 2-tuples where the first element of the tupleis the chain number, and the second is the site number. For example, the 5th tuple in the listof tuples is (chain number, site number) for the 5th vector in the flattened list.

Returns List of every numpy.ndarray in chain_list. If return_index_key is True,this will also return a list of tuples (see ‘Parameters‘_)

Return type list[np.ndarray]

See also:

unflatten()

Examples

14 Chapter 3. Table of contents

Page 19: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

>>> ch1 = Chain([np.array([1, 0, 0]), np.array([2, 0, 0])])>>> ch2 = Chain([np.array([3, 0, 0]), np.array([4, 0, 0])])>>> flatten([ch1, ch2], return_index_key=True)([array([1, 0, 0]), array([2, 0, 0]), array([3, 0, 0]), array([4, 0, 0])], [(0, 0), (0, 1), (1, 0), (1, 1)])

src.backmapping.backmap_cones_package.chain.flatten_numpy(chain_list, re-turn_index_key=False)

Return a numpy array of the position vectors in chain list.

It is sometimes useful to have a numpy array with all position vectors in the simulation.

Parameters

• chain_list (list[Chain]) – List of Chain objects to be flattened.

• return_index_key (bool, optional) – If True, this function will return both theflattened chain list and a corresponding list of 2-tuples where the first element of the tupleis the chain number, and the second is the site number. For example, the 5th tuple in the listof tuples is (chain number, site number) for the 5th vector in the flattened list.

Returns array of every numpy.ndarray in chain_list. If return_index_key is True,this will also return a list of tuples (see ‘Parameters‘_)

Return type np.ndarray

See also:

unflatten()

Examples

>>> ch1 = Chain([np.array([1, 0, 0]), np.array([2, 0, 0])])>>> ch2 = Chain([np.array([3, 0, 0]), np.array([4, 0, 0])])>>> flatten_numpy([ch1, ch2], return_index_key=True)(array([[1, 0, 0],

[2, 0, 0],[3, 0, 0],[4, 0, 0]]), [(0, 0), (0, 1), (1, 0), (1, 1)])

src.backmapping.backmap_cones_package.chain.get_chain_and_site_number(point_index,chain_list)

Return tuple of the chain number and site number of the flat-indexed point.

That is, for a vector in a flattened chain list with index point_index, this returns the index of the chain itbelongs to and its index within that chain, in a tuple.

Parameters

• point_index (int) – Index of the position vector in the flattened list that correspondsto chain_list.

• chain_list (list[Chain]) – List of Chain corresponding to the flattened list thatpoint_index is an index of.

Returns

• int – Index of the chain that point_index is from

• int – Index of point_index within its chain

src.backmapping.backmap_cones_package.chain.unflatten(coord_list, chain_list)Return list of chains based on the position vectors in coord_list.

3.6. API reference 15

Page 20: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

The argument chain_list is required since the chains could be different lengths.

Parameters

• coord_list (list[np.ndarray]) – List of numpy.ndarray corresponding to ev-ery site in chain_list.

• chain_list (list[Chain]) – List of Chain whose position vectors will be replacedwith those in coord_list.

Returns List of Chain with position vectors taken from coord_list.

Return type list[Chain]

See also:

flatten()

Examples

>>> ch1 = Chain([np.array([1, 0, 0]), np.array([2, 0, 0])])>>> ch2 = Chain([np.array([3, 0, 0]), np.array([4, 0, 0])])>>> flat = flatten([ch1, ch2])>>> print flat[array([1, 0, 0]), array([2, 0, 0]), array([3, 0, 0]), array([4, 0, 0])]>>> unflatten(flat, [ch1, ch2])[Chain: [array([1, 0, 0]), array([2, 0, 0])], Chain: [array([3, 0, 0]), array([4, 0, 0])]]

src.backmapping.backmap_cones_package.diagnostics module Functions useful in analyzing code operation.

src.backmapping.backmap_cones_package.diagnostics.plot_chains(list_of_chains,box_halfwidths=0,fig_num=0,fix_aspect_ratio=True,hide_axes=False,hide_all=False,sub-plot_kwargs={},plot_kwargs={},scat-ter_kwargs={})

Display a 3D plot of the Chain coordinates in list of chains.

Parameters

• list_of_chains (list[Chain]) – List of Chain objects to be plotted. If only onechain is to be plotted, it must be placed in a list.

• box_halfwidths (list[float]) – If non-zero, draws the wireframe of a box cen-tered at the origin with these halfwidths (for displaying simulation boundary).

• fig_num (int) – If given, the title of the plot is set to Figure # (fig_num + 1) (usefulif plotting several times in a row, to keep track of which plot is which).

• fix_aspect_ratio (bool) – If true, rescales the plot so that the aspect ratio is 1:1:1.

• hide_axes (bool) – If true, hides axes and their labels.

• hide_all (bool) – If true, only displays the chains (no axes, no background box, etc.).

16 Chapter 3. Table of contents

Page 21: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

• subplot_kwargs (dict) – Keyword argument dict to be passed to the add_subplotcommand. See matplotlib.figure.Figure.add_subplot() for possible op-tions.

• plot_kwargs (dict) – dict of keyword argument dicts to be passed to the plot com-mand for each chain. Syntax is:

plot_kwargs={0: {keyword1='stuff', ... }, 1: { ... } ...}

and so on for each chain index. See matplotlib.axes.Axes.plot() for possibleoptions.

• scatter_kwargs (dict) – dict of keyword argument dicts to be passed to thescatter command for each chain. Syntax is the same as for plot_kwargs. Seematplotlib.axes.Axes.scatter() for possible options.

src.backmapping.backmap_cones_package.diagnostics.print_bond_angles(list_of_chains,dig-its=3)

Print out the angle between every pair of bonds in list of chains.

Parameters

• list_of_chains (list) – List of Chain objects to print the bond angles of.

• digits (int) – Number of decimal digits to print.

Returns

Return type None

src.backmapping.backmap_cones_package.diagnostics.print_bond_lengths(list_of_chains,dig-its=3)

Print out the length of every bond in the input list of chains.

Parameters

• list_of_chains (list) – List of Chain objects to print the bond lengths of.

• digits (int) – Number of decimal digits to print.

Returns

Return type None

src.backmapping.backmap_cones_package.diagnostics.print_centroids(list_of_chains)Print the centroids for each chain in list of chains.

Parameters list_of_chains (list[Chain]) – List of Chain objects to print the centroidsof.

Returns

Return type None

src.backmapping.backmap_cones_package.diagnostics.visualize_point_distance(ch1,site1,ch2,site2,chain_list,ghost_site=None)

Plot a line connecting the two sites, and adjacent sites in their chains.

This is useful for checking that the overlap-correcting code is functioning properly.

3.6. API reference 17

Page 22: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Parameters

• ch1 (int) – Index of the chain of the first point.

• site1 (int) – Index of the first point within its chain.

• ch2 (int) – Index of the chain of the other point.

• site2 (int) – Index of the other point within its chain.

• chain_list (list[Chain]) – List of Chain objects that contains the two points tobe plotted.

• ghost_site (numpy.array) – If the second point is a ghost site, inputting it here willoverride the standard plotting procedure and instead plot the location of the ghost.

Ghost sites are displayed in a different color.

Returns

Return type None

src.backmapping.backmap_cones_package.ghost module Functions for generating periodic ghost cells and ghostpoints.

src.backmapping.backmap_cones_package.ghost.generate_ghost_chain_cells(chains,box_halfwidths)

Return a list of lists of ghost chains corresponding to the input list of chains.

In other words, this creates a copy of the simulation adjacent to each boundary of the simulation box. This isuseful since we have periodic boundary conditions.

Parameters

• chains (list[chn.Chain]) – List of chn.Chain to be duplicated across periodicboundaries.

• box_halfwidths (list[float]) – List of floats representing the x, y, and zhalfwidths of the box to be ghosted.

Returns

List of 26 lists of chn.Chain representing the ghosted chains (excluding the input points).Each list of chains corresponds to a different periodic copy of the simulation at one of the adja-cent periodic cells.

A list of lists is used so that each list of chains are indexed in the same way as the input list ofchains (for example, the 0th input chain is the 0th ghost chain in each ghost cell, etc.)

Return type list[list[chn.Chain]]

src.backmapping.backmap_cones_package.ghost.generate_ghost_sites_with_threshold(chains,thresh-old,box_halfwidths,box_center=<Mockname=’mock()’id=‘139813407210768’>)

Return both a list of ghost-sites and a list of their chain/site numbers.

In other words, this copies the points at the boundaries of the input box and returns their periodic ‘ghosts’. Italso returns the chain and site numbers in a separate list.

Parameters

18 Chapter 3. Table of contents

Page 23: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

• chains (list[numpy.array]) – List of chn.Chain that are to be ghosted.

• box_halfwidths (list[float]) – List of halfwidths of the box containing the pointsto be ghosted. (First entry is the x- halfwidth, etc.)

• threshold (float) – Distance from the box boundaries that defines the region of pointsto be ghosted.

• box_center (numpy.array) – Location of the center of the box containing the pointsto be ghosted. Often, this is just the origin [0, 0, 0]

Returns

• numpy.array – Array of ghost-sites

• list[tuple(int, int)] – List of tuples where first index is the chain number and second index isthe site number. This corresponds to the list of ghost-sites.

src.backmapping.backmap_cones_package.ghost.generate_ghosts_of_point(point,box_halfwidths)

Create all ghosts of a single point.

Parameters

• point (numpy.array) – Point to be ghosted

• box_halfwidths (list[float]) – Halfwidths of the periodic box

Returns List of ghosts of the input point.

Return type list[numpy.array]

src.backmapping.backmap_cones_package.ghost.get_vectors_to_vertices_edges_faces_of_box(box_halfwidths)Return the vectors pointing to the vertices, edges, and faces of a box centered at the origin.

This is useful for generating ghost cells.

Parameters box_halfwidths (list[float]) – List of the halfwidths of the box. First entryis x-halfwidth, etc.

Returns List of vectors to the vertices, edges, and faces of the box.

Return type list[numpy.array]

src.backmapping.backmap_cones_package.ghost.select_parts_of_ghost_chains_in_box(ghost_cells,se-lec-tion_box_hws,se-lec-tion_box_center=<Mockname=’mock()’id=‘139813407674256’>)

Return both an array of sites in the specified box and a list of their chain/site numbers.

This was created for use in generate_ghost_chains_with_threshold().

Parameters

• ghost_cells (list[list[chn.Chain]]) – List of ‘ghost cells’; each ‘ghost cell’is a list of chn.Chain, as output from generate_ghost_cells().

• selection_box_hws (list[float]) – Halfwidths of the selection box.

• selection_box_center (numpy.array) – Location of the center of the selectionbox.

3.6. API reference 19

Page 24: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Returns

• numpy.array – Array of selected points

• list[tuple(int, int)] – List of chain and site numbers of selected points, corresponding to thereturned list of points.

src.backmapping.backmap_cones_package.ghost.update_ghost_sites(positions, keys,modified_index,ghost_indices,threshold,box_halfwidths,box_center=<Mockname=’mock()’id=‘139813407211152’>)

Add or remove ghost sites from input list of positions and keys; return these indices.

That is, when a site in positions (indexed by modified_index) has been moved, the ghosts of that sitehave to be updated.

Parameters

• positions (numpy.array) – List of positions of all sites and their ghosts

• keys (list[tuple(int, int)]) –

Note: This is directly modified!

List of chain and site number tuples

• modified_index (int) – Index (in positions) of the site that has moved.

• ghost_indices (list[int]) – List of indices (in positions) of any existing ghostsites for the site.

• threshold (float) – Ghosting threshold (distance from the periodic boundaries that wecare care about ghosts)

• box_halfwidths (list[float]) – Halfwidths of the periodic boundary box

• box_center (numpy.array, optional) – Center of the periodic boundary box.Usually the origin.

Returns

• numpy.array – Array of points, updated with added/removed ghosts

• list[int] – List of indices of ghosts appended to input positions list

• list[int] – List of indices of ghosts removed from input positions list

src.backmapping.backmap_cones_package.input_output module Input and output functions forbackmap_cones.

src.backmapping.backmap_cones_package.input_output.get_chain_coordinates(lines)Extract chain coordinates from a list of input file lines automatically.

Parameters lines (list[str]) – List of str containing the coordinates of every CG site .Currently, these have to be formatted like they are as a result of the automated_workflowscript.

Returns List of Chain corresponding to the chains in the input lines.

20 Chapter 3. Table of contents

Page 25: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Return type list[Chain]

src.backmapping.backmap_cones_package.input_output.get_initial_parameters(input_lines)Extract physical parameters from input file.

Parameters input_lines (list[str]) – List of strings corresponding to the lines of the inputfile.

Returns Dictionary of various simulation parameters extracted from the input file.

Return type dict

src.backmapping.backmap_cones_package.input_output.write_output(filename,chain_list,param_dict)

Write output file.

Parameters

• filename (str) – Name for the output file to be saved as.

• chain_list (list[Chain]) – List of Chain objects

• param_dict (dict) – Dict of simulation parameters.

Returns

Return type None

src.backmapping.backmap_cones_package.interpolation module Functions that interpolate.

Note: All units use the LAMMPS “real” units; see the units command docs.

src.backmapping.backmap_cones_package.interpolation.interpolate_chain(initial_chain,bond_angle_target,bond_angle_weight,bond_length_target,bond_angle_threshold=0.2,test_mode=False)

Return a completely interpolated copy of input chain.

Applies the interpolation function to every pair of sites in the chain; also adds a new site at the end. As a result,the number of sites is doubled.

Parameters

• initial_chain (Chain) – Chain object whose sites are to be interpolated.

• bond_angle_target (float) – Bond angle the interpolation should try to make be-tween every bond.

• bond_length_target (float) – Bond length the interpolation should try to makebetween every bond.

• bond_angle_weight (float) – Must be between 0 and 1. How much the interpola-tion “cares” about the bond angle versus the bond length.

• bond_angle_threshold (float) – Bond angle threshold. Seeoptimize_interpolated_point() for more information.

• test_mode (bool) – If True, disables loop safety checks (for unit testing).

Returns Interpolated copy of input Chain.

3.6. API reference 21

Page 26: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Return type Chain

Examples

Only try to get the bond angles correct(notice bond_angle_weight is 1.):

>>> interpolate_chain(chn.Chain([np.array([1, 0, 0]), np.array([0, 0, 1])]),\... 0.5 * math.pi, 1., 1.)Chain: [array([1, 0, 0]), array([ 0.1595025 , 0.51780585, 0.1595025 ]), array([0, 0, 1]), array([-0.83188926, 0.52886581, 1.16811074])]>>> from src.backmapping.backmap_cones_package.diagnostics import print_bond_angles>>> print_bond_angles([_])Chain 1, angle [1, 2, 3]: 0.500000 pi radChain 1, angle [2, 3, 4]: 0.500000 pi radAverage angle: 0.500000 pi rad

Only try to get the bond lengths correct (notice bond_angle_weight is 0.):

>>> interpolate_chain(chn.Chain([np.array([1, 0, 0]), np.array([0, 0, 1])]),\... 0.5 * math.pi, 0., 1.)Chain: [array([1, 0, 0]), array([ 0.88713617, 0.44749433, 0.88713617]), array([0, 0, 1]), array([-0.13420756, 0.48207031, 1.86579244])]>>> from src.backmapping.backmap_cones_package.diagnostics import print_bond_lengths>>> print_bond_lengths([_])Chain 1, bond [1, 2]: 1.000000 AngstromsChain 1, bond [2, 3]: 1.000000 AngstromsChain 1, bond [3, 4]: 1.000000 AngstromsAverage bond length: 1.000000

src.backmapping.backmap_cones_package.interpolation.interpolate_on_cone(a,b,cone_radius)

Return a random point on the rim of a disk halfway between a, b.

Returns a coordinate that lies on a random point on the rim of a disk centered at the midpoint of coordinates aand b whose normal vector is the displacement vector from b to a and whose radius is cone_radius

Parameters

• a (numpy.array) – First vector defining the axis for the interpolation.

• b (numpy.array) – Other vector defining the axis for the interpolation.

• cone_radius (float) – Desired radius away from the midpoint of a and b to place thepoint.

Returns Interpolated point. Typically, this point is either a CG site or monomer that will be bondedto CG sites or monomers at points a and b.

Return type numpy.array

Notes

Called the cone interpolation method (for lack of a better name) since the disk and the two points form twocones.

22 Chapter 3. Table of contents

Page 27: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Examples

>>> interpolate_on_cone(np.array([1, 0, 0]), np.array([-1, 0, 0]), 1)array([ 0. , 0.38972695, 0.92093046])>>> vec.magnitude(_)1.0

src.backmapping.backmap_cones_package.interpolation.linear_scale(x1, y1, x2, y2,x)

Return y(x), where y is the line passing through the two input points.

Parameters

• x1 (float) – x-value for the first point

• y1 (float) – y-value for the first point

• x2 (float) – x-value for the other point

• y2 (float) – y-value for the other point

• x (float) – x-value to find the y-value of on the line.

Returns y(x), where y is the line defined by points (x1, y1), (x2, y2), and x is the argumentx.

Return type float

src.backmapping.backmap_cones_package.interpolation.optimize_interpolated_point(previous_cone_point,mu-tual_point,ini-tial_cone_point,fol-low-ing_point,bond_angle_target,bond_angle_threshold,test_mode=False)

Optimize an initial interpolation, given various conditions.

For now, the condition is that the bond angle between the previous interpolated point, the current interpolatedpoint, and the point they are both bonded to match the desired bond angle, to within a threshold. Other conditionscan be added here if desired.

Parameters

• previous_cone_point (numpy.array) – Previous interpolated point; used to checkthat bond angle condition is met.

• mutual_point (numpy.array) – Point between previous_cone_point andinitial_cone_point (they are both bonded to it).

• initial_cone_point (numpy.array) – Interpolated point that is to be optimized.

• following_point (numpy.array) – Point after initial_cone_point (andbonded to it). initial_cone_point was interpolated between mutual_point andfollowing_point.

• bond_angle_target (float) – Bond angle that the code should try to make betweenprevious_cone_point, mutual_point, and initial_cone_point, by rotat-ing initial_cone_point around its interpolation axis.

3.6. API reference 23

Page 28: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

• bond_angle_threshold (float) – Angle threshold for bond_angle_target.Program tries to get the bond angle within plus or minus bond_angle_threshold ofbond_angle_target.

• test_mode (bool) – If True, disables the loop safety check (for unit testing purposes).

Returns Optimized position vector for initial_cone_point.

Return type numpy.array

Notes

The four input points are bonded in the order they appear as arguments. In DOT notation:

previous_cone_point -- mutual_point -- initial_cone_point -- following_point

The method of optimization is to try rotating (by a random angle) the current interpolated point about the axisit was interpolated along and seeing if this satisfies the conditions desired. If not, keep trying, but no more thanloop_limit iterations.

Examples

A chain where the desired bond angle is 0.5 * math.pi:

>>> chain = chn.Chain([\... np.array([0, 0, -1]),\... np.array([1, 0, 0]),\... np.array([0, 0, 0]),\... np.array([0, 0, 1])])>>> from src.backmapping.backmap_cones_package.diagnostics import print_bond_angles>>> print_bond_angles([chain])Chain 1, angle [1, 2, 3]: 0.250000 pi radChain 1, angle [2, 3, 4]: 0.500000 pi radAverage angle: 0.375000 pi rad

>>> chain[2] = optimize_interpolated_point(\... chain[0], chain[1], chain[2], chain[3],\... 0.5 * math.pi, 0.1)>>> print_bond_angles([chain])Chain 1, angle [1, 2, 3]: 0.485000 pi radChain 1, angle [2, 3, 4]: 0.500000 pi radAverage angle: 0.493000 pi rad

src.backmapping.backmap_cones_package.interpolation.power_scale(term_dict, x)Return the sum of powers of x using the powers and coefficients in term_dict.

Parameters

• term_dict (dict) – Dictionary of terms in the power series, keyed by the power withfloat values for the coefficients.

• x (float) – Value to evaluate the power series at.

Returns Result of the power series at x.

Return type float

24 Chapter 3. Table of contents

Page 29: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Examples

Get the y-intercept of a straight line y(x) = 3.0 * x ** 0 - 0.5 * x ** 1:

>>> power_scale({0: 3.0, 1: -.5}, 0.)3.0

Works for negative powers (in this case, 1 / x):

>>> power_scale({-1: 1.}, 0.25)4.0

src.backmapping.backmap_cones_package.list_manipulation module Functions of lists.

exception src.backmapping.backmap_cones_package.list_manipulation.ListOfIndicesErrorBases: exceptions.Exception

src.backmapping.backmap_cones_package.list_manipulation.remove_indices_in_list_of_indices(original_indices,re-moved_indices)

Return the input list of indices, with indices removed and remaining ones properly shifted.

Currently, there are situations where lists of indices are being passed around, and sometimes indices get removedfrom that list. When this happens, it is necessary to shift the indices that are larger than the ones removed.

Parameters

• original_indices (list[int]) – List of indices that will be copied and have entriesremoved/shifted.

• removed_indices (list[int]) – List of indices dictating which indices to remove.

Returns Copy of original_indices with entries in removed_indices taken out and theremaining indices shifted.

Return type list[int]

src.backmapping.backmap_cones_package.nearest_neighbors module

src.backmapping.backmap_cones_package.vector module Functions of vectors (specifically, 1Dnumpy.ndarray objects).

Note: All units use the LAMMPS “real” units; see the units command docs.

src.backmapping.backmap_cones_package.vector.clip(x, l, u)Return x if x is within interval (l, u); if below l, return l; if above u, return u.

Parameters

• x (float) – Number to clip within range (l, u)

• l (float) – Lower bound

• u (float) – Upper bound

Returns

Return type float

3.6. API reference 25

Page 30: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

src.backmapping.backmap_cones_package.vector.enforce_pbc(v, box_halfwidths,box_center=<Mockname=’mock()’id=‘139813426796688’>)

Enforce periodic boundary conditions on a vector, moving it until within the PBC box.

Parameters

• v (numpy.array) – Vector to enforce PBC on

• box_halfwidths (list[float]) – Halfwidths of the PBC box

• box_center (numpy.array, optional) – Center of the PBC box Usually, this isthe origin

Returns Location of the vector after PBC has been enforced

Return type numpy.array

src.backmapping.backmap_cones_package.vector.get_angle_between(a, b)Return the angle between two vectors (in radians).

Parameters

• a (numpy.array) –

• b (numpy.array) –

Returns

Return type float

src.backmapping.backmap_cones_package.vector.get_perpendicular(v)Generate a normalized vector that is perpendicular to the input vector.

Having some vector that is perpendicular to the current vector is needed in some functions, and this methodguarantees not to produce division by zero.

Parameters v (numpy.array) – Input vector.

Returns Vector perpendicular to input vector.

Return type numpy.array

Notes

The returned vector is not random. This function just guarantees to safely return some vector that is perpendic-ular to the input vector.

Examples

>>> get_perpendicular(np.array([1, 0, 0]))array([ 0., 0., -1.])

src.backmapping.backmap_cones_package.vector.magnitude(v)Return input vector magnitude.

Parameters v (numpy.array) –

Returns

Return type float

26 Chapter 3. Table of contents

Page 31: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

src.backmapping.backmap_cones_package.vector.normalize(v)Return normalized input vector.

Parameters v (numpy.array) –

Returns

Return type numpy.array

src.backmapping.backmap_cones_package.vector.point_is_inside_box(point,box_halfwidths,box_center=<Mockname=’mock()’id=‘139813426796368’>)

Return True if the point is inside the box.

Parameters

• point (numpy.array) – The point to be checked if inside box.

• box_halfwidths (list[float]) – List of floats representing the x, y, and zhalfwidths of the box.

• box_center (numpy.array, optional) – Center of the box.

Returns True if the point is inside the box.

Return type bool

src.backmapping.backmap_cones_package.vector.project_onto(a, b)Return the vector projection of a onto b.

Parameters

• a (numpy.array) – Vector that will be projected.

• b (numpy.array) – Vector that will be projected onto.

Returns

Return type numpy.array

src.backmapping.backmap_cones_package.vector.random_unit_sphere_vector()Generate a uniformly random vector on the unit sphere.

Returns

Return type numpy.array

src.backmapping.backmap_cones_package.vector.repel_from(moving_point, fixed_point,distance)

Repel moving_point away from fixed_point by distance.

The direction the point is repelled along is defined by the vector difference of the two input vectors.

Parameters

• moving_point (numpy.array) – Point to be repelled.

• fixed_point (numpy.array) – Point that is repelled away from.

• distance (float) – Distance to repel the point.

Returns Final location after repel.

Return type numpy.array

3.6. API reference 27

Page 32: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Examples

>>> v = np.array([1, 0, 0])>>> repel_from(v, np.zeros(3), 1)array([ 2., 0., 0.])

src.backmapping.backmap_cones_package.vector.rotate_about_axis(point,axis_start,axis_end, an-gle)

Rotate point around the axis axis_start - axis_end by angle.

Rotation is counterclockwise around the axis. The magnitude of the vector is preserved; it is moved along theedge of the disk defined by the normal vector axis_start - axis_end.

Parameters

• point (numpy.array) – Position vector to be rotated about the axis.

• axis_start (numpy.array) – Position vector that defines the tail of the axis.

• axis_end (numpy.array) – Position vector that defines the head of the axis.

• angle (float) – Radian angle of the counter-clockwise rotation.

Returns Rotated input vector.

Return type numpy.array

Examples

>>> x = np.array([1, 0, 0])>>> z = np.array([0, 0, 1])>>> o = np.zeros(3)>>> np.around(rotate_about_axis(x, o, z, .5 * math.pi), 3)array([ 0., 1., 0.])

Module contents

Submodules

src.backmapping.average_cg_properties module

src.backmapping.backmap module

src.backmapping.backmap_cones module

src.backmapping.chain_histograms module Reads a chain coordinates file and displays a histogram of the desiredquantity.

Currently, bond angle and bond length are supported.

src.backmapping.chain_histograms.main()

28 Chapter 3. Table of contents

Page 33: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

src.backmapping.create_fragments module

Module contents

Submodules

src.lammps_input_generator module

Functions for generating LAMMPS input files.

src.lammps_input_generator.generate_com_file_jinja(first_iter, start_time, cg_timesteps,steps_per_frame, cutoff, tem-plate_dir, args)

Generate and return a LAMMPS input file for a CG simulation.

Parameters

• first_iter (bool) – Indicates whether or not this is the first iteration of the workflowloop.

• start_time (int) – Timestep that the CG simulation begins at.

• cg_timesteps (int) – Total number of timesteps to run the CG simulation.

• steps_per_frame (int) – Timesteps in between each LAMMPS data output dump.

• cutoff (float) – Radius of the potential energy cutoff.

• template_dir (str) – Directory containing the template file.

• args (argparse.Namespace) – See generate_input_from_template() fordetails.

Returns Completed input file.

Return type file

src.lammps_input_generator.generate_input_from_template(sim_name,sites_per_chain,template_directory,args, thermo=0,dump_steps=10, run=0,reset_timestep=0)

Generate and return a LAMMPS input file from the specified template.

Parameters

• sim_name (str) – Name for the input file to be generated. This is used to label the outputfiles that LAMMPS will produce to avoid over-writing and, more importantly, is used tolocate and load the correct template file.

• sites_per_chain (int) – Number of sites per chain (either CG blobs or UAmonomers). For a UA input file, sites_per_chain is equal to the number of monomers perchain. For a CG input file, it is equal to the number of CG blobs per chain. For now, this isjust used to calculate the mass per site.

• template_directory (str) – Absolute path of the directory containing the templatefiles.

3.6. API reference 29

Page 34: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

• args (argparse.Namespace) – This is the output of a parser.parse_args(), which ex-tracts the command line flags when a command is enterred in terminal. In particular, this isusually the flags from running automated_fastequil.

• thermo (int) – Timesteps per thermodynamics data write out

• dump_steps (int) – Timesteps per dump file write out

• run (int) – Number of timesteps to run the simulation. NOTE: This is only implementedin the afterfast template for now!

• reset_timestep (int) – Sets the initial timestep to this when running simulation. Usu-ally not necessary to specify.

Returns Completed input file.

Return type file

src.settings_helper module

src.settings_helper.create_settings_file(args)

src.settings_helper.create_startup_file(args, input_file, src_dir)

src.settings_helper.create_startup_file_CG(args, input_file, src_dir)

src.settings_helper.create_startup_file_CG2(args, input_file, src_dir)

src.settings_helper.create_vmd_xyz_blobs_file(args, filename)

src.settings_helper.create_vmd_xyz_blobs_file_adres(args, filename)

src.settings_helper.create_vmd_xyz_file(args, filename, com)

src.settings_helper.create_vmd_xyz_traj_startup_file(src_dir, args)

Module contents

Note: Source code documentation rendered automagically using sphinx-apidoc.

3.7 Documentation for this documentation

This project is documented using reStructuredText, Sphinx, and ReadTheDocs.

The purpose of this page is to help contributors understand how to work with these tools to keep the documentationfunctioning and up to date.

30 Chapter 3. Table of contents

Page 35: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

Contents

• Documentation for this documentation– Introduction– File structure

* conf.py* index.rst* content/

– Useful Sphinx commands

3.7.1 Introduction

First, let’s describe what reStructuredText, Sphinx, and ReadTheDocs actually do.

reStructuredText (reST) A simple plaintext markup syntax, similar to Markdown. Some programs (like Sphinx) canconvert reST to pretty HTML.

Sphinx A Python package that is used to generate documentation (usually HTML) for code (usually Python code).

Our project uses Sphinx to...

• Crawl through the code and find documentation strings (which must be in reST syntax)

– Documentation strings (or docstrings) are specially formatted strings within the code that describehow the code works. Most of these are in function definitions. We use the NumPy docstringformat

– These docstrings are used to create the API reference pages

• Render HTML from *.rst files

– These can be files created by hand, such as README.rst

– or, they can be files generated by Sphinx, such as the API reference pages

Setting up Sphinx creates some files it needs by default (index.rst and conf.py); other files can be addedlater when the documentation becomes more complex. See File structure below for information on what thesedo.

ReadTheDocs (RTD) A website for hosting documentation rendered with Sphinx.

RTD is not necessary; only Sphinx (and documentation written with reST syntax) is needed to render documen-tation. If desired, we could render the HTML with Sphinx and host it ourselves.

However, RTD streamlines the process with a number of features...

• Free hosting for documentation pages

• Integrates with GitHub in a few ways

• Automatically runs SOME (not all) Sphinx commands on a daily basis (and whenever code is pushed tothe master branch)

– RTD will run sphinx-build, which looks for changes to docstrings in files that Sphinx “knowsabout”, then renders all the HTML from *.rst files; see Useful Sphinx commands for more infor-mation.

– However, RTD will NOT run sphinx-apidoc (as of 2016/01/14), which recursively “tells Sphinx”where all of the files are with docstrings (otherwise, you have to do this by hand). Thus, if a new filewith docstrings is created, we must run sphinx-apidoc again; see Useful Sphinx commands formore information.

3.7. Documentation for this documentation 31

Page 36: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

3.7.2 File structure

In this project, all files needed by Sphinx and RTD are located in the docs/ folder. The most important files thereinare explained below.

conf.py

This is the configuration file that Sphinx reads whenever it is used to build the documentation (that is, whensphinx-build runs). It is automatically generated when Sphinx is set up for the first time. This file does thefollowing for Sphinx...

• tells Sphinx where the project source code resides

• tells Sphinx what extensions to use

• sets various optional settings

Warning: Be careful making changes to this file, it is easy to break!

index.rst

This constructs the welcome page (index.html) for the documentation. This file is required by Sphinx.

Note: Most importantly, it contains the toctree directive (a table of contents), where you must add any custom*.rst files, or else they will not be seen by Sphinx!

content/

This folder contains custom content that is linked to by the index.rst page. Here is where you will find the tutorialsand glossary, among other things.

3.7.3 Useful Sphinx commands

If you want to try building the HTML locally, run (from this folder):

sphinx-build ./ ./_build/

Note: If you get an error about ’sphinx.ext.napoleon’, you are probably using an old version of Sphinx!

If you have added files with new docstrings, run this (from this folder) to inform Sphinx about them:

sphinx-apidoc -o ./api ../src -f

Note: Be sure to run this whenever you create a file with new docstrings, or else it will not get added to the APIreference!

32 Chapter 3. Table of contents

Page 37: Fast-Equilibration-Workflow Documentation

CHAPTER 4

Indices and tables

• genindex

• modindex

• search

33

Page 38: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

34 Chapter 4. Indices and tables

Page 39: Fast-Equilibration-Workflow Documentation

Python Module Index

ssrc, 30src.backmapping, 29src.backmapping.backmap_cones_package,

28src.backmapping.backmap_cones_package.chain,

8src.backmapping.backmap_cones_package.diagnostics,

16src.backmapping.backmap_cones_package.ghost,

18src.backmapping.backmap_cones_package.input_output,

20src.backmapping.backmap_cones_package.interpolation,

21src.backmapping.backmap_cones_package.list_manipulation,

25src.backmapping.backmap_cones_package.vector,

25src.backmapping.chain_histograms, 28src.lammps_input_generator, 29src.settings_helper, 30

35

Page 40: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

36 Python Module Index

Page 41: Fast-Equilibration-Workflow Documentation

Index

Symbols-bondlength, 7-cnot, 7-cut, 7-database, 7-hmmrthresh, 7-iseed, 7-mono_mass, 7-nbondtype, 7-nchain, 7-nmonomer, 7-nsets, 7-ntype, 7-nvt, 7-restrict, 7-rg2, 7-rhostar, 7-sitesperchain, 7-swaptype, 7-temp, 7-timestep, 7-viz, 7__eq__() (src.backmapping.backmap_cones_package.chain.Chain

method), 8__getitem__() (src.backmapping.backmap_cones_package.chain.Chain

method), 8__len__() (src.backmapping.backmap_cones_package.chain.Chain

method), 8__repr__() (src.backmapping.backmap_cones_package.chain.Chain

method), 9__setitem__() (src.backmapping.backmap_cones_package.chain.Chain

method), 9

Aappend() (src.backmapping.backmap_cones_package.chain.Chain

method), 9are_in_same_chain() (in module

src.backmapping.backmap_cones_package.chain),14

Cc_not, 6CG, 6chain, 6Chain (class in src.backmapping.backmap_cones_package.chain),

8clip() (in module src.backmapping.backmap_cones_package.vector),

25coarse-grained, 7coarse-graining, 7COM, 6copy() (src.backmapping.backmap_cones_package.chain.Chain

method), 9create_settings_file() (in module src.settings_helper), 30create_startup_file() (in module src.settings_helper), 30create_startup_file_CG() (in module src.settings_helper),

30create_startup_file_CG2() (in module

src.settings_helper), 30create_vmd_xyz_blobs_file() (in module

src.settings_helper), 30create_vmd_xyz_blobs_file_adres() (in module

src.settings_helper), 30create_vmd_xyz_file() (in module src.settings_helper),

30create_vmd_xyz_traj_startup_file() (in module

src.settings_helper), 30

Eenforce_pbc() (in module

src.backmapping.backmap_cones_package.vector),25

equal_upto_pbc() (src.backmapping.backmap_cones_package.chain.Chainmethod), 9

Fflatten() (in module src.backmapping.backmap_cones_package.chain),

14flatten_numpy() (in module

src.backmapping.backmap_cones_package.chain),

37

Page 42: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

15

Ggenerate_com_file_jinja() (in module

src.lammps_input_generator), 29generate_ghost_chain_cells() (in module

src.backmapping.backmap_cones_package.ghost),18

generate_ghost_sites_with_threshold() (in modulesrc.backmapping.backmap_cones_package.ghost),18

generate_ghosts_of_point() (in modulesrc.backmapping.backmap_cones_package.ghost),19

generate_input_from_template() (in modulesrc.lammps_input_generator), 29

get_angle_between() (in modulesrc.backmapping.backmap_cones_package.vector),26

get_average_bond_angle()(src.backmapping.backmap_cones_package.chain.Chainmethod), 9

get_average_bond_length()(src.backmapping.backmap_cones_package.chain.Chainmethod), 10

get_average_dihedral_angle()(src.backmapping.backmap_cones_package.chain.Chainmethod), 10

get_bond_angle() (src.backmapping.backmap_cones_package.chain.Chainmethod), 10

get_bond_length() (src.backmapping.backmap_cones_package.chain.Chainmethod), 11

get_centroid() (src.backmapping.backmap_cones_package.chain.Chainmethod), 11

get_centroids_of_subdivisions()(src.backmapping.backmap_cones_package.chain.Chainmethod), 11

get_chain_and_site_number() (in modulesrc.backmapping.backmap_cones_package.chain),15

get_chain_coordinates() (in modulesrc.backmapping.backmap_cones_package.input_output),20

get_dihedral_angle() (src.backmapping.backmap_cones_package.chain.Chainmethod), 11

get_initial_parameters() (in modulesrc.backmapping.backmap_cones_package.input_output),21

get_perpendicular() (in modulesrc.backmapping.backmap_cones_package.vector),26

get_vectors_to_vertices_edges_faces_of_box() (in mod-ule src.backmapping.backmap_cones_package.ghost),19

Iinsert() (src.backmapping.backmap_cones_package.chain.Chain

method), 12interpolate_chain() (in module

src.backmapping.backmap_cones_package.interpolation),21

interpolate_on_cone() (in modulesrc.backmapping.backmap_cones_package.interpolation),22

Llinear_scale() (in module

src.backmapping.backmap_cones_package.interpolation),23

ListOfIndicesError, 25

Mmagnitude() (in module

src.backmapping.backmap_cones_package.vector),26

main() (in module src.backmapping.chain_histograms),28

Nnormalize() (in module

src.backmapping.backmap_cones_package.vector),26

Ooptimize_interpolated_point() (in module

src.backmapping.backmap_cones_package.interpolation),23

PPE, 7plot_chains() (in module

src.backmapping.backmap_cones_package.diagnostics),16

point_is_inside_box() (in modulesrc.backmapping.backmap_cones_package.vector),27

power_scale() (in modulesrc.backmapping.backmap_cones_package.interpolation),24

print_bond_angles() (in modulesrc.backmapping.backmap_cones_package.diagnostics),17

print_bond_lengths() (in modulesrc.backmapping.backmap_cones_package.diagnostics),17

print_centroids() (in modulesrc.backmapping.backmap_cones_package.diagnostics),17

38 Index

Page 43: Fast-Equilibration-Workflow Documentation

Fast-Equilibration-Workflow Documentation, Release 0.1.1

project_onto() (in modulesrc.backmapping.backmap_cones_package.vector),27

Rrandom_unit_sphere_vector() (in module

src.backmapping.backmap_cones_package.vector),27

recenter() (src.backmapping.backmap_cones_package.chain.Chainmethod), 12

redo_pbc() (src.backmapping.backmap_cones_package.chain.Chainmethod), 12

remove_indices_in_list_of_indices() (in modulesrc.backmapping.backmap_cones_package.list_manipulation),25

repel_from() (in modulesrc.backmapping.backmap_cones_package.vector),27

rescale() (src.backmapping.backmap_cones_package.chain.Chainmethod), 13

reverse_indices() (src.backmapping.backmap_cones_package.chain.Chainmethod), 13

Rg2, 7rotate_about_axis() (in module

src.backmapping.backmap_cones_package.vector),28

rounded() (src.backmapping.backmap_cones_package.chain.Chainmethod), 13

Sselect_parts_of_ghost_chains_in_box() (in module

src.backmapping.backmap_cones_package.ghost),19

site, 7src (module), 30src.backmapping (module), 29src.backmapping.backmap_cones_package (module), 28src.backmapping.backmap_cones_package.chain (mod-

ule), 8src.backmapping.backmap_cones_package.diagnostics

(module), 16src.backmapping.backmap_cones_package.ghost (mod-

ule), 18src.backmapping.backmap_cones_package.input_output

(module), 20src.backmapping.backmap_cones_package.interpolation

(module), 21src.backmapping.backmap_cones_package.list_manipulation

(module), 25src.backmapping.backmap_cones_package.vector (mod-

ule), 25src.backmapping.chain_histograms (module), 28src.lammps_input_generator (module), 29src.settings_helper (module), 30

Ttranslate() (src.backmapping.backmap_cones_package.chain.Chain

method), 13

UUA, 7undo_pbc() (src.backmapping.backmap_cones_package.chain.Chain

method), 13unflatten() (in module

src.backmapping.backmap_cones_package.chain),15

united atom, 7update_ghost_sites() (in module

src.backmapping.backmap_cones_package.ghost),20

Vvisualize_point_distance() (in module

src.backmapping.backmap_cones_package.diagnostics),17

Wwrite_output() (in module

src.backmapping.backmap_cones_package.input_output),21

Index 39