"plugins/vscode:/vscode.git/clone" did not exist on "1c938ceb94463310186729431de0ba22f6df6a91"
Commit 471bea82 authored by Lee-Ping Wang's avatar Lee-Ping Wang
Browse files

Merge branch 'master' of github.com:SimTk/openmm

parents c5bc333f 02adeefa
......@@ -2026,6 +2026,7 @@ void ReferenceIntegrateCustomStepKernel::initialize(const System& system, const
// Create the computation objects.
dynamics = new ReferenceCustomDynamics(system.getNumParticles(), integrator);
SimTKOpenMMUtilities::setRandomNumberSeed((unsigned int) integrator.getRandomNumberSeed());
vector<ReferenceCCMAAlgorithm::AngleInfo> angles;
findAnglesForCCMA(system, angles);
constraints = new ReferenceCCMAAlgorithm(system.getNumParticles(), numConstraints, constraintIndices, constraintDistances, masses, angles, (RealOpenMM)integrator.getConstraintTolerance());
......
......@@ -8,7 +8,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012 Stanford University and the Authors.
Portions copyright (c) 2012-2013 Stanford University and the Authors.
Authors: Christopher M. Bruns
Contributors: Peter Eastman
......@@ -139,6 +139,7 @@ class PdbStructure(object):
self.models_by_number = {}
self._unit_cell_dimensions = None
self.sequences = []
self.modified_residues = []
# read file
self._load(input_stream)
......@@ -178,6 +179,8 @@ class PdbStructure(object):
if len(self.sequences) == 0 or chain_id != self.sequences[-1].chain_id:
self.sequences.append(Sequence(chain_id))
self.sequences[-1].residues.extend(pdb_line[19:].split())
elif (pdb_line.find("MODRES") == 0):
self.modified_residues.append(ModifiedResidue(pdb_line[16], int(pdb_line[18:22]), pdb_line[12:15].strip(), pdb_line[24:27].strip()))
self._finalize()
def write(self, output_stream=sys.stdout):
......@@ -278,6 +281,14 @@ class Sequence(object):
self.chain_id = chain_id
self.residues = []
class ModifiedResidue(object):
"""ModifiedResidue holds information about a modified residue, as specified by a MODRES record."""
def __init__(self, chain_id, number, residue_name, standard_name):
self.chain_id = chain_id
self.number = number
self.residue_name = residue_name
self.standard_name = standard_name
class Model(object):
"""Model holds one model of a PDB structure.
......
......@@ -36,7 +36,8 @@ import sys
import math
import xml.etree.ElementTree as etree
from copy import copy
from simtk.openmm import Vec3
from datetime import date
from simtk.openmm import Vec3, Platform
from simtk.openmm.app.internal.pdbstructure import PdbStructure
from simtk.openmm.app import Topology
from simtk.unit import nanometers, angstroms, is_quantity, norm, Quantity
......@@ -242,6 +243,7 @@ class PDBFile(object):
- topology (Topology) The Topology defining the molecular system being written
- file (file=stdout) A file to write the file to
"""
print >>file, "REMARK 1 CREATED WITH OPENMM %s, %s" % (Platform.getOpenMMVersion(), str(date.today()))
boxSize = topology.getUnitCellDimensions()
if boxSize is not None:
size = boxSize.value_in_unit(angstroms)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment