Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 1 addition & 13 deletions polyconf/polyconf/Polymer.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ def extend(self, monomer, n, nn, names, joins, ortho=[1,1,1],
any dummy atoms.

"""
# TODO I renamed the atoms in the manuscript, so I guess I gotta fix that here
# cool.
# love that for me.

Q = self.polymer.select_atoms(f"resid {n} and name {names['Q']}").positions[-1]
S = self.polymer.select_atoms(f"resid {n} and name {names['S']}").positions[-1]
Expand Down Expand Up @@ -238,14 +235,6 @@ def extend(self, monomer, n, nn, names, joins, ortho=[1,1,1],

u_r2 = u_r1.atoms.rotateby(theta,axis=k,point=V1)

# R= u_.select_atoms('resid '+str(nn)+' and name '+names['R']).positions[0]
# S= u_.select_atoms('resid '+str(nn)+' and name '+names['S']).positions[0]
# RS=S-R
# RS_n=np.linalg.norm(RS)
# ortho_n=np.linalg.norm(ortho)
# check = degrees(np.arccos(np.dot(RS,ortho)/(RS_n * ortho_n)))
# if abs(check)>1: print('linear check =' ,check)

u_r1=u_r2

# combine extended polymer into new universe
Expand Down Expand Up @@ -421,7 +410,6 @@ def dihedral_solver(self,pairlist,dummies='X*',cutoff=0.7,backwards_only=True):
resolved and no clashes detected
:rtype: bool
"""
# TODO stepback isn't working right, it's not stepping back far enough
steps=len(pairlist)
tries={x:0 for x in range(0,steps)} # how many steps around the dihedral have we tried? resets to zero if you step backwards
fails={x:0 for x in range(0,steps)} # how many times have we had to step backwards at this monomer? the more times, the further back we step
Expand Down Expand Up @@ -461,7 +449,7 @@ def dihedral_solver(self,pairlist,dummies='X*',cutoff=0.7,backwards_only=True):
done=True
if failed or i<0: # hard coded to detect failure if you stop at i<=0 because detecting this automatically wasn't working
print('Could not reach a valid conformation')
print('Perhaps you should try building a pseudolinear geometry with .extend(linearize=True) or randomising all dihedrals with shuffler(), and then try solving a conformation again')
print('Perhaps you should try building a pseudolinear geometry with .extend(linearise=True) or randomising a subset of the dihedrals with shuffler(), and then try solving a conformation again')
return True
else:
return False
Expand Down
Empty file modified polyconf_examples/01a_build_PEI_with_extend.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/01b_build_PEI_with_linear_extend.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/01c_build_PEI_then_solve.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/01d_build_PEI_conformation.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/01e_build_PEI_conformation_ensemble.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/02a_build_PMMA_isotactic.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/02b_build_PMMA_syndiotactic.py
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions polyconf_examples/02c_build_PMMA_atactic.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
dh += [sidechains[i]]

print('attempting to solve initial conformation')
print('the random seed in this example script has been chosen specifically so that this process fails')
print('this is expected and is part of the tutorial')

PMMA_atactic.dihedral_solver(dh,dummies=dummies,cutoff=1.1)

Expand Down
Empty file.
Empty file modified polyconf_examples/03_build_branched_PEI.py
100644 → 100755
Empty file.
Empty file modified polyconf_examples/04_build_randomly_branched_PEI.py
100644 → 100755
Empty file.
232 changes: 0 additions & 232 deletions polyconf_examples/build_PMMA.py

This file was deleted.