-end</code></pre><p>Finally, we can save the changed residues in a new PDB file.</p><pre><code class="language-julia hljs">write_file("4zj9_hydrophobicity.pdb", pdb_residues, PDBFile)</code></pre><h2 id="Discussion"><a class="docs-heading-anchor" href="#Discussion">Discussion</a><a id="Discussion-1"></a><a class="docs-heading-anchor-permalink" href="#Discussion" title="Permalink"></a></h2><p>While we have focused on changing the B-factor field of a <code>PDBAtom</code>, you can use the same approach to change other fields. However, if you want to change atom coordinates, it is better to use the <code>change_coordinates</code> function from the PDB module of MIToS.</p><p>MIToS atoms and residues generally stores the string present in the input file without surrounding spaces. You can use the <code>Format</code> module to create these strings and <code>strip</code> to get rid of the spaces. You can see the <a href="https://www.wwpdb.org/documentation/file-format-content/format23/sect9.html">PDB format description</a> to know what is the format of the expected string or see the <a href="https://github.com/diegozea/MIToS.jl/blob/master/src/PDB/PDBParser.j">MIToS PDB print_file source code</a> to get a quick idea.</p><hr/><p><em>This page was generated using <a href="https://github.com/fredrikekre/Literate.jl">Literate.jl</a>.</em></p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../Pfam/">« Pfam</a><a class="docs-footer-nextpage" href="../02_Linking_structural_and_evolutionary_information/">Linking structural and evolutionary information »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Thursday 10 July 2025 12:40">Thursday 10 July 2025</span>. Using Julia version 1.11.5.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments