You are here: Home Collaborations Developer Notes Wim Vranken ChemComps

ChemComps

Info on chemComp code

Code and procedures to generate and update from databases

This code lives at the PDBe. In essence, a chemComp is created/updated if the reference information in the PDB derived database appears/changes. It is then automatically checked into the CcpForge ccpnchemcomp CVS repository.

 

Code and procedures to generate from mol, mol2, pdb, etc. files.

This is part of the FormatConverter code, and is handled similar to NMR data files (parsing code on ccp/format/ level, actual creation in CCPN code on ccpnmr/format/ level). The best format for input is mol2 - it has the most detailed information.

To load in a new chemComp via the GUI:

  1. Go to Import->Single Files->Chemical compounds->(format of choice)
  2. Select the file. Note that you can change some options under 'Additional options'
  3. Press IMPORT.
  4. You will now get a window where you can modify some of the imported information, or add new info, on the general chemComp level. Press OK when done.
  5. In the next window you can change atom information. Note that for molType protein a CA, C and O atom have to be present.
  6. It will then ask for a descriptor for the ChemCompVar. In principle you can modify this, but just press OK for neutral.
  7. You can then add other ChemCompVars, but this is not the best way to do it (direct scripts are advisable).


For more complicated imports it's much better to do it on the script level, see the file python/ccpnmr/format/examples/createChemCompFromMol2.py for an example.

 

Code for checking chemComps

Some not very sophisticated scripts are in the python/pdbe/chemComp/check/ directory.

  • checkChemComps.py: Does some basic atom/bond checks.
  • listCcInfo.py: Lists some information on the chemComp.

 

Code and procedures for ad-hoc modifications (add link, protonation state etc.)

The code for dealing with archived chemComps is in python/pdbe/chemComp.

This generally works off the archive chemComp data in data/pdbe/chemComp/. The archive/ directory contains the chemComp(Coord) info for the CcpForge repository (editChemComp(Coord)DataDir in the code), the obsolete/ directory obsolete chemComps (the old files for ones that have been updated - only at the EBI), the test/ directory data for testing scripts and such (testChemComp(Coord)DataDir in the code).

In the directory modify/, there are a couple of scripts to make modifications:

  • addLinkingToChemComp.py: Can use this to add a new ChemCompVar with a particular linking to a ChemComp. See __main__ part of script for more info on how to run this.
  • addSubstituent.py: Add a substituent (e.g. CH3) to an existing chemComp. See __main__ part of script on how to use this - it's dictionary based and slightly more complicated. Other examples available from the carbo/makeAllSugars.py script. Requires subsituent .mol2 files in data/ccp/mol2/subst/, with the subsituent atom that links indicated with name SUB.
  • editChemComp.py: (not functional) Should open the chemComp GUI editor, but completely out of date these days I think - could be updated if necessary.

 

Code and procedures for generating new Carbohydrate ChemComps from standard carbohydrate core and ligands (EuroCarbDb)

There are two scripts that deal with everything:

  • makeFullSugar.py: Creates a 'base' chemComp for a carbohydrate. Requires .mol2 coordinate files in data/ccp/mol2/carbo/<base sugar name>/.
  • makeAllSugars.py: Creates a set of modified sugars based on the modifiedCarbs dictionary in the script. The key for the dictionary is the carbo base name, the value is a list of modifications with first the atom from the base carbohydrate to connect the subsituent to, then the name of the substituent. Multiple changes are separated by a ':'.