Skip to content

Instantly share code, notes, and snippets.

@pepijn-devries
Last active August 29, 2015 14:27
Show Gist options
  • Save pepijn-devries/b46434bb62ff04599596 to your computer and use it in GitHub Desktop.
Save pepijn-devries/b46434bb62ff04599596 to your computer and use it in GitHub Desktop.
# required packages
require(rcdk)
require(rgl)
# download 3D structure of acetylcholine from Pubchem:
download.file("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/187/record/SDF/?record_type=3d&response_type=save&response_basename=Structure3D_CID_187",
"acetylcholine.sdf", mode = "wb")
# load the downloaded file:
molfile <- load.molecules("acetylcholine.sdf")[[1]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment