I don't think clams are especially hard to keep alive. You have to remember a couple of things though (based on the writings of Ronald Shimek):
In nature some species (particularly Trdiacna crocea and T. squamosa) are from the shallowest of waters and as such will require very intense lighting (MH or LED). Some are capable of lower light settings, but more light is definitely better.
Also these are similar to stony corals requiring calcium of 400 ppm or more and many experienced keepers recommend keeping the pH below 8.3.
Finally, remember that these creatures also feed on suspended particles in the water. When the clams are young (f" or under) they do not support a large enough colony of zooxanthellae algae to supply all the energy and nutrition needed by the clam, meaning they rely more heavily on suspension feeding. Feeding of ammonium nitrate or phytoplankton is recommended.
Other points to remember are that healthy clams will react by closing their shells to your hand casting a shadow over them. Weak clams will stay open (closing the shell with the proteinaceous ligament is an active response, gaping open is a passive one). If the clam doesn't respond to your hand, leave it in the shop.
Also wise to take into consideration is that Ronald Shimek (with a Ph.D and being a professional taxonomist) cannot reliably identify a clam (or many other species of invertebrate) by photo alone. So do not overly rely on people identifying your clam from a picture posted on the internet.
In fact, in the Introduction to the PocketExpert "Marine Invertabrates" Mr Shimek makes a laboured point about the inability to identify many species of inverts, (liken this to bumblebee gobies which can only really be identified to species level by counting scales, something the average aquarist just isn't going to do). The information above on clams comes from pages 276 to 279 of the aforementioned title.