Commit ff4c490e authored by peastman's avatar peastman
Browse files

Default extra particle identifier is the same for reading and writing

parent 30cac992
...@@ -260,7 +260,7 @@ class PDBFile(object): ...@@ -260,7 +260,7 @@ class PDBFile(object):
map[atom.attrib[id]] = name map[atom.attrib[id]] = name
@staticmethod @staticmethod
def writeFile(topology, positions, file=sys.stdout, keepIds=False, extraParticleIdentifier=' '): def writeFile(topology, positions, file=sys.stdout, keepIds=False, extraParticleIdentifier='EP'):
"""Write a PDB file containing a single model. """Write a PDB file containing a single model.
Parameters Parameters
...@@ -276,7 +276,7 @@ class PDBFile(object): ...@@ -276,7 +276,7 @@ class PDBFile(object):
rather than generating new ones. Warning: It is up to the caller to rather than generating new ones. Warning: It is up to the caller to
make sure these are valid IDs that satisfy the requirements of the make sure these are valid IDs that satisfy the requirements of the
PDB format. Otherwise, the output file will be invalid. PDB format. Otherwise, the output file will be invalid.
extraParticleIdentifier : string=' ' extraParticleIdentifier : string='EP'
String to write in the element column of the ATOM records for atoms whose element is None (extra particles) String to write in the element column of the ATOM records for atoms whose element is None (extra particles)
""" """
PDBFile.writeHeader(topology, file) PDBFile.writeHeader(topology, file)
...@@ -303,7 +303,7 @@ class PDBFile(object): ...@@ -303,7 +303,7 @@ class PDBFile(object):
a*10, b*10, c*10, alpha*RAD_TO_DEG, beta*RAD_TO_DEG, gamma*RAD_TO_DEG), file=file) a*10, b*10, c*10, alpha*RAD_TO_DEG, beta*RAD_TO_DEG, gamma*RAD_TO_DEG), file=file)
@staticmethod @staticmethod
def writeModel(topology, positions, file=sys.stdout, modelIndex=None, keepIds=False, extraParticleIdentifier=' '): def writeModel(topology, positions, file=sys.stdout, modelIndex=None, keepIds=False, extraParticleIdentifier='EP'):
"""Write out a model to a PDB file. """Write out a model to a PDB file.
Parameters Parameters
...@@ -323,7 +323,7 @@ class PDBFile(object): ...@@ -323,7 +323,7 @@ class PDBFile(object):
make sure these are valid IDs that satisfy the requirements of the make sure these are valid IDs that satisfy the requirements of the
PDB format. No guarantees are made about what will happen if they PDB format. No guarantees are made about what will happen if they
are not, and the output file could be invalid. are not, and the output file could be invalid.
extraParticleIdentifier : string=' ' extraParticleIdentifier : string='EP'
String to write in the element column of the ATOM records for atoms whose element is None (extra particles) String to write in the element column of the ATOM records for atoms whose element is None (extra particles)
""" """
......
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