Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions polyconf/polyconf/Polymer.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def extend(self, monomer, n, nn, names, joins, ortho=[1,1,1],
:type beta: int, optional

For example:
{'P1':'CA','Q1':'C','P2':'CMA','Q2':'CN'}, with n=1 and
{'P':'CMA','Q':'CA','R':'CN','S':'C'}, with n=1 and
nn=2 and joins=[('C','CA')] would produce a polymer of
'...-CA1-C1-CA2-C2-...'

Expand Down Expand Up @@ -291,13 +291,20 @@ def rotate(self,J,J_resid,K,K_resid,mult=3,step=1):
"""
Given a pair of bonded atoms J and K within some torsion, uses _split_pol() to identify all atoms connected to J, then rotates them around vector JK by (step * int(360/mult)) degrees, rotating the dihedral centered over J-K by one step.

Args:
J (atom name): the name of the first atom in the bond
J_resid: the resid of the first atom in the bond
K (atom name): the name of the second atom in the bond
K_resid: the resid of the second atom in the bond
mult: the multiplicity of the dihedral centered over J-K
step: how many steps around the dihedral to rotate
:param J: the name of the first atom in the torsion
:type J: str
:param J_resid: the resid of the first atom in the torsion
:type J_resid: int
:param K: the name of the second atom in the torsion
:type K: str
:param K_resid: the resid of the second atom in the torsion
:type K_resid: int
:param mult: the multiplicity of the dihedral centered over J-K,
defaults to 3
:type mult: int, optional
:param step: how many steps to rotate around the torsion, where one step = 320/mult degrees,
defaults to 3
:type step: int, optional
"""

fore,_=self._split_pol(J,J_resid,K,K_resid)
Expand Down Expand Up @@ -353,13 +360,13 @@ def shuffle(self,J,J_resid,K,K_resid,dummies='X*',mult=3,cutoff=0.5,clashcheck=F
resulting structure has overlapping atoms, and will undo the rotation
if so.

:param J: the name of the first atom in the bond
:param J: the name of the first atom in the torsion
:type J: str
:param J_resid: the resid of the first atom in the bond
:param J_resid: the resid of the first atom in the torsion
:type J_resid: int
:param K: the name of the second atom in the bond
:param K: the name of the second atom in the torsion
:type K: str
:param K_resid: the resid of the second atom in the bond
:param K_resid: the resid of the second atom in the torsion
:type K_resid: int
:param dummies: the names of dummy atoms, to be excluded from the
distance calculation. Passed to :func:`dist`, defaults to 'X*'
Expand Down