Commit dc623af9 authored by cmaffeo2's avatar cmaffeo2
Browse files

Fixed bugs in psf bond writing

parent bd033319
......@@ -72,14 +72,14 @@ class CanonicalNucleotideFactory(Group):
b = self.bonds
a = self.angles
d = self.dihedrals
i = self.impropers
imp = self.impropers
for i,j in zip(b[::2],b[1::2]):
nt.add_bond( atoms[i], atoms[j], None )
for i,j,k in zip(a[::3],a[1::3],a[2::3]):
nt.add_angle( atoms[i], atoms[j], atoms[k], None )
for i,j,k,l in zip(d[::4],d[1::4],d[2::4],d[3::4]):
nt.add_dihedral( atoms[i], atoms[j], atoms[k], atoms[l], None )
for i,j,k,l in zip(d[::4],d[1::4],d[2::4],d[3::4]):
for i,j,k,l in zip(imp[::4],imp[1::4],imp[2::4],imp[3::4]):
nt.add_improper( atoms[i], atoms[j], atoms[k], atoms[l], None )
return nt
......
......@@ -506,6 +506,8 @@ class PdbModel(Transformable, Parent):
if counter == 4:
fh.write("\n")
counter = 0
else:
fh.write(" ")
fh.write("\n")
## Write out angles
......@@ -518,6 +520,8 @@ class PdbModel(Transformable, Parent):
if counter == 3:
fh.write("\n")
counter = 0
else:
fh.write(" ")
fh.write("\n")
## Write out dihedrals
......@@ -530,6 +534,8 @@ class PdbModel(Transformable, Parent):
if counter == 2:
fh.write("\n")
counter = 0
else:
fh.write(" ")
fh.write("\n")
## Write out impropers
......@@ -542,6 +548,8 @@ class PdbModel(Transformable, Parent):
if counter == 2:
fh.write("\n")
counter = 0
else:
fh.write(" ")
fh.write("\n")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment