コード例 #1
0
ファイル: equilibration_v3.py プロジェクト: raimis/htmd
    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
コード例 #2
0
ファイル: production_v6.py プロジェクト: yulanl22/htmd
    def _constraints2restraints(self):

        restraints = list()
        for constr in sorted(self.constraints):
            restraints.append(AtomRestraint(constr, 0, [(self.constraints[constr], 0)]))

        return restraints
コード例 #3
0
ファイル: equilibration_v3.py プロジェクト: yinxx/htmd
    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]