Dear Lothar [I’ve copied this to the CCP4 team in case they have suggestions]
I don’t think there is any specific guidance for writing a “CCP4 program” - the programs distributed in the suite have been written in a diversity of styles and languages over many years - but I can offer a few thoughts As a former Fortran programmer, I wouldn’t recommend Fortran now. There some really useful libraries to handle common crystallographic calculations, written in C++, and accessible also from Python, but not easily from Fortran. These include the Clipper library in CCP4 (from Kevin Cowtan); and cctbx, which is used by Phenix, but is also distributed by CCP4. These libraries also provide access to the file formats for reflection lists and coordinates, see below. Personally, I write in C++, but the use of Python at the high level along with C++ libraries to do the compute-intensive parts is also popular, and this approach is used in Phenix and DIALS Reflection lists should be read and written using the binary MTZ file format, using the libraries. The “normal” merged MTZ files (each hkl occurring only once) can most easily be accessed using the Clipper or cctbx libraries, though the lower level CCP4 libraries can also be used. Unmerged reflection lists (multiple observations fro each hkl), in the data reduction steps, are a bit more complicated. Traditionally MTZ files may contain multiple types of data for each hkl, identified by column lables,e.g. different observed intensities, or Fs, phases, figures of merit, etc, but the recent ccp4 GUI ccp4i2 stores “miniMTZ” files containing only one type of data, e.g. observed I/sigma(I), phase/figure-of-merit, map coefficients etc, and this may be more used in future Coordinate files also should be read and written using libraries, as this allows automatic switching between old-style PDB format and mmCIF. Clipper provides easy APIs for simple use, built on top of the more elaborate but flexible MMDB2 library I find the CCP4 build system inconvenient for development work, though is good for distribution: I just use an editor and a Makefile, old school, but other people probably have other more modern ways of working Looking at existing (preferably reasonably recent) programs is useful to see various ways of accessing the general framework of reflection lists and coordinate lists which are central to most crystallographic calculations Good luck Phil > On 13 Jul 2017, at 15:54, esse...@helix.nih.gov wrote: > > Dear Prof. Evans, > > I am writing to you to solicit your expertise as a ccp4 developer. The > principal investigator of our group has interest in developing ccp4-based > programs and has done so with some success. However, I was wondering if > there is a comprehensive set of instructions how to write ccp4 programs well > and which tools to use incl. perhaps IDEs like Eclipse or so. I know about > the developer page on ccp4's website but it seems to be heavy on interfaces > i.e. I have not found a clear comprehensive set of tools for ccp4 developers > that includes how to write makefiles etc. I think the PI is mostly > interested in small stand-alone fortran program that do not require much > graphics. Can you give me a hint ? It is possible that I cannot see the > forest for all the trees - in which case I apologize. > > Thanks and kind regards, > > Dr. Lothar Esser > > National Institutes of Health > National Cancer Institute. >