porblem importing sparky project

I am trying to import a sparky project in ccpn but I get this error, but I don’t know how I shoul proceed.

Thank you in advance.

Hi Andromachi,

we probably won’t get a chance to look at this properly until after tomorrow’s workshop (things are usually pretty hectic around here in advance of a workshop or conference).

Clearly the issue is that the program is trying to create a new NmrAtom that already exists. So one question is whether perhaps you already have an NmrChain called molecule in your project and which is causing these issues. If so, you could rename the existing NmrChain before doing the import.

Alternatively, there are two parts of the Sparky project which are both referencing the same NmrAtom and the program hasn’t realised that it has already created this.

So if the issue is not that you already have an NC:molecule NmrChain in your project, then I would suggest you send us the Sparky project and we’ll take a look.


Dear Vicky,

I tried to create NEF format of the SPARKY list so I can import them on ccpn but it seemed more difficult than I thought.

I have tried once to import sparky project to ccpn with similar lists and it worked but this time I don’t seem to understand what the problem is.

If you could have a look maybe you spot something I cannot.

Thank you a lot for your help.



(Attachment IDR_sparky_ccpn.zip is missing)

Hi Andromachi,

very happy to take a look. I think you’ll have to send us the project to support@ccpn.ac.uk, rather than uploading it here, though.


Yes I did.

Let me know if you received it! Thanks again


(Attachment IDR_sparky_ccpn.zip is missing)

Yes, got it now. Thanks.


I’ve had a look at your project and there are a number of different issues going on here, related to the way in which the Sparky importer works. The big issue with importing from Sparky has always been that Sparky doesn’t impose a particular format on assignments etc., so it is very difficult to recognise these automatically.
So let’s start with a few things the Sparky Importer does/assumes:

  1. It assumes that your assignments come in the format
    |A301|CA| 0 13C
    i.e. that at the beginning you have the 1-letter amino acid residue code followed by the sequence number. Now in your case, you didn’t have assignments, so it was just taking the first number and putting that into the Sequence Code part of the NmrAtoms. Really we should be more intelligent here and check that the first character is a letter and otherwise leave the amino acid type blank! Anyway, if you add an A to the start of everything you can get round that for now.
  2. It strips out any ? symbols. So this is why it got stuck in your case. You had a 16 CA line and then a 16? CA line. So, the program thought the second one was also 16 CA and then didn’t like that (or rather it thought they were both NA:6.1.CA in Analysis terms because the 1 was being turned into the amino acid type). For now I simply turned things like 16? into 1600 to get around this.
  3. It reads peak lists from the .save files and not the .list files. So what you sent us, didn’t load any peak lists, just the NmrAtoms.
  4. The Chemical Shift List is created from the peaks, not the imported Sparky resonance list in the .proj file. So again, what you sent us, didn’t create a Chemical Shift List.

So hopefully, armed with this information, you might manage to sort out your Sparky import. I’ll send you the amended .proj file that I created and that does load.

But please be aware that there is still a bug in the import of peak lists which means if the order of the dimensions is different to what Analysis is expecting, you it won’t import them properly. I’ll see if I can look into that later this week to work out how we can solve this. Changing the order in the .save files is quite tedious, I think, because it isn’t really in a list format.

The other thing you can try for Sparky import, is that the latest version (NMRFAM-SPARKY, I think) actually includes a NEF writer - but apparently only for the Chemical Shift and Chain, not the Peaks. It did at one point have a bug: a mismatch between the order of the column headers and the data, so do check those are all correct, if you go down that route.


1 Like