Classes and functions

DNA

class open3SPN2.DNA(periodic=True)[source]

A Coarse Grained DNA object.

parseConfigurationFile(configuration_file='/home/docs/checkouts/readthedocs.org/user_builds/open3spn2/checkouts/latest/open3SPN2/3SPN2.conf')[source]

Reads the configuration file for the forcefield. The default configuration file is 3SPN2.conf and it contains most of the parameters used in the simulation.

getSequences()[source]

Returns the DNA sequence as a Pandas Series. The index of the Series is (Chain, resid)

computeGeometry(sequence=None, temp_name='temp')[source]

This function requires X3DNA. It returns a pdb table containing the expected DNA structure

computeTopology(template_from_X3DNA=True, temp_name='temp')[source]

Creates tables of bonds, angles and dihedrals with their respective parameters (bonded interactions). 3SPN2.C requires a template structure to calculate the equilibrium bonds, angles and dihedrals. If template_from_structure is True, it will try to compute the equilibrium geometry using X3DNA. If template_from_structure is False, then the initial structure is expected to be the equilibrium geometry

writePDB(pdb_file='clean.pdb')[source]

Writes a minimal version of the pdb file needed for openmm

classmethod fromCoarsePDB(pdb_file, dna_type='B_curved', template_from_X3DNA=True, temp_name='temp', compute_topology=True)[source]

Initializes a DNA object from a pdb file containing the Coarse Grained atoms

classmethod fromPDB(pdb_file, dna_type='B_curved', template_from_X3DNA=True, output_pdb='clean.pdb', temp_name='temp', compute_topology=True)[source]

Creates a DNA object from a complete(atomistic) pdb file

static CoarseGrain(pdb_table)[source]

Selects DNA atoms from a pdb table and returns a table containing only the coarse-grained atoms for 3SPN2

classmethod fromSequence(sequence, dna_type='B_curved', output_pdb='clean.pdb', temp_name='temp', compute_topology=True)[source]

Initializes a DNA object from a DNA sequence

classmethod fromXYZ(xyz_file, dnatype='B_curved', template_from_X3DNA=True, output_pdb='clean.pdb', temp_name='temp', compute_topology=True)[source]

Initializes DNA object from xyz file (as seen on the examples)

System

class open3SPN2.System(dna, forcefieldFiles=['/home/docs/checkouts/readthedocs.org/user_builds/open3spn2/checkouts/latest/open3SPN2/3SPN2.xml'], periodicBox=None)[source]

Wrapper of openmm system class, adds some openmm simulation attributes

__init__(self)System[source]
__init__(self, other)System

Create a new System.

Methods

DNA Forces

class open3SPN2.Bond(dna, force_group=6, OpenCLPatch=True)[source]
class open3SPN2.Angle(dna, force_group=7, OpenCLPatch=True)[source]
class open3SPN2.Dihedral(dna, force_group=9, OpenCLPatch=True)[source]
class open3SPN2.Stacking(dna, force_group=8, OpenCLPatch=True)[source]
class open3SPN2.BasePair(dna, force_group=10, OpenCLPatch=True)[source]
class open3SPN2.CrossStacking(dna, force_group=11, OpenCLPatch=True)[source]
class open3SPN2.Exclusion(dna, force_group=12, OpenCLPatch=True)[source]
class open3SPN2.Electrostatics(dna, force_group=13, temperature=Quantity(value=300, unit=kelvin), salt_concentration=Quantity(value=100, unit=millimolar), OpenCLPatch=True)[source]

DNA - Protein Forces

class open3SPN2.ExclusionProteinDNA(dna, protein, k=1, force_group=14)[source]

Protein-DNA exclusion potential

class open3SPN2.ElectrostaticsProteinDNA(dna, protein, k=1, force_group=15)[source]

DNA-protein and protein-protein electrostatics.

Utils

open3SPN2.parseConfigTable(config_section)[source]

Parses a section of the configuration file as a table. This function is used to parse the 3SPN2.conf file

open3SPN2.parsePDB(pdb_file)[source]

Transforms the pdb file into a pandas table for easy access and data editing

open3SPN2.fixPDB(pdb_file)[source]

Uses the pdbfixer library to fix a pdb file, replacing non standard residues, removing hetero-atoms and adding missing hydrogens. The input is a pdb file location, the output is a fixer object, which is a pdb in the openawsem format.

open3SPN2.pdb2table(pdb)[source]

Parses a pdb in the openmm format and outputs a table that contains all the information on a pdb file

Tests

class open3SPN2.TestEnergies[source]

Tests that the energies are the same as the example outputs from lammps

open3SPN2.test_DNA_from_xyz()[source]

Tests the correct parsing from an xyz file

open3SPN2.test_parse_xyz()[source]

Tests the example trajectory parsing

open3SPN2.test_parse_log()[source]

Tests the example log parsing

Exceptions

class open3SPN2.DNATypeError(dna)[source]

Only some DNA types are defined (A, B, B_curved)