Ensemble generation

Generate a Random Ensemble

The following example shows how to generate an ensemble of 10 Structure instances rotated within 0 and 90° and translated within 0 to 5 Å:

from EnsembleGeneration import  *

EnsembleGeneration=EnsembleGeneration()

structure_instance=PDBParser.read_PDB_file('structure_id','filename')
ensemble_list=EnsembleGeneration.randomise_structs(\
       structure_instance, 10, 5, 90)

Generate an Angular Sweep Ensemble

The following example shows how to generate an ensemble of 10 Structure instances using angular sweeps with a rotation angle of 100° around a specified rotation axis using a translation vector as before:

from EnsembleGeneration import  *

EnsembleGeneration=EnsembleGeneration()

translation_vector=[4.3, 1.0, -55]
rotation_angle= 110
axis=[0.21949010788898163, -0.80559787935161753, -0.55030527207975843]
structure_instance=PDBParser.read_PDB_file('structure_id','filename')
ensemble_list=EnsembleGeneration.anglar_sweep(structure_instance,axis, \
    translation_vector, 10, rotation_angle, 'structure_instance_angular_sweep', atom_com_ind=False)

NOTE It is advisable to chose the number of structures for the ensemble accordingly with the angular increment step (rotation angle/number of structures) and/or the translational increment step (translation vector/number of structures) to have a more homogeneous ensemble.