Sunday, February 24, 2013

Electronics for Ourself: Attempt One: Astable Multivibrator

I just realized that even though I do electronics I am not an engineer. I remember when I first started programming. I could copy others code and change small stuff(like I can with Python) but when I started to delve into a learn how exactly everything work I could read code and write masterpieces. This took lots of study and reading and practice. I want to attempt to learn electronics like I did coding, I think it opens up so many creative avenues for myself.

Electronics experiment for the day(this post took me like a week haha) the astable multivibrator. Or Try and Blink LEDs

The Astable Multivibrator circuit was more complicated then it looks at least to me, needing to teach myself all the basic electronics I really don't know. An astable multivibrator does basically what it says, it vibrates a current by switching/oscillating between two transistors using two capacitors. It is called 'Astable' because the circuit is not stable in either state or oscillates between states.

Basically all that it is composed of is:

2x NPN transistors
4x Resistors
2x Capacitors
We will add LEDs because I am assuming you might not have an oscilloscope (I don't yet).
2x LED

First we need to figure out transistors. So an NPN transistor  has two terminals termed the collector (the lead the light is connected to in the picture) and the emitter(the lead with the arrow in the picture), and a base. When one applies a small voltage or current to the base it allows a voltage to run from the emitter to the collector. I stole this picture from wikipedia but it is a good example:

What we see is that the transistor is connected to both the positive voltage and the ground. We would expect a voltage to flow through it but it doesn't because the transistor is separated into 2 distinct regions an N (electron negative) region a P (hole or positive) region. An NPN transistor has two N regions separated by a P region. and a PNP transistor has two P regions separated by an N region. So in the N we have electrons which we want to flow in a certain direction, the bias of the transistor. In the NPN the electrons are separated by the hole. So let us think that when we are applying a voltage to the base we are causing the holes to pair with electrons in the P. Once we apply enough current enough holes are paired to bridge the Ns that we see electrons from the positive N flow to the ground N because electrons want to move in the direction of the current. A PNP transistor works the same way except with holes instead of electrons.

It took me a fair bit of time to find a good explaination(not a misspelling) of how the holes and electrons move and even those were poor so don't fault me too much!

So on to the Astable multivibrator. Again picture from wikipedia.

In an astable multivibrator we have two capacitors that are charged and subsequently discharged causing the voltage to oscillate between two different paths. So how does this work? So in this diagram we will assume R1 and R4 are low value resistors(1K ohm) and R2 and R3 are high value resistors(10K ohm, higher than R1 and R4 I mean). Once we turn on the circuit the Voltage is looking for a way to get from V+ to 0V. We have 4 resistors is parallel which means that the flow of electrons is going to try and traverse through all of them.  So what happens is that initially one of the NPN transistors let's say Q1, receives electricity to it's base slightly faster than Q2. When this happens electricity can flow through capacitor C1 because the Collector-Emitter(left and right nodes) bridge on Q1 is opened up. So initially C1 has no charge and this keeps Q2 off. But based on the value of R2 it starts to build up charge and once the voltage on the left lead of C1 reaches the activation voltage of Q2, Q2 switches on. Due to the initial low value of the left lead of C2, Q1 switches off and then it happens again. C2 charges until the left lead hits the activation voltage of Q1. This is a pretty complex little circuit and I know alot more is going on then in my simple explaination but I am glad I grasped at least this much.

Now if we put an LED between R1 and V+ and R4 and V+ whenever either transistor, Q1 or Q2 switches on so will the LED! The frequency of the oscillation is ~ 1/0.7*(R2*C1 + R3*C2) . The 0.7 is juts a constant from the derivation.
I used:
R1 and R4: 1K ohm
R2 and R3: 10K ohm
Transistors: 2N2222a
Capacitors: 10uF

So we are oscillating at about 7 hertz.

Wheew. Hopefully attempt two goes faster but I learned a shit ton about transistors and capacitors writing this post!

YAY for LEARNING!

Saturday, February 23, 2013

Paper and Acclaim

We resubmitted the paper the Nature Structural and Molecular Biology. Not necessarily because we have such high aspirations for it but because this paper is in no rush to be published so why not? I always have weird feelings about publishing. How much should I care to publish and how much should I care to publish in a good journal? How much should I care whether I am first author or if my name is not even listed? Obviously for things such as graduating from a Ph.D. program you need "proof" that you did scholarly work. In the end how much does any of it matter though. My goal is to do science. I enjoy science. I enjoy figuring things out and theorizing. I don't need people telling me how great my work is or how poor it is. Generally, I am self aware about the science I do and I know the quality level of it. This is not to say that it is _not_ good to have the input of others. It is good. I think science needs discussion and collaboration.

An interesting example is this: I have met two types of scientists, those who share their unpublished data without a second thought and those who guard it like it is the most precious possession in the universe. Why do people guard their data? To prevent being scooped? Their is too much pretend competition in science. Or competition at all. Science is not a competition against each other. It is a competition against the universe. The competition is, how much more of that angry bitch can we help the world understand before we die. Sure, it sucks to see someone else take credit for something you did. Credit should belong to who credit is due but why do we need credit.

This question has always bothered me and I guess it is centered on human emotional need. As human beings we want to feel wanted or needed or worthwhile. It is strange that we as humans have not evolved a system for inner self-worth without the need for external stimuli. Maybe it is because we feel people who have more acclaim are more happy. Only one person in the history of the Nobel Prize has refused it based on not wishing the acclaim, Jean-Paul Sartre. One would think that since 1901 with over 5 prizes being awarded per year there would be a handful of people who would just refuse it because they think it is silly and pompous. There have been 826 Nobel Laureates to date.

I hope if there ever came a day in which people wanted to award me a prize for something I didn't request or need (such as fellowship or scholarship or grant, those are usually need based). That I would have the decency to turn it down because I am but a cog in the almighty machine of information and knowledge.

In the end however we are all only human. We all just want love and acclaim. Well most of us. maybe. Are we lying if we say we don't?



More science posts coming I swear. I have been really working on some for a fair bit of time because I lack the intelligence to completely explain the topics thoroughly. I am however, learning.


Tuesday, February 19, 2013

Hmmm

Been working on a bunch of new posts but also been attempting to resubmit my paper after it was subsequently rejected by PNAS for no reason. Ahh what a strange life us scientists live.

Tomorrow I have a committee meeting in which hopefully I will find out that I can graduate by this summer. I have basically finished up all I need to do regarding photoactivation in LOV domains and I am writing the papers to publish now.

Tonight will be a dinner of tofu, green peppers and rice and maybe a little electronics learning. Then maybe look at my presentation and see if there is anything else I need to add.

Just finished eating tofu and skipped through an episode of Robot Battle league. That show is awful.


Wednesday, February 13, 2013

Short Story

I know this is not my normal type of post but I have had this short story idea for such a long time (years maybe 5) and I thought it was about time I write it. So last week I sat down and wrote it. It is based off the idea that we often think of things on such a superficial scale but what if we actually contemplated the details of ideas and thoughts. This is just a rough draft and I don't think I will change that.
1. Don't hate
2. Yeah, it is weird so don't hate.

This story is based off of part of La Divina Comedia by Dante Alighieri. If you read Canto 21 of The Inferno it might make a little more sense.

---------------------------------------
Malebolge

I barely remember my first day here, it was so long ago. According to the counting ones I have been here for around 11,673 years. I still don't know how they do it, keeping count for all that time. Then again people say they don't know how I did it, how I became the inspiration of the Grafters.

My first day here I got scratched around ten times. Il graffio as the old timers call it. Wish I could say I had it rough but I've seen others get scratched 15 or 20 times on their first day. Apparently, the record belongs to a Buddhist monk, the story goes that it took him a long time to realize he wasn't meditating anymore and was actually in Hell.

It took me less time than most to be acclimated to the river. I was a sort of prodigy. After 76 years I was already going days without being scratched. I guess I nevermind it when most of the 12 get me, as Malecoda never rarely does any of the scratching. Let me tell you though, whenever that fat fuck Ciriatto or the asshole Cagnazzo manage to catch me with the hooks I make sure to have both middle fingers raised high and mighty. One time I even managed to slap Ciriatto in the belly with my torn off arm before I was complete scratched. That one was talked about for years afterward but now he has it out for me, a handicap I have had to deal with.

I definitely wasn't a prodigy at learning the language. I have never been sensory perceptive and with the language being based on touches, grasps, squeezing and feeling. I could barely say "Hello." till about my second year here. However, "Hello" is one of the more complex things to communicate so I guess it's not that bad.

A day in the existence of a Grafter is much like an existence on Earth, except that instead of sitting at home watching TV most of the time is spent under the river occasionally surfacing for air while trying not to have a razor sharp grappling hook thrown through your body by a demon. If they do catch ya', they scratch ya', they drag you from the river and rip your body literally to shreds. It's not too bad though after the first 1000 times and it's only seconds before you reappear in the river.

Like all creatures, we do things to keep us occupied, like gossip, philosophize, have sex and play games. That's right we have many games that we play including The Third Wheel, Captain Comrade and the most popular game that is called just that The Game. I think it is called The Game because it was one of the first games invented by non-domestic inhabitants of Hell or of the Eighth Circle at least.

There is only one rule in The Game, don't get scratched. Trying to not get scratched is an everyday activity in this existence and long before I showed up it was turned into a game. Don't get scratched. Use whatever means necessary to not get scratched. The longer the better and you win if you can break the current record. The first time I heard about The Game, Matthias was still the record holder back then. He lasted 234 days and that record was held for over 10,000 years. Matthias invented The Bubbler, a technique in which you create bubbles or turbulence in an area near where you surface but far enough away that the Malebranche are likely to miss with their hooks. Many have tried to replicate this technique but it is alot more difficult than one thinks. Anyways, I like Matthias he is one of the true players. He plays to win. He plays for the challenge. He doesn't let The Game beat him. There are so many reasons to play The Game, some want to forget their pain, some want revenge on the Malebranche or their fellow inhabitants of Quinta Bolgia. Some just want others to know of them. They want fame. Fame, in Hell. Yes, one can even be famous in the 8th  circle of Hell.
I have oft wondered why I play. Why I compete and what I have to gain or lose. I mean in the end I am still stuck here. The most fucked up thing is that no matter what happens I still occasionally find myself having hope. Maybe if I earn the respect of the Malebranche they can get me out of here. Maybe if there is a God or Jesus one day he will come down here with his angels and break us out. I still have hope. Well, I used to, maybe it is still hidden somewhere back there but I can't find it anymore.

The first time I went 10 days without being scratched I had a groupie. Ok, maybe that is exaggerating but I had someone ask me if I was playing The Game and when I told them "No". They asked me "Why not?". The Game, hah. Laughing as if I had something better to do. Maybe I did. I think that was when I just found out about the bottom of the river and would go for leisurely walks down there. However, my response was more pretentious. I was too good to play games. Games are for children and children do tend to be better on average at The Game than others.  A smaller target I think.

I didn't start playing The Game until after my dark age. Some say these dark ages can occur every few thousand years. For me it was my first. I was depressed and spending too much time on the bottom, away from others and all alone. Whenever I did come up for air I would most assuredly get scratched. Sometimes I would take people with me. Sometimes I would fight back so much that it would require two of those assholes to scratch me. Others stayed away from me for a good 100 years or so. There was a point during my dark age when I met someone that I knew from before. That really set me off. It made me realize how "real" this situation actually was. Depression for a few hundred years is rough. Really rough. But like all things in an eternal existence it passes. I think it was The Game that brought me out of it.

I remember when I was asked "If I was going for the record?". I thought at first that I was confused for being someone else. Then I understood the comment to be sarcasm. Mocking is so much worse when one is touching another to convey it. My first thought was to respond with "Go get scratched fucker." and take them to the top with me but then I had a better idea, I would show everyone. I would break the record.

You can't just start in The Game. Well you can but you probably won't make it far. There is so much against you. Others competing, the Malebranche, the focus. I skipped the usual process and just decided to go for it. I mean I did 10 days without even trying before, how hard could over 200 days be. I was so arrogant and by day 8 I was telling people that I could go on forever. Unfortunately, I told the wrong person, who unfortunately, dragged me to the top with a bunch of ruckus to make sure I was scratched. The unwritten second rule of The Game is to remember that there is _only_ one rule.

I couldn't do this on my own I had to become one of the faceless.

Spending time as a faceless is where you earn your ability to actually make a run at the title. Doing diversions. Getting scratched. Getting others scratched. You need to give favors to get favors. It is the only way to actually be a contender. Those who are true contenders spend most of their years up till their run as a faceless. I actually never minded being a faceless. Most can't stand it. They want to be recognized, they want their actions to have immediate benefit. This was one of the ways I was appreciated more than most as a faceless. I was ruthless. I wanted nothing. I was true to whatever a player asked of me. I would drag a player to the top and then turn around and drag to the top the player I just did the favor for because another player asked. I had no allegiance. There are no allegiances. There are only favors.

After a few thousand years I gained a following as a faceless, which rarely happens. Most faceless only last a few years then make a run for the record. I was lost for a while, lost in the world of the faceless. I could just be. It was during that time that I learned so much about existence. That really there is no reason to exist and that is why none can control it. Did an electron as matter ever try and not exist? Or choose to be something else? Do those who exist elsewhere do anything different? Do they not play games? Do they not communicate? Do they not try and avoid or overcome problems? Do they not try and understand? Was not my existing on Earth only a slightly different version of this? I was beginning to understand I had no choice but to be me. To be scratched or to not be scratched. To rely on others or to not rely on others.

In my 8,756th year here I decided to be a contender. I had learned much over the years by being a faceless. I learned about the patterns of others and the Malebranche. I learned that Scarmiglione was easy to confuse and slow on his left-side. Cagnazzo had become more quarrelsome and Ciriatto still had it out for me. Most of all I learned that everything followed a pattern. Everything.

When others found out I was to be a contender many were afraid of the debt accumulated and how I would require them to pay it back. To not pay back a favor makes one an outcast from The Game and requires thousands of years of being a faceless until others can trust again. Everyone pays their debts. Well at least I thought so.

It was day 112. I was already farther along than any had made it in the past 100 years. The allegiances I gained as a faceless helped me out greatly. I had what one might even call friends. It was a simple maneuver that is called the Double Dunk. A group will gather in an area and in a random manner each will attempt to feign a surfacing and retreat and then a short ways away feign a surfacing again or surface for air. I could only find 4 others to participate in the maneuver which was far from ideal but still doable. I remember doing the first dunk, reorienting and moving and then as I surfaced again I immediately noticed something was wrong. No splashes or noises around me just silence. Then I saw it, the gleam out of the corner of my eye as I had seen so many times and the feeling of the hook tearing through the flesh above my left bicep. I screamed, not in pain but in aggravation. Where were the others? Where did they go? Why did they leave? I gripped the hook as I was being dragged through the river, more intent then ever on not being scratched I let out the most intense cry I could heave from my body and suddenly the dragging slowed down. I looked next to me and Matthias had grabbed the hook and stuck it through his chest and smiled at me. As I tore my arm free I saw both of his middle fingers held in the air as Ciriatto pulled him to land and dismembered his body.

As the days continued many became fascinated with me and the fact that Matthias allowed himself to be scratched in order to help me beat his record. I communicated with many about my time spent on the bottom and my thoughts on existence. Others told me of their dark ages. Some of how they were in one. The communication removed the ruthlessness from me, all the pain and all the hatred. It was the most enjoyable period of my current existence.

I was nearing the record yet my need to achieve it became less and less. I had gained so much from the process. So much knowledge and understanding. So many interactions that many would call friendships. I didn't want people to choose me for anything or look at me for inspiration, it just happened.

It was day 233 and the Malebranche were keeping vigilante. Others were communicating how so many who surfaced were being scratched. Usual efficient techniques to escape the hooks were not working as well as they had usually been. Thinking that the Malebranche don't know what goes on down here is silly. Of course they do. It was sad because some simple stupid game I was playing was now effecting others. This is not how I ever wanted it to be. I just wanted to do what I do. I never expected to have such a negative impact on people. It is hard not to feel guilty and remorse. The complete antithesis to what my actions were meant to provoke. I decided I would end it. I wanted no reward. I had already gained a reward that nothing could take away. It wasn't like how I thought it would be no one argued with me. I surfaced and I was scratched. I didn't respond or gesture or love or hate.

That is how it is now. The hook, the Malebranche, the people, they have no control over me now. I am not afraid. I am.

------------------



I didn't think it would end like that. Not what I expected.
It makes you wonder how long people have been talking and thinking about Hell but not actually understanding what they are saying. That if you are alive in Hell you can make friends and do things just as if you are in Heaven. Well, except that it is supposed to be painful. I don't see how that would be different than life on Earth. Some people have really painful experience and others do not but in the end we all live.




Monday, February 11, 2013

Sunday/Funday/Op Amp day

So I have been working on building my own spectrophotometer for the Chromochord. I was trying to use a camera but the resolution is just not high enough to measure slight changes in absorbance at least by any way I could measure it. I guess I never tried looking at the raw pixel values but ehh fuck that. I need something easy that I can interface with electronics and a computer.



Can't even see the yellow protein? That is what I want to be able to measure.

So I started messing around with photoresistors and photodiodes. I have a bunch laying around because I loves me some light. I have these nice photoresistors that fit perfectly in a well of a 96 well plate and they can actually measure absorbance. I have no calibrated it yet or tried to test how precise it is. But using a really dilute solution of my light activated protein I could measure a difference in absorbance using a Blue LED compared to a buffer solution (the protein has an absorbance maximum around 450 nm!! which is what blue light is). I wired it up to my arduino to measure the changes in resistance of the photoresistor.

Then I was messing around with a photodiode which somehow generates 0.4V in ambient light? I think this one might have been a little more expensive than the $0.02 photoresistors from China. I will need to find the manufacturer but I think I purchased it from digikey and spent $5 or $10.  I used a TL084 op amp and a 1Mohm resistor to provide a large gain. Without the op amp it goes from 0.4V in light to 0.12V with my hand over it. With the op amp we see a 2V change with 4V being applied from external power supply. I used the op amp as an inverting amplifier as you see in the video how instead of going down the voltage goes up in the dark. With the 1MOhm resistor I receive a 7 fold gain. I think it should be 10 fold... hmm Yeah my circuit seems a little weird it was late and I just threw shit together. It works though. I need to go back and learn more! Damnit!

 
The stupid blog inverted my video, how appropriate.






I was thinking about this yesterday. I cannot possibly learn everything. In fact I am really stupid when it comes to electronics and I don't know if that will ever change. If i will ever become fluent enough that I can create an original circuit. Like in program there is a moment when you finally understand the code and the language enough that you can write any program from scratch. I feel that I am a far way away from the with electronics. One only has so much time and brain power. Where should one spend it? There is so many things I wish I could learn. So many things I wish I could do but I don't have an infinite amount of time. I think for me that is an important part of life. Figuring out what I want to do and how best to position myself to achieve those goals. Yeah it would be great to study the violin and be a chess grandmaster but in the end I just want to do cool science. I want to combine bio and electronics things. I want to use the power of statistics and programming to find cool features in data and learn about everyday things. It sucks that I don't have the time to do everything I want to do.


Friday, February 8, 2013

Are Twitter Followers Real || Modeling Changes in the Number of Twitter Followers

What type of pattern would one expect with an increase in the number of a person's Twitter followers? Would one expect a pattern? Would one be able to model an increase in one's Twitter followers similar to population growth?

A month or two or three ago the Pope signed up for Twitter and I was waiting for him to make a tweets because I really wanted to see what he would say. So I kept up a tab in my browser with his Twitter feed and would refresh it once in a while to see if he posted anything. I noticed that there were weird fluctuations in the number of followers that the Pope had and I wanted to understand this so I decided to monitor a few Twitter accounts and see how the number of followers changed over time (Perl Script for Grabbing Followers).

I sampled maybe slightly too often about once every 15-30 seconds depending on lag and my want to not DDoS Twitter.

So what model would you expect to fit the growth of the number of Twitter followers that a person has?

Tough Question. 
The other issue is we only have data for the days in question not since the account was open.
When an account is open  till a certain amount of time after we expect it to follow an exponential model. That is over the longterm. I am thinking more over the short term. How do we expect the number of followers to fluctuate day-to-day or over the course of a week?

I think we can assume that the increase in number of followers is a "stochastic" process and counting the number of events over a certain period of time is somewhat Poisson. I mean let's be honest here. Rare events and independence of events are tough definitions here and we need to make those assumptions for our data at least for a basic model.

We will start off with some data on Lebron James or KingJames as he calls himself on Twitter.
(HEHE, who calls themself King? weird. I mean he throws a ball at a circle for a living...)

We will start off with some Sample data from December:

Time From Start (s)       Number of Followers
16                                         6,622,356
36                                         6,622,391
52                                         6,622,356
68                                         6,622,395
84                                         6,622,396

What immediately jumped out at me was the fluctuations how in a period of less than a minute it fluctuates multiple times between 6,622,356 and 6,622,391ish. I looked this up online and some suggest it is due to Twitter removing followers from fake accounts, which doesn't seem to be the case because we always end up at the higher number in the fluctuation. What is going on here?



Next what is this repeating sinusoidal like pattern? Some Twitter filtering? Time dependent fluctuations? We will see when we generate our model. The unfortunate part is that the data fluctuates up and down so we need to fix that. I filtered the data by just staying with the highest number until another higher number was reached (Perl script here). The data looks the same it just doesn't have all those downward spikes like the graph above. It was an average of about 0.08 new followers per second but I can't calculate a poisson distribution for that so I found the average time value at which there were 5 new followers and that was 64 seconds. So then I calculated the probability distribution. Poisson: e^(-average)*average^x/x!


I generated the distribution by writing a Perl script that generated a pseudo-random number between 0 and 10000 and mapped that to the probabilities multiplied by 100. Multiplied by 100 because then the sum equals 10000 (Code for model here). Alot easier to generate a model using numbers greater than 1.




My initial conclusion is that they follow a poissonian model pretty well which makes me conclude that the increase in followers is real. What is with all this variability though?

I could do something crazy here like a Poisson Markov Model to try and build a better model but I don't think that will tell me anything more about the data. What I want to do next is build a time dependent Poisson function to replicate those ripples if I can. I can do it in a program I just want to try and figure out how to actually write the equation. I could try multiplying by a time dependent sine function but the problem is that it doesn't exactly look sinusoidal. It actually looks like there are multiple sine like functions in play here. Short term(on the order of tens of thousands of seconds) and long term(on the order of two hundreds of thousands of seconds). Ok I need to collect more data and try and do a fourier transform like process to see if I pinpoint these periodicities using a Lomb-Scargle method.






Thursday, February 7, 2013

The 5 Truths

I felt like I need to enlighten everyone to the 5 truths I have come upon thus far in my life.

1. No one has ever completely read Moby Dick.
Seriously, I don't believe you even if you tell me you did. I have tried to read this book at least twice and didn't make it past page 10 and let me tell you I have read some awful books in my time. Maybe you tried to read it and skipped a few pages or more than a few but let's be honest no one has ever read all of Moby Dick. I don't even think Herman Melville did which makes it obvious why it is so boring.

2. Whenever making a dessert for people it should always be mostly chocolate.
Seriously, what do you want for dessert, lemon meringue pie? Fuck that shit. So I am not a big dessert person. I rarely eat sweets or dessert but let's be honest here all everyone really wants is chocolate and probably brownies. Banana bread? Are you kidding? How about chocolate bread? Have you ever brought brownies for people to eat and they were disappointed? I don't think so.

3. Water is not H2O.
Ok I will start this one with a word other than "Seriously" but SERIOUSLY! I hate it when people call water H2O. Water is H2O molecules arranged in a defined structure. Why don't people call ice, H2O, or water vapor, H2O? Just as we call crystals of Sodium Chloride "salt". Water is a defined structure of H2O molecules. Stop thinking you're smart by calling water H2O and pretend to be even smarter by telling all your friends that they are wrong.

4. Raisins are the worst invention ever.
Seriously, if you didn't know, this is why Alexander the Great wiped out the Phoenicians. Because they invented raisins. No one ever wants a raisin or craves raisins. I mean if people had a choice between ice chips and raisins I think they would choose ice chips. I am just wondering who was the person who thought "Oh, I have an idea let's take grapes that are used for one of the greatest inventions ever, wine, and dry them up and eat them, oh won't that be great!" NO IT WONT. Wine is awesome. Raisins are lame.

5. You are insignificant. You will die. The world will go on. And one day no one will remember you any more.

 

Estimates indicate that there have been over 100 Billion people born so far in the history of the Earth. The Earth and people don't appear to be slowing down. Can you name anyone that lived over 10,000 years ago? Ok, ok I understand we have become better historians and store information better but that changes little. Maybe it pushes back the day you will be forgotten till 50,000 years from now. Further, one day the Earth is going to be burned by the sun or frozen with no inhabitants. Maybe all humans will be dead and there is nothing you can do about it. We don't even remember the presidents of the US. Ever heard of Millard Fillmore? Yeah, the dude was a US President. Accept your insignificance and live your life for yourself. Not to impress others or win admiration of your peers. Sure it is great to win a Nobel Prize or be famous but those people are going to die and be forgotten just like you. Do things for the sake of doing them because you enjoy doing them. Don't be stuck living a life you don't want to live. There is nothing else.


Seriously, remember these 5 truths for your life and everything will be good.

Tuesday, February 5, 2013

Using a Radiator to Generate Electricity Part 2


So part of Sunday I spent soldering together a bunch of those TEC1-12706 peltier devices.



And then for lack of a better idea I duct taped them to the thermal blanket and put them on the radiator.


Much to my great surprise nothing happened. hahahah. The main problem is temperature differential. Thermoelectric generators or peltier devices work by temperature differential between the two sides. Once the peltier devices equilibrate and heat is not being released faster then it is stored the whole device becomes the same temperature, there is no temperature differential and no voltage. Well that is a lie kind of.

I was able to measure 0.324V from 12 of these devices, haha. I really need a way to dissipate the heat.

On another note. I watched the movie Seven psycopaths this weekend. It was really good. It was really original and interesting. You should check it out.



Oh yeah, my new goal is to not drink so much on Friday so I can do more work on Saturdays. Going to be hard though because drinking is soooo fun! Dahhh.

I also signed up for the DARPA spectrum challenge. I don't know if I will do it but I signed up. They are super sketchy about the details. They sent me an email

"Thank you for registering for the DARPA Spectrum Challenge.  This email is to inform you that the qualification period will begin no earlier than Sunday, Feb 10, 2013.  Several days before the qualification period begins, you will receive another email informing you of the exact start date/time.  Detailed instructions for completing the qualification exercises will be sent to the team leaders at the start of the qualification period."

haha. Whatever that means.


Sunday, February 3, 2013

Predicting Protein Secondary Structure

Shit, I really have lots of projects I am working on maybe too many, haha.
The lab I work in, Tobin Sosnick's Lab at the University of Chicago studies protein folding and protein structure prediction. Sorry that I am going to skip over most of the stuff but the general feature I am going to focus on is predicting secondary structure.

Proteins form different secondary structure based on sterics, i.e. space occupation and also neighbor effects, how their neighbor's interactions effect them. Our lab use a statistically potential for this derived from a library of trimers culled from the PDB. It works pretty well and they have published papers predicting structures using it. However, I felt that maybe this library could be improved because obviously, the known structures don't contain all the possible angles available for a given sequence of amino acids or the library probably doesn't even contain all possible combinations of sequence. I thought a good way to remedy this would be to use molecular dynamics simulations. In this vain I attempted to see if I could predict the secondary structure of a 3 residues combination in a protein. I thought it would be easy. I could just simulate every 3 residue combination, I mean it is only 20^3 = 8000(20 amino acids, 3 residues).

I started with alanine tripeptide. I used my home computers and GROMACS because it is easy to script, runs fast and works great! Most of the peptides were simulated for 10-20 nanoseconds using the OPLS-AA forcefield with tip4p water model.


So if you don't know anything about ramachandran maps, click here. Well I expected that this Alanine tripeptide would look alpha helical. So many studies have been done on alanine and it has strong helical propensities. The angles of phi,psi space that correspond to the helical region are around  -75ish(Phi), -50(Psi). As you can see the simulation did not reproduce any of this hahaha. Damnit.

So I figured that maybe it was that there was a length issue. That the forcefield in the simulation could not recapitulate the physical properties without more residues to interact. So I switched to glutamate (~ same helical propensity as alanine, i.e. alot) and ran four, five and 6 residue simulations.

4 GLU

5 GLU

6 GLU



NICE! What we can see is that as we increase the number of residues the simulations becomes more and more like what would be predicted. Unfortunately I don't think there are many? Any? (Wel lto my surprise I just tried Blast and there are alot of proteins with 6 glutamates... Damn... haha).

Anyways, I wanted to try and predict a sequence that a secondary structure propensity was not well know or that the Sosnick lab could not predict well but one in which there was a structure in the PDB so I know if my prediction was correct or not. I random searched the PDB for EIYYINH because I wanted a sequence of at least 6 residues. Looking at the combination of 3 residue predictions of EIYYINH from the Sosnick server we see that it would mostly classify it as alpha helical with slight beta sheet preferences.



EIYYINH


My simulations however show a very strong beta sheet preference with other stuff throw in probably for the residues near the end of the chain. This what is in the structure!! Beta sheet structure generally has Phi, Psi angles  in the -125ish(Phi), 150ish(Psi) region. http://www.rcsb.org/pdb/explore/remediatedSequence.do?structureId=2L4J

YAY!
Really cool.
Caveats: this does not man I can predict structure just the secondary structure preference of 6 residue regions of proteins. The hard part is actually folding it into a 3-dimensional structure. I was thinking of a sliding window protocol to simulate a protein and then see if it could pieced together with maybe throwing in some energy functions to combine it and fold it. That seems like alot of work and I don't feel like doing it. I am happy with my result and my hypothesis that maybe their trimer library could use  more sampling.

No, I have not told them. I don't think they really care, hah. It was just for fun anyway and to test my idea.