Technical Documentation
Utilities: Make Random and Fixed Lines

The MakeLine module provides functions to generate the coordinates of lines.

The MakeLine module is located in Yup.Tools. Thus, the required import statement is some variant of: from Yup.Tools.MakeLine import *.

Currently, there is a function to generate a line with a specified distribution of spacing between the points, angles spanned by three successive points and torsion angle spanned by four successive points. There a another function that can generate a line with a desired average span, angle and torsion distribution with specified standard deviations.


The fixedline() function creates a line with a specified distribution of spacings, angles and torsions.

Function Name
Number of Arguments
Return Value
fixedline
4
tuple of tuple
Argument
Type
Preset Value
spacings
list of floats
-
angles
list of floats
-
torsions
list of floats
-
recenter
integer
0

The spacings argument must contain a list of distances between successive points in the line.

The angles argument must contain a list of angles [radians] between a succession of three points in the line. The angle for three atoms 1-2-3 is between the line segments 1-2 and 2-3. Thus, it is 0 radian (0 degrees) for a straight line segment. The first angle in the list will not be used.

The torsions argument contains a list of torsional angles [radians] between a succession of four points in the line. This can be applied only if the four atoms are not in a plane. The first and second torsion angles will not be used.

Although the leading angles and torsions are not used, the three lists must be of equal length. Angular measures must be given in radians.

The recenter argument is set to 0 (the default) if the generated coordinates are not modified in any way. Set to any value other than zero, to recenter the coordinates on the origin.

The returned tuple contains the coordinate tuples (of three floats) of the generated line. There will be one more point than the number of spacings provided.


The randomline() function returns the coordinates of a randomly generated line.

Function Name
Number of Arguments
Return Value
randomline
8
tuple of tuple
Argument
Type
Preset Value
numpoints
integer
-
spacing
float
-
ds
float
0.0
angle
float
0.0
da
float
0.0
torsion
float
0.0
dt
float
0.0
recenter
integer
0

The numpoints argument specifies the number of points in the desired line. The number of line segments is one less than this number.

This spacing argument specifies the average spacing between successive points.

The ds argument specifies the standard deviation in the spacings between successive points.

The angle argument specifies the average angle spanned by three successive points of the line. A straight line segment has an angle of 0.0 degrees.

The da argument specifies the standard deviation in the angle spanned by three successive points of the generated line.

The torsion argument specifies the average torsional angle spanned by four successive points of the line.

The dt argument specifies the standard deviation of the torsional angles spanned by four successive points of the generated line.

The recenter argument specifies whether the generated coordinates are to be recentered at the origin or not.

This function first generates the spacings, angles and torsion to the specified statistics, then calls fixedline() to actually generate the coordinates.


Technical
Introduction
Directory
Vectors
Energy
Model
Assembly
Methods
FPF
FFF
AVF
TaroScript
YammpScript
Python
Utilities

Home
Information
News
User
Technical
Programmer
iYup
Download
Showcase
ETC