"replace new_atom, ..." Replace pk1 with New Atom

This section provides a tutorial on how to replace the first picked atom pk1 with a new atom using the 'replace ...' command in PyMol.

If you want to change the first picked atom, pk1, you can use the "replace new_atom ..." command.

replace new_atom, new_geometry, new_valence

For example, the following command replaces the first picked atom with "C" atom and sets geometry to 1 and valence to 1.

replace C, 1, 1

Note that you can use any integer value for geometry and valence properties of the new atom. And you can change them with the "set_geometry" command later.

For example, the following command script will pick the atom at the index of 7 and replace it with Nitrogen atom

delete all
load Molecule-HY-001.sdf
hide all
show sticks
turn z, -90
edit id 7
replace N, 1, 1
MyMol Replace the First Picked Atom
MyMol Replace the First Picked Atom

Table of Contents

 About This Book

 Introduction of Molecules

 Molecule Names and Identifications

 Protein and Amino Acid

 Nucleobase, Nucleoside, Nucleotide, DNA and RNA

 Gene and Chromosome

 Protein Kinase (PK)

 SDF (Structure Data File)

 RDKit: Open-Source Cheminformatics Software

 PyMol Installation

 PyMol GUI and CLI

 PyMol Selections

PyMol Editing Functions

 "pk1", "pk2", "pk3" and "pk4" Selections

 "edit id n1, id n2, id n3, id n4" Commands

 "remove pk*" and "remove_picked" Commands

 "unbond pk1, pk2" and "bond pk1, pk2" Commands

"replace new_atom, ..." Replace pk1 with New Atom

 "attach new_atom, ..." Attach to pk1 with New Atom

 Build Alcohol Molecule with PyMol

 PyMol Measurement Functions

 PyMol Movie Functions

 PyMol Python Integration

 PyMol Object Functions

 ChEMBL Database - European Molecular Biology Laboratory

 PubChem Database - National Library of Medicine

 PDB (Protein Data Bank)

 INSDC (International Nucleotide Sequence Database Collaboration)

 Resources and Tools

 Molecule Related Terminologies


 Full Version in PDF/EPUB