next up previous contents index
Next: model.to_iupac() standardize Up: The model class: handling Previous: model.pick_hot_atoms() pick   Contents   Index

model.randomize_xyz() -- randomize MODEL coordinates

deviation = <float:1> 0.0 coordinate randomizaton amplitude in angstroms

Description:
This command randomizes the Cartesian coordinates of the selected atoms (set 1) in MODEL. If deviation is positive, the coordinates are randomized by the addition of a random number uniformly distributed in the interval from $-{\sf deviation}\index{deviation@{\sf deviation}}$ to $+{\sf deviation}\index{deviation@{\sf deviation}}$ angstroms. If deviation is negative, the coordinates are assigned a random value uniformly distributed in the interval from $-{\sf deviation}\index{deviation@{\sf deviation}}$ to $+{\sf deviation}\index{deviation@{\sf deviation}}$ angstroms.

Example: examples/commands/randomize_xyz.py


# Example for: model.randomize_xyz()

# This will randomize the X,Y,Z of the model:

env = environ()

mdl = model(env, file='1fas')

# Change existing X,Y,Z for +- 4 angstroms:
mdl.randomize_xyz(deviation=4.0)
mdl.write(file='1fas.ini1')

# Assign X,Y,Z in the range from -100 to 100 angstroms:
mdl.randomize_xyz(deviation=-100.0)
mdl.write(file='1fas.ini2')



Ben Webb 2005-04-21