-
Notifications
You must be signed in to change notification settings - Fork 32
CodeLibrary
Welcome to the Code Library. Here you can find useful C++ and Python code snippets for the BALL and VIEW libraries as well as the BALLView application. An introduction to our Python interface can be found here.
Feel free to add your own code to this page (please make sure to read how to post first)!
- Opening and writing any molecular file format known by BALL (C++ , Python)
- Load a PDBFile into a Protein (C++ , Python)
- Write a system into a PDBFile (C++ , Python)
- Load a DCDFile into a Protein (C++)
- Write a protein into a DCDFile (C++)
- Convert molecular files between different formats (C++, Python)
- Iterate over all Chains in a System (C++ , Python)
- Iterate over all Residues of a System (C++ , Python)
- Iterate over Atoms specified by SMARTS expression(s) (C++ , Python)
- Iterate over all Proteins of a System (C++ , Python)
- Iterate over all Chains of a Protein (C++ , Python)
- Iterate over all Residues of a Chain (C++ , Python)
- Iterate over all Atoms of a Residue (C++ , Python)
- Iterate over all Atoms of a Molecule (C++ , Python)
- Iterate over all Bonds of an Atom (C++ , Python)
- Iterate over all Atoms in an AtomContainer (C++ , Python)
- Iterate over all Atom pairs in an AtomContainer (C++)
- Iterate over all Bonds in an AtomContainer (C++)
- Create a simple Molecule (C++ , Python)
- Determining the element type of an Atom (C++)
- Create a peptide from its amino acid sequence (C++ , Python)
- Determining the Protein's amino acid sequence in one/three-letter-code (C++ , Python)
- Get the one letter code amino acid sequence out of a .pdb file (C++)
- Get a single chain out of a system (C++)
- Get backbone atoms of a protein(C++ , Python)
- Map two Molecules (C++)
- Remove water in a System(C++ , Python)
- Computing angles in BALL (C++ , Python)
- Translate an entire Molecule (C++)
- Locate atoms in a spatial proximity (HashGrid) (C++ , Python)
- Compute Secondary Structures of a molecule (C++)
- Check whether a bond is aromatic without actually setting aromaticity (C++)
- Change the rotamer of a residue (C++)
- Add caps to a peptide (C++)
- Mutate amino acids of a protein or peptide (C++)
- Translate a functional group (C++)
- Compute the Surface (Solvent Accessible Surface - SAS) areas of atoms (C++ , Python)
- Assign radii (C++ , Python)
- Compute Hydrogen bonds of a molecule (C++)
- Add missing hydrogens to a protein (C++)
- Add missing hydrogens to a ligand (C++ , Python)
- Energetically minimize a protein's conformation (C++)
- Compute Amber Energy of a system (C++)
- Map two structures onto each other and calculate their RMSD (C++ , Python)
- Physical constants in BALL (C++ , Python)
- Store user defined properties of atoms (C++ , Python)
- Create temporary files (C++ , Python)
- Aromatize a Molecule's bonds (C++)
- Compute Hydrogen bonds of a Molecule (C++ , Python)
- Kekulize a Molecule's bond orders (C++)
- Convert atom names between naming schemata (C++)
- Convert hydrogens from PDB to BMRB naming scheme (C++)
- Compute bond orders of a ligand (C++ , Python)
You can run Python code from within the BALLView application through the Python widget (until version 1.4) or the Jupyter plugin (since version 1.5).
- Visualize the results of your script (Python)
- Identify neighboring residues for a given selection (Python)
- Minimize the RMSD of two systems (Python)
- Remove Water (Python)
- Add missing hydrogen atoms to a system and optimize their positions (Python)
- Create simple geometric objects (Python)
- Setup an explicit solvent molecular dynamics (MD) simulation (Python)
If you have code snippets that could be useful to other users, feel free to post them here.
Please make sure that your code compiles prior to posting!
You can get syntax highlighting by enclosing your code in ticks `
in markdown followed by the language (either cpp
or python
)
For further information on how to post, just look at some examples found on this page.