# ColorRamp works in Material mode but not when it's rendered

I have a problem: I'm trying to model a DNA. I have it set up, but when I have a color ramp set to two different colors, it only shows one when rendering. But when I click Material in the 3d view, I can see it fine...Does anyone know what is happening?

EDIT: As requested, here is my .blend file:

Here are some screenshots of what happened (and my nodes)

Material mode Rendered mode

• I can't replicate this behaviour - please Edit your question to add additional details of how your scene is set up. For example, I've assumed each of the 'bars' is a separate mesh, but all with the same material. It would also be useful to be able to see your .blend file - please upload it to blend-exchange.giantcowfilms.com and edit your question to include the link. – Rich Sedman Aug 19 '18 at 22:58
• @RichSedman Done – Sam1370 Aug 20 '18 at 2:52
• I can't replicate what you're seeing when I try your file on Blender 2.76 - in fact, I see exactly the opposite (ie, Material view shows all green but Rendered shows alternating colors). It is as if in Material mode that the object Location is always zero. – Rich Sedman Aug 20 '18 at 6:20