def defaultEquilRestraints(self, decay, mol=None): """Get the default equilibration restraints Parameters ---------- decay : str The restrains will get scaled to 0 over this much time. Returns ------- restraints : list A list of default protein restraints Examples -------- >>> md = Equilibration() >>> res = md.defaultEquilRestraints('20ns') """ caatoms = AtomRestraint("protein and name CA", 0, [(1, 0), (0, decay)]) notcaatoms = AtomRestraint("protein and noh and not name CA", 0, [(0.1, 0), (0, decay)]) nucleic = AtomRestraint("nucleic and backbone", 0, [(1, 0), (0, decay)]) nucleicside = AtomRestraint("nucleic and not backbone and noh", 0, [(0.1, 0), (0, decay)]) restraints = [caatoms, notcaatoms, nucleic, nucleicside] if mol is not None: restraints = [ r for r in restraints if mol.atomselect(r.selection).sum() ] return restraints
def _constraints2restraints(self): restraints = list() for constr in sorted(self.constraints): restraints.append(AtomRestraint(constr, 0, [(self.constraints[constr], 0)])) return restraints
def defaultEquilRestraints(self, decay): """ Get the default protein restraints Parameters ---------- decay : str The restrains will get scaled to 0 over this much time. Returns ------- restraints : list A list of default protein restraints Examples -------- >>> md = Equilibration() >>> res = md.defaultEquilRestraints('20ns') """ caatoms = AtomRestraint("protein and name CA", 0, [(1, 0), (0, decay)]) notcaatoms = AtomRestraint( "protein and noh and not name CA", 0, [(0.1, 0), (0, decay)] ) return [caatoms, notcaatoms]