This section provides a tutorial on how to build an alcohol molecule with PyMol commands.
PyMol also have a command add hydrogen atoms
to the molecule structure if there are not include
with the "h_add" command.
Together with "h_add" and "replace" commands,
we have build an alcohol molecule from
a single carbon atom.
# load the carbon atom from an SDF file
# add hydrogen atoms to form the methane molecule
# replace one hydrogen atom to carbon
edit id 2
replace C, 1, 1
# replace another hydrogon atom to oxygen
edit id 3
replace O, 1, 1
# save the molecule to an SDF file
save Alcohol-Molecule.sdf, all, -1, sdf
The result is an alcohol molecule.
Some hydrogen atoms are not located
in correct angles. I can fix them later.