Skip to content

Commit b3d4fd0

Browse files
committed
expand docs on duplicate atom error
1 parent 49dac0c commit b3d4fd0

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

docs/src/documentation.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4104,7 +4104,20 @@ In general chemical terms: [`MolecularStructure`](@ref) is analogous to ensemble
41044104
The aim of BioStructures is not so much to read in the rows of a structure file, but to unambiguously represent the molecules contained within the file.
41054105
This makes operations such as converting between file formats easier, at the cost of some complexity and occasional limits on the ability to read in files with format violations.
41064106
For example, we have no way to represent multiple copies of the same atom with the same alt loc ID, as they would be placed at the same spot in the hierarchy.
4107-
Such files often lead to silent errors, however, so we recommend users follow the appropriate format guidelines.
4107+
Consequently, trying to read a PDB file containing the lines
4108+
```
4109+
ATOM 1 N GLY A 1 25.776 38.291 47.527 1.00 0.00 N
4110+
ATOM 2 N GLY A 1 25.020 38.731 48.032 1.00 0.00 N
4111+
```
4112+
leads to the error
4113+
```
4114+
ERROR: Two copies of the same atom have the same alternative location ID. Existing atom:
4115+
Atom N with serial 1, coordinates [25.776, 38.291, 47.527]
4116+
New atom record to add:
4117+
AtomRecord N with serial 2, coordinates [25.02, 38.731, 48.032]
4118+
```
4119+
Such files often lead to silent errors, however, so we recommend that users follow the appropriate format guidelines.
4120+
Alternatively, other tools such as [PDBTools.jl](https://github.com/m3g/PDBTools.jl) are more permissive in what they accept.
41084121
The mmCIF format is able to store arbitrary data systematically if required.
41094122

41104123
## Related software

0 commit comments

Comments
 (0)