"docs-source/usersguide/vscode:/vscode.git/clone" did not exist on "0fc91b7742aff40aa6f101ec8d383528e59e2540"
Commit e7a47007 authored by joaorodrigues's avatar joaorodrigues
Browse files

Lipid res. numbs. are now incremental, not read from patch PDB

parent 4d4e349b
......@@ -1400,18 +1400,22 @@ class Modeller(object):
newAtoms = {}
lipidChain = membraneTopology.addChain()
lipidResNum = 1 # renumber lipid residues to handle large patches
for (nearest, residue, pos) in addedLipids:
if skipFromLeaf[lipidLeaf[residue]] > 0:
# Remove the same number of residues from each leaf.
skipFromLeaf[lipidLeaf[residue]] -= 1
else:
newResidue = membraneTopology.addResidue(residue.name, lipidChain, residue.id, residue.insertionCode)
newResidue = membraneTopology.addResidue(residue.name, lipidChain, lipidResNum, residue.insertionCode)
lipidResNum += 1
for atom in residue.atoms():
newAtom = membraneTopology.addAtom(atom.name, atom.element, newResidue, atom.id)
newAtoms[atom] = newAtom
membranePos += pos
for bond in resBonds[residue]:
membraneTopology.addBond(newAtoms[bond[0]], newAtoms[bond[1]], bond.type, bond.order)
del lipidLeaf
del addedLipids
......
Markdown is supported
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