Default constructor
Constructor taking selection string as argument.
| Parameters: | sel_str (str) – Selection string |
|---|
Constructor taking another system.
| Parameters: | other_system (System) – Other system to construct from. |
|---|
Note
Selections associated with the system are not copied!
| Returns: | number of atoms in the system |
|---|---|
| Return type: | int |
| Returns: | number of frames in the system |
|---|---|
| Return type: | int |
| Parameters: | str (string) – selection string |
|---|---|
| Returns: | selection object for given selection string |
| Return type: | Selection |
| Parameters: | |
|---|---|
| Returns: | selection object for given range of indexes |
| Return type: |
| Parameters: | l (sequence) – python list or tuple with selection indexes |
|---|---|
| Returns: | selection object for given indexes |
| Return type: | Selection |
Load any supported file format from disk (structure or trajectory)
| Parameters: |
|---|
Usage:
# Define the callback
def callback(sys,fr):
print sys.num_atoms(),fr
# Load structure file
sys = System('struct.pdb')
# Load trajectory with callback
sys.load('traj.xtc',on_frame=callback)
Duplicates given frame and adds it to the end of frame vector
Copy all frame data from fr1 to fr2
Delete specified range of frames. If only b is supplied deletes all frames from b to the end. If only e is supplied deletes all frames from 0 to e.
| Parameters: |
|---|
| Returns: | whole Frame structure from frame fr. |
|---|---|
| Return type: | Frame object |
| Parameters: | data (Frame) – Frame object to set as frame fr |
|---|
| Returns: | Periodic box from frame fr. |
|---|---|
| Return type: | Periodic_box object |
| Parameters: | data (Periodic_box) – box to set for frame fr |
|---|
| Returns: | time stamp (in ps) from frame fr. |
|---|---|
| Return type: | float |
| Returns: | XYZ coordinates of atom ind from frame fr. |
|---|---|
| Return type: | numpy.array(3) |
| Parameters: |
|---|
| Parameters: | frame (Frame) – Frame object to add |
|---|
Assign unique resindexes. This is usually done automatically upon loading a structure from file.
| Parameters: | indexes (sequence) – list of tuple of atom indexes to duplicate |
|---|
Warning
This method is slow due to internal convertion between Python and C++ lists!
| Parameters: |
|
|---|
Warning
This method is slow due to internal convertion between Python and C++ lists!
| Parameters: | dims (array_like(3)) – dimensions to wrap |
|---|
| Returns: | selection pointing to added atoms |
|---|---|
| Return type: | Selection |
Determines secondary structure with DSSP algorithm and writes detailed report to file
Determines secondary structure with DSSP algorithm and returns it as a code string. The code is the same as in DSSP program:
| structure | code |
|---|---|
| alphahelix | “H” |
| betabridge | “B” |
| strand | “E” |
| helix_3 | “G” |
| helix_5 | “I” |
| turn | “T” |
| bend | “S” |
| loop | “” (space) |
| Returns: | DSSP code string |
|---|
Sorts atoms by resindex arranging atoms with the same resindexes into contigous pieces. Could be called after atom additions or duplications.