3 Center an entire model based on a selection.
7 This file is part of LOOS.
9 LOOS (Lightweight Object-Oriented Structure library)
10 Copyright (c) 2012 Tod Romo, Grossfield Lab
11 Department of Biochemistry and Biophysics
12 School of Medicine & Dentistry, University of Rochester
14 This package (LOOS) is free software: you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation under version 3 of the License.
18 This package is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program. If not, see <http://www.gnu.org/licenses/>.
model_name = sys.argv
selection = sys.argv
center = GCoord(0,0,0)
center = center + atom.coords()
center = center / len(subset)
atom.coords(atom.coords() - center)
pdb = PDB.fromAtomicGroup(model)
pdb.remarks().add("Structure centered using '"
+ selection + "'"
AtomicGroup createSystem(const std::string &filename)
Factory function for reading in structure files.
AtomicGroup selectAtoms(const AtomicGroup &source, const std::string selection)
Applies a string-based selection to an atomic group...