Monthly Archives: April 2019

Should scientists learn C++?

Conventional wisdom dictates that compiled languages are slow to develop, can be slow to compile, but are fast to run. Interpreted languages are easy to use and do not require compilation but have sluggish performance. Like most people in scientific computing, the first two languages I learned were C++ and Python; I use Python every day but when, if ever, would I use C++?

Continue reading

Spring 2019 ACS National Meeting (Orlando)

This blog post is jointly written by Lucian, Joe and Susan who recently attended the Spring ACS National Meeting 2019.

Susan, Joe and Lucian at the ACS conference.

The Spring ACS National Meeting was held in sunny Orlando, Florida and was a five day event (29th March – 4th April). The temperature averaged 25°C , which was amazing compared to the UK (sorry) and meant we all got a lovely tan. We all presented our work in the form of talks in the divisions of COMP or CINF but in this blog post we write about our highlights of the conference.

Continue reading

Quick Python tricks

It’s always fun when you stumble across something in your programming toolkit that you had never noticed. Here are three things I’ve recently enjoyed learning.

  • Ternary syntax
    a = int(raw_input())
    is_even = True if a % 0 == 0 else False
  • Enumerate

I’ve been looping over the length of my list, all these years, like a chump. It turns out you can do this:

for index, item in enumerate(some_list):
    # now the index of each item is available as well as the item    
# Don't do do this
for index in range(len(some_list)):
    item = some_list[index]
  • for… else

Every so often, you really need to know that a for loop has run to completion. That’s what for…else is for!

for item in iterable:
if item % 0 == 0:
first_even_number = item
else:
raise ValueError('No even numbers')

More Fun With 3D Printing

Recently the students of the Systems Approaches to Biomedical Science Centre for Doctoral Training took a 2-week module on our favourite subject: structural biology! As part of this, they were given the option to create their very own 3D printed model of a protein.

This year we had some great models created, some of which are shown in the picture above. The proteins are (clockwise from top left):

  • Clathrin (PDB 1XI4) – a really interesting protein that forms cages around vesicles inside the cell. This one was mine; I wrote about clathrin as part of my undergraduate dissertation many years ago…
  • GTPase (PDB 1YZN) – a protein that can bind and hydrolyse guanosine triphosphate (GTP), involved in membrane trafficking
  • TAL effector (PDB 3UGM) – this bacterial protein binds to specific regions of DNA in a host plant to activate the expression of plant genes that aid bacterial infection. The DNA here is in blue, the orange wrapped around it is the protein.
  • Mechanotransduction ion channel (PDB 5VKQ) – converts mechanical stimuli into electrical signals in specialized sensory cells.
  • ATP synthase – this protein machine builds most of the energy storage molecule ATP, which powers our cellular processes.
  • DNA (PDB 5F9I) – a double-helix strand of DNA, 20 base pairs long.