Latest release | |
---|---|
Status | |
Community |
Armadillo is a Python toolkit which when supplied with a topology and trajectory file is able to produce a list of rings that are π-stacking with one another. From this the toolkit can also be used to plot this data and create .pdb file so that the stacking rings can be visualized. In addition to this the toolkit is highly customisable by the user as the distance and alpha constraints can be altered by the user from the default values that have been set.
armadillo is bound by a Code of Conduct.
To build armadillo from source,
we highly recommend using virtual environments.
If possible, we strongly recommend that you use
Anaconda as your package manager.
Below we provide instructions for conda
Ensure that you have conda installed.
Create a virtual environment and activate it:
conda create --name armadillo
conda activate armadillo
Install the development and documentation dependencies:
conda env update --name armadillo --file devtools/conda-envs/test_env.yaml
conda env update --name armadillo --file docs/requirements.yaml
If you want to update your dependencies (which can be risky!), run:
conda update --all
And when you are finished, you can exit the virtual environment with:
conda deactivate
Import armadillo and MDanalysis
import armadillo
import MDAnalysis as mda
Loading universe
u = mda.Universe('topology.prmtop', 'trajectory.nc')
Atomgroup containing atoms that make up rings
ag = sum(u.atoms.fragments[:20])
Calling the function to find all the rings
ring_list = armadillo.find_all_rings(ag, u)
Looping over the trajectory to produce all the pi-stacking rings
pi_parallel_stacking=[]
pi_t_shaped = []
for ts in u.trajectory[:25:5]:
parallel_stacking, t_shaped = armadillo.find_pi_stacking_rings(ring_list, ag)
pi_parallel_stacking.append(parallel_stacking)
pi_t_shaped.append(t_shaped)
Plotting distrubution of pi-stacking rings
armadillo.pi_stacking_distribution(pi_parallel_stacking[4], pi_t_shaped[4], ring_list, ag, u, frame=20)
First flatten parallel and t-shaped
flat_parallel_pi_stacking = list(armadillo.itertools.chain.from_iterable(pi_parallel_stacking[4]))
flat_t_shaped_pi_stacking = list(armadillo.itertools.chain.from_iterable(pi_t_shaped[4]))
Create atomgroups for the two lists
pi_ag = sum([ring_list[ix] for ix in flat_parallel_pi_stacking])
t_ag = sum([ring_list[ix] for ix in flat_t_shaped_pi_stacking])
Add tempfactors to the universe
u.add_TopologyAttr('tempfactors')
Assign tempfactors to stacking rings
pi_ag.tempfactors=2
t_ag.tempfactors=3
Write pdb file with these tempfactors and visulise in VMD using beta colouring
u.atoms.write('beta_example.pdb')
The armadillo source code is hosted at https://github.com/TristanSJones/armadillo and is available under the GNU General Public License, version 3 (see the file LICENSE).
Copyright (c) 2023, Tristan Stephens-Jones
armadillo was created by the follow authors
Project based on the MDAnalysis Cookiecutter version 0.1. Please cite MDAnalysis when using armadillo in published work.