units would be kgǤ mȀs.
but they're interacting with each other.
the interaction between the particles.
the net force on F1.
equals Fi net, and so on.
Momentum is conserved, and that's called the conservation of momentum.
It only holds if the sum of all external forces are zero.
all those forces are internal, they don't count.
not angular momentum, I misspoke.
the system, if the net sum, the total external force, is zero.
particles in the individual stars will experience, of course, the internal forces.
It's just the system as a whole for which the momentum is then conserved.
We can do a very simple example so that you get a feeling... numerical idea.
and this one has a velocity, v2.
One-dimensional problem, just as a warm-up.
They plow into each other and they stick together.
I put some glue on one, and so they stick together.
I can do this on a horizontal table, which is frictionless.
I can do it on an ice surface, which is nearly frictionless and I ignore air drag.
If you like that, be my guest.
Now they stick together and so when they stick together, their total mass is m1 + m2.
And then their velocity happens to be v prime.
We often give a prime to the situation after the collision occurs.
And so now I can apply, for the first time, the conservation of momentum.
no external forces on the system.
When they collide, you better believe it that there are internal forces.
as a whole, and so this equals (m1 + m2) v prime.
and let v2 be three meters per second.
So the conservation of momentum tells you what the speed is after the collision.
When we deal with collisions, the velocities of the objects before the collision are unprimed.
You see here v1, and you see here v2.
Now, the velocities after the collisions, by convention, are primed.
You see here v prime.
Now in this case, we're dealing with an inelastic collision, so m1 and m2 are stuck together.
They are merged, so it is sufficient to just call it v prime.
And during the next four minutes, you will see that a few times do I call it v1 prime.
I wish I really hadn't.
It would be better if I had just used v prime.
That is unique and sufficient.
kinetic energy before the collision.
one-half m1 v1 squared, one-half m2 v2 squared.
How much is it? You can do that as well as I can.
If you add that up, you will find 21.5 joules.
Trivial to stick in the numbers.
That's okay, my intuition is often wrong.
So there was a certain amount of kinetic energy.
perhaps increased or decreased or maybe the kinetic energy hasn't changed.
Who thinks the kinetic energy has not changed? Good for you.
I see some parents even.
Who thinks the kinetic energy has decreased? Even better for you.
Hey, there's a professor of physics there.
And who thinks the kinetic energy has increased? No one thinks that.
Kinetic energy after the collision.
That would be one-half m1 plus m2 times v prime squared.
Would we agree? Let me write this at a different location.
So this was the 21? joules.
Well, you can do this as well as I can.
And you will find that this number equals 20.2 joules.
So the kinetic energy went down.
Now, you may say, "Well, big deal.
Who cares about 1.3 joules?" Well, it is a real big deal in physics, let me tell you.
I can make you appreciate that it is a real big deal by doing the following.
I don't change the masses, but I just am going to change the direction of the impact.
Here is m1 and here is m2.
v1 and this is v2.
What is the momentum of particle number one? Well, that is mv.
1 x 5 is plus 5.
Remember, this is the increasing direction of X.
So the momentum is plus 5.
What is the other one? That is 2 x 3, that is 6, backwards.
The momentum before is in this direction.
So what now is v prime? They stick together.
And afterwards, I'm not even sure whether they go this way or this way.
And so this now equals m1 plus m2 times the new v1 prime.
So the whole system now goes off with one-third meters per second in this direction.
those 21? joules, right? That is independent of how I collide them with each other.
one-half the sum of the masses, which is three times this small number squared.
Goes with V squared, right? And now there is only 0.17 joules left.
Almost all kinet... kinetic energy has been destroyed.
Kinetic energy and momentum is a totally different thing.
change but the kinetic energy was destroyed.
I can destroy the kinetic energy completely if I want that.
I can arrange a collision so that all kinetic energy has been removed.
Suppose this particle has a mass five and the velocity is one.
This is my shorthand notation.
And this particle has a mass one but it has a velocity five.
plus five in this direction, minus five in this direction.
But you bet your life there is kinetic energy.
they hit each other, we agreed that they would stick, there was glue on it.
Momentum afterwards must therefore still be zero.
Internal forces don't matter no matter what happens.
told you that they are going to stick together.
direction, and they hit each other.
And they stick together, it's a given.
And I can give them some velocities.
This is the speed of one, v1, and this is the speed of the other, v2.
Afterwards you see something like this: v prime.
that would be an external force, friction with the road.
But that can be ignored, is negligibly small.
There is a huge internal force going on.
One slams on the other and the other slams on one.
Friction, but that's internal friction, not friction with the road.
the impact because the impact time is so short.
So let here be car with mass m1 and here is the other car with mass m2.
Let's make it a two-dimensional problem.
And tragedy has it that this is the place where they're going to collide.
moment before they hit with just the moment after they hit.
What comes later is a different story.
external force which is friction, which will slow it down.
And so, what is the momentum of this one? Well, this may be the momentum of this one.
It may have a very small mass, small speed.
and this could be the momentum of number two.
The net momentum is the vectorial sum of these two, which is this.
That is p total of the system.
That's before and after the collision exactly the same.
And so you can calculate everything.
And that's what the police is doing when they find wrecks on the road.
prime, and then they can try to reconstruct the situation as it was before the collision.
Now, in all these cases, the objects stuck together.
whereby during the collision, the particles bounce off each other.
everything, as you see there.
Always in inelastic collisions do you lose kinetic energy.
the word "collision." The answer is yes.
And in fact, I will show you an example and even do a demonstration.
In the most simple case that I can think of, I have here a block which has a certain mass, m.
But there is an explosive inside and all of a sudden, it goes "Boom!" It explodes.
Well, before, the speed is zero and so the momentum is zero.
and one piece flies in this direction with a certain velocity, v2 prime.
And another piece flies off in this direction with mass m1, with velocity v1 prime.
Clearly, momentum must be conserved.
momentum is negative, the total momentum will never change.
What happened with the kinetic energy? Well, kinetic energy has clearly increased.
There was zero kinetic energy to start with.
This one now has kinetic energy and this one has kinetic energy.
Where did that come from? Well, it was the chemical reaction of the explosion.
See, momentum really doesn't care about these explosions.
Never confuse momentum with energy.
energy, but if there are no external forces on the system, momentum is always conserved.
And this is what I can show you.
And we're going to push two cars together and we hold them together with a spring.
The spring is like the explosion, like the dynamite that can push these apart.
So here is one car on the air track, then there is a spring and there is another car.
Let this mass be m1 and this mass be m2, and this surface is nearly frictionless.
And I hold them together with a string so that I can pull the spring in.
So this spring is compressed, and the whole system is at rest, v equals zero.
There is potential energy in that spring.
[whooshes], and I burn away this thread.
This is the situation before.
Total momentum afterwards would also be zero.
It's identical to what I did there.
And so this object will fly in this direction, and this object will fly in that direction.
equals m1 divided by m2.
And so I will make some predictions about the speed of these two objects.
get the largest velocity, the largest speed.
What you see in here are really speeds.
We don't have the information on the direction anymore.
that the light- emitting diode emerges again, the timer stops.
So that's the way we will measure the time for each car to move by ten centimeters.
244 plus or minus one gram.
In other words, the uncertainty in the masses is something like 0.4%.
I can't do much better.
by v1, which is the velocity that we want to compare them with.
Now, the ten centimeters is really only known to an accuracy of about one millimeters.
So that is an uncertainty of 1% in my timing in my velocity, so this is a 1% uncertainty.
that criterion for on and off for one diode may not be exactly the same as for the other.
One car will fly in this direction.
And here is another system, and the car will fly in that direction.
And that's not so easy to evaluate unless you do a lot of experiments.
that this may add an uncertainty in the criterion of the diode of another millimeter.
the times of these two cars will be the same to within roughly 2?%.
That would be my prediction.
So we're going to write down here the times, and then we're going to measure them.
the uncertainty of our measurements.
Here is the air track.
Have to turn on the airflow.
For the parents in my audience who haven't seen this one, this is a marvelous device.
so we can move them in horizontal direction with extremely little friction.
There is no metal touching metal.
The only friction you have is the air drag.
That you can never avoid.
the same wind that you feel when you drive your bicycle.
But there's very little, and that's why these experiments are done on these air tracks.
Well, you... you pay $25,000 tuition, so you might as well get something for it, right?
So I hope that these timers are on.
And now we have here one car, and notice how frictionless it goes when I touch it.
And here we have another one, and they have equal mass to within one gram.
And there is a spring between them.
Some of you may be able to see it.
And I'm going to attach now that string to hold them together.
The timer's not on? Has to be reset.
So now I'm going to burn off that wire.
The momentum of each one of those cars will change.
One will go in this direction, the other one in this direction.
That's the potential energy from the spring.
But the momentum of the system as a whole after I burn the wire will remain zero.
You're going to make me unhappy? I better walk around.
220... oh, fantastic, absolutely fantastic! 223, 219 milliseconds.
That is well within the uncertainties.
What was the number, 219?
219 milliseconds and 223 milliseconds.
If I repeat the experiment and I make the string shorter, I will get different primes.
will have more potential energy.
So I can never predict the time.
Now we're going to do an experiment whereby I'm going to make m2 twice the mass.
m2 is 488 plus or minus one gram.
The momentum before is zero.
I burn the wire, momentum afterwards is also zero.
v2 prime divided by v1 prime equals m1 divided by m2.
And so twice the mass will get half the speed.
And so now you're going to see that one car will go twice as slow as the other.
That's the only way that nature can conserve momentum.
So it must give the more massive car half the speed than it gives the other car.
And so we're going to redo this experiment now with a car here which is twice the mass.
Where is my other car? Oh, my car is here.
on your right is the 488.
So I have to bring them together again with a string.
So I... I do the work now.
I always do the work here in 26.100.
I get paid for that, by the way.
And that's potential energy that goes into the spring.
I have to zero the timers.
Oh, and I would like to make a prediction.
the uncertainties of the measurements.
There is always an uncertainty in any measurement that you do.
whoo! On the button! 406 and 193.
is that what you see? Yeah? And 0.193.
Now, I don't even need my calculator to multiply this by two.
I can even do that by heart.
The two are in excellent agreement within the 2?% uncertainty in each measurement.
So, you see, that's exactly how you can demonstrate the conservation of momentum.
They picked up kinetic energy, but after the wire was burned, the momentum remained zero.
Now I change the topic.
you will see that it's really related to the conservation of momentum.
I'm going to explain to you now what we physicists mean by center of mass of a system.
not just a point mass, but it has a finite size.
It could be a hammer.
And let the center of mass be, for instance, here.
This is the center of mass.
I pick any origin I want to.
doesn't matter where you take it.
And this, now, is the position vector of the center of mass.
then this is the position vector, r of i.
times the position vectors of the individual little particles that make up this object.
equals one over the mass total.
is the total mass of that object times the velocity of the center of mass.
because I take the derivative of this equation.
That gives me dP/dt here, and the velocity changes to acceleration.
And look at this! This is really an amazing statement.
This says F = ma.
the entire squash racquet was right at that center of mass.
with the same velocity, the center of mass.
and it would have a certain velocity.
changes, because if there's no external force then there is only a constant velocity.
But the hammer itself may be tumbling.
A little later in time, the hammer may have this position.
A little earlier in time, the hammer may have had this position.
But the center of mass is just one smooth motion.
that the center of mass behaves as if all the matter were together in one point.
...the velocity of the center of mass.
And you take the derivative of that equation and you get F = ma.
center of mass will then keep its velocity unchanged.
Let's do one calculation to give you some experience on how you derive the center of mass.
I'll take a simple case.
I won't take a hammer.
Then I have three point masses and that makes my life a little easier.
Let this be the Y axis and this the X axis, and here at zero I have a mass m.
At a distance l, I have here a mass 2m.
This is also l and this is also l, so this is equilateral triangle.
These are massless rods, and here I have a mass m.
are connected with massless rods.
to lie somewhere on this line.
And it's probably slanted in the direction of the 2m, so it will probably be somewhere here.
position vector to this object is zero.
And so now we can calculate the position of the center of mass as follows.
equals the sum of the individual masses times their position vectors.
So it is the sum of i m of i times r i.
And this i goes from one to three.
a y and to an x component.
of course, the same equation holds for the x component of these vectors.
plus this mass times the x component of this mass, which is one-half l.
So that gives me plus one-half m times l.
My m goes and so I get that x center of mass equals 2? divided by four.
So we were not too far off where we put it.
Now, in the y direction, you can do exactly the same.
This one has no y component and this one has no y component, so this is very easy.
component of that position vector, and that is one-half l square root of three.
of three divided by eight times l.
And I think that's about 0.22L, very roughly.
And so you see that we didn't put it in so badly.
It's about one-fifth of this distance.
It's about one-fifth higher than this distance.
And so you can calculate the center of mass.
That's really not too hard, if you have discrete points.
calculate the center of mass.
experimentally, which is different from calculating it analytically, as we just did.
of external forces, and that I can demonstrate for you again with the air track.
We have a system here of two cars which I connected by a spring.
I will turn on the air shortly because the air makes a lot of noise.
motion and they will go in this direction.
And it will be nearly impossible for us to evaluate the motion of these two cars individually.
only of the center of mass.
Not of this car, not of that car.
That's the uniqueness of the center of mass.
a constant speed very nicely.
So if you concentrate on that little object, you may be able to see that.
weird motion of the other two objects.
It's right in the middle.
The objects have the same mass.
have a lot of imagination.
I will turn off all the lights and only turn on ultraviolet light.
make it dark, you will only see the motion of the center of mass.
And then you can really see that the center of mass moves in a very civilized way.
I'll bring it out here again.
So now I'm going to help you to concentrate.
Are the timers off? Yes, timers are off?
Okay, I'm going to do the same thing, and now look at that center of mass.
And we know that these cars are doing crazy things.
Hard to predict but the center of mass behaves decently.
I can let it go backwards, so you can enjoy this once more.
Center of mass motion, in the absence of external forces has a constant velocity.
When I throw up a hammer, then the hammer will do very weird things.
along a perfect parabola as if it were just a tennis ball.
racquet will perfectly go along a parabola.
And so we have here a squash racquet and we have here the center of mass.
well, it's not quite a tennis ball, but close enough.
This one, you would expect it to behave perfectly like a parabola.
From this one, you would not expect it to behave like a parabola.
Let me throw this one up in light, and you will see that it has very strange motion.
Forget the fact that it lights up.
You remember it was the last lecture that I wanted to remind you of.
You see the center of mass here? Can you all see it? Okay, there we go.
You ready? Concentrate only on the center of mass.
Nice parabola or not? I'll do it again.
You see the center of mass? Can you see it? You can still see it, right?
Wonderful parabola for me! All right.
Enjoy the presence of your parents.
m2. We could have hundreds of stars... The angular mo. I have it written down there. and that's called the conservation of momentum. then. and this one has a velocity. This ji cancels this one if you look at the system as a whole-not if you look at the individual particles. it means that the momentum cannot change. if the net sum. So the individual stars will change their momentum all the time. and they could collide with each other. of course. like a globular cluster. they could explode. and so they stick together. the total external force. and let this one have a velocity. And this means... the total external force on the whole system is zero. the internal forces. One-dimensional problem. Now comes the miracle.. they don't count. I misspoke. they all cancel each other out. m1. I put some glue on one. . and here I have one. that if the external force. in fact. that we come to a key conclusion-thatdp total/dt. I'm not saying that the individual particles do not continuously experience momentum changes. is zero. I would have a..And so when we add up all these forces. It's so important that I want you to look at it this whole lecture.. because the individual particles in the individual stars will experience. v2.. obviously that is the tot l force on the entire a system. Momentum is conserved.. numerical idea. v1. It only holds if the sum of all external forces are zero. And all the internal forces-you can forget about it. The miracle is that all these internal forces eat each other up. the momentum of the cluster as a whole-not angular momentum. Look at this. We can do a very simple example so that you get a feeling. And so the total force on the system is simply the total force external. just as a warm-up. they could break apart-all those forces are internal. an object here as mass. They plow into each other and they stick together. but on the system as a whole. It's just the system as a whole for which the momentum is then conserved.. The momentum of the cluster as a whole would not change if there are no external forces on the system. You see that dp/dt is the total force externally-forget all the internal forces-and what it means.
which is nearly frictionless and I ignore air drag. Let this be the direction of increasing x. And so now I can apply. but not the momentum of the system as a whole. When they collide. and so the momentum that I have before equals m1 v1 -this is my plus direction-I could put vectors over there but that's really not necessary. and you see here v2. so it is sufficient to just call it v prime. We often give a prime to the situation after the collision occurs. The momentum before must be the same as the momentum afterwards because there ar e no external forces on the system. . for the first time. They are merged. You better believe that there is glue and it goes "plunk" and they feel those forces. the conservation of momentum. the velocities after the collisions. and so this equals (m1 + m2) v prime. And this is 1 + 2 is 3. So the conservation of momentum tells you what the speed is after the collision. Now if after the collision object one and object two have a different velocity.That's a given. so this is 11. So this is the situation before. Now in this case. both of them. which is frictionless. If you like that. and so v1 prime is eleven -thirds meters per second. because it's a one-dimensional problem-plus m2v2. are primed. You see here v1. since they are both in the same direction momentum here is 5 + 6 is 11. we will call it v1 prime and v2 prime. That's the momentum before. so that is 3 times v1 prime. so m1 and m2 are stuck together. the velocities of the objects before the collision are unprimed. let m2 be two kilograms and let v2 be three meters per second. I can do this on a horizontal table. When we deal with collisions. and v1 is five meters per second. because v1 prime is the same as v2 prime is the same as v prime. You have to accept that. if you put in some numbers-suppose m1 equals one kilogram. be my guest. their total mass is m1 + m2. by convention. You could have called it v1 prime. and so before the collision I have a certain amount of momentum. Now. And so. I can do it on an ice surface. Now they stick together and so when they stick together. The momentum of each one individually is changing. you better believe it that there are internal forces. You see here v prime. And you see. we're dealing with an inelastic collision. And then their velocity happens to be v prime.
Would we agree? Let me write this at a different location. That's okay. We know that v1 prime is-that is eleven-thirds. So this was the 21? joules. Trivial to stick in the numbers. I wish I really hadn't. and I want you to tell me whether you think that the kinetic energy has perhaps increased or decreased or maybe the kinetic energy hasn't changed. What do you think the situation is with the kinetic energy after the collision? Don't look at the numbers. Now. If you add that up. we can all calculate that-kinetic energy before the collision.And during the next four minutes. Now. and of course. my intuition is often wrong. Can't go wrong there. Who thinks the kinetic energy has decreased? Even better fo you. That is unique and sufficient. Let's take a look. you can do this as well as I can. it's amazing. you will find 21. It may be wrong. And who thinks the kinetic energy has increased? No one thinks that.5 joules. there's a professor of physics there. Now I want to hear from you. That would be one-half m1 plus m2 times v prime squared. How much is it? You can do that as well as I can. there was a certain amount of kinetic energy before the collision. Just use your intuition. Hey.2 joules. big deal. "Well. Well. r Hey. So there was a certain amount of kinetic energy. I see some parents even. Who thinks the kinetic energy has not changed? Good for you. It would be better if I had just used v prime. you may say. one-half m2 v2 squared. So the kinetic energy went down. . We had this collision. That is one-half m1 v1 squared plus one-half m2 v2 squared-one-half m1 v1 squared. you will see that a few times do I call it v1 prime. Kinetic energy after the collision. And you will find that this number equals 20.
So the momentum is plus 5. the total momentum. This is minus 6. that is mv. right? That is independent of how I collide them with each other. Almost all kinet.. Goes with V squared. I am sure. So what is the total.."Little bit of kinetic energy-1. m1 plus m2 is 1 + 2. Here they are. right? And now there is only 0. let me tell you. And afterwards. The speeds remain the same-v1 and this is v2. Who cares about 1. if I leave this off we would call that minus one because it's a one -dimensional problem. but I just am going to change the direction of the impact. let's give it a magnitude equals minus 1? The magnitude is one. Yes. is 3 kilograms and so you see that v1 prime equals minus one third meters per second. Remember.. The kinetic energy before has not changed-those 21? joules.3 joules?" Well. Here is m1 and here is m2. What now is the kinetic energy afterwards? This is a great tragedy. which is three times this small number squared. so I predict that v1 prime will be in this direction. And I can appre. I'm not even sure whether they go this way or this way. The momentum before is in this direction.3 joules. Well. I don't change the masses. backwards. . 1 x 5 is plus 5. this is the increasing direction of X. because the momentum is in this direction.. kinetic energy has been destroyed. that is 6.. because now you get one-half the sum of the masses.17 joules left. What is the other one? That is 2 x 3.. I can make you appreciate that it is a real big deal by doing the following. It's minus one. it is a real big deal in physics. of course and the momentum. So what now is v prime? They stick together. And so this now equals m1 plus m2 times the new v1 prime. No change in the numbers except that they go now [whooshes] head-on... What is the momentum of particle number one? Well. So the whole system now goes off with one-third meters per second in this direction.
. Internal forces don't matter no matter what happens. we agreed that they would stick. it's a given. because I told you that they are going to stick together. This is my shorthand notation. The momentum of the individual particles gets changed. After they collision. is negligibly small. I can destroy the kinetic energy completely if I want that. You go [whooshes]-one big clump. Kinetic energy and momentum is a totally different thing. but mom entum cannot be destroyed in the absence of external forces. This is the speed of one. there was glue on it. And this particle has a mass one but it has a velocity five. If you have a car collision. but the net momentum did not change but the kinetic energy was destroyed. Suppose this particle has a mass five and the velocity is one. and two cars hit each other. v1. I used glue. and they hit each other. they hit each other. The momentum of this system is zero-plus five in this direction. Momentum afterwards must therefore still be zero. So the whole system collides-[bing]-And afterwards you have here the sum of the total masses and it just stands still. . and this is the speed of the other. But you bet your life there is kinetic energy. friction with the road. the other has a speed in this direction. Kinetic energy is zero. And I can give them some velocities. Afterwards you see something like this: v prime. But that can be ignored.. Just a wreck! The impact time is so short that the change in momentum due to friction with the road-that would be an external force.So what you see here in front of your eyes-that kinetic energy can be destroyed. v2. minus five in this direction. and I compare the situation just before the collision with just after the collision-here are the two cars and one has a speed in this direction. So this is before. I can arrange a collision so that all kinetic energy has been removed. And they stick together.
but that's internal friction. the. the track. Let's make it a two-dimensional problem. in all these cases. clearly it's going to slide on the road. So let here be car with mass m1 and here is the other car with mass m2. . There is a huge internal force going on... It's just during the impact I claim that to a reasonable approximation. When you have formed the wreck. because we have seen only one -dimensional problems now. And that's what the police is doing when they find wrecks on the road. velocity v2. One slams on the other and the other slams on one. and then they can try to reconstruct the situation as it was before the collision. which will slow it down. small speed. That is never going to change.. And so. What comes later is a different story.The cars hit. Now. And therefore if you knew this angle theta and you know p1 and you know p2. And what is the momentum of this one? Well. and let's say this is the direction in which the other car is going. And so you can calculate everything. In what direction and what will be the speed after the collision? I only compare just the moment before they hit with just the moment after they hit. So this is the direction for this car. That is p total of the system. this may be the momentum of this one. That's before and after the collision exactly the same. this may be the momentum of num ber one and this could be the momentum of number two. And we'll make it a two-dimensional problem. So momentum is approximately conserved if we can ignore the friction from the road during the impact because the impact time is so short. Friction. They actually use the. but of course you can also calculate then the velocity after the impact. The net momentum is the vectorial sum of these two. because this total momentum must be the sum of the total of the two cars-the mass of the two cars-times v prime. what is the momentum of this one? Well.. It may have a very small mass. And tragedy has it that this is the place where they're going to collide. which is this. the objects stuck together. momentum will have to be conserved. not friction with the road. and then there is an external force which is friction. then you can calculate in what direction the objects are going to slide. There is even fireworks-metal scrapes over metal. the skidding tracks of the wreck to cal culate v prime.
if you call this the increasing direction of x. v2 prime. an increase of kinetic energy? Well. Never confuse momentum with energy. And another piece flies off in this direction with mass m1. it goes "Boom!" It explodes. In completely inelastic collisions.. sometimes everything." Now. so this momentum is positive and this momentum is negative. And this is what I can show you. . I will show you an example and even do a demonstration. I have here a block which has a certain mass.We've only considered cases where they stick together. and so you can write down. with velocity v1 prime. momentum really doesn't care about these explosions. like the dynamite that can push these apart. however. Clearly. So be very careful. but if there are no external forces on the system. it was the chemical reaction of the explosion. Always in inelastic collisions do you lose kinetic energy. The spring is like the explosion. in a collision. Where did that come from? Well. can increase or decrease or remain the same kinetic energy. as you see there. as you see there. Energy can change or cannot change. See. m. the total momentum will never change. And in fact. before. Momentum. In the most simple case that I can think of. sometimes a lot. kinetic energy has clearly increased. next lecture I will also deal with situations whereby during the collision. And we're going to push two cars together and we hold them together with a spring. momentum is always conserved." The answer is yes. so this must be m2 times v2 prime minus m1 times v1 prime. then there is a spring and there is another car. Well. was conserved. I have a demonstration set up on this air track. It's the same before as it is afterwards. This explosion is only internal forces. There was zero kinetic energy to start with. But there is an explosive inside and all of a sudden. depends on how you define the word "collision. And there comes the bang-[whooshes] and one piece flies in this direction with a certain velocity. So here is one car on the air track.. in which case we call those in physics "completely inelastic collisions. the speed is zero and so the momentum is zero. That's all internal forces. you always lose kinetic energy-sometimes a little. and we do it on an air track so there is a minimum of friction. This one now has kinetic energy and this one has kinetic energy. Can we have. momentum must be conserved. the particles bounce off each other. This is m2. as you see there. What happened with the kinetic energy? Well.
and this surface is nearly frictionless.emitting diode is occluded. And you already can tell what the ratio of the velocities will be. And I hold them together with a string so that I can pull the spring in. What you see in here are really speeds. Total momentum afterwards would also be zero. This is the situation before. by the way. And the moment that the light. The first experiment that I will be doing. we actually measure the time for the cars to move ten centimeters. So that is an uncertainty of 1% in my timing in my velocity.5. the uncertainty in the masses is something like 0. . Each car has a little metal plate which is ten centimeters long.. I take a burner [whooshes]. There is potential energy in that spring. And so this object will fly in this direction. And so I will make some predictions about the speed of these two objects. the timer starts. the timer stops. and it blanks out a light emitting diode.Let this mass be m1 and this mass be m2. So if we measure the times that object number one and object number two will go through this timing device-a measurement of ten centimeters-you would expect the times to be the same to within roughly 1 + . so this is a 1% uncertainty. would get the smallest velocity. It's identical to what I did there. which is the velocity that we want to compare them with. because you will see that v2 prime divided by v1 prime-you see it right there-equals m1 divided by m2.. Momentum before is zero. We don't have the information on the direction anymore. In other words. I can't do much better. That's just part of life. and this object will fly in that direction. the largest speed. How do we measure the speed? Well. and I burn away this thread. m1 is 244 plus or minus one gram and m2 is also 244 plus or minus one gram. and the moment that the light. say 1?%. Now. v equals zero. The time that it takes for object number one to go ten centimeters is obviously ten divided by v1. So that's the way we will measure the time for each car to move by ten centimeters. and the whole system is at rest. the ten centimeters is really only known to an accuracy of about one millimeters.emitting diode emerges again. The largest mass.4%. So this spring is compressed. and the smallest mass would get the largest velocity.
Very nice. which comes over this diode.. and we will see whether these two numbers are the same within the uncertainty of our measurements. Here is the air track. an additional problem that is very difficult for me to evaluate and that's the following. and then we're going to measure them. there is wind-the same wind that you feel when you drive your bicycle. Well. so you might as well get something for it. There is no metal touching metal. so I would predict that the times of these two cars will be the same to within roughly 2?%. so that these cars fit beautifully on this V -shaped track. So time one and time two. That you can never avoid. They are. almost frictionless.4%. occludes the diode. Oh. And that's not so easy to evaluate unless you do a lot of experiments. So I would say we really have to allow here for two percent plus . I really don't know any better than two millimeters what the ten centimeters is. for those of you.. you pay $25. When you go through the air with a car. It is a track which is well-constructed. and then we blow air out of this track. which lifts these cars up so that they float.. The only friction you have is the air drag. If here is the light-emitting diode. and says "start the timer. And here is another system. Here is one system. That would be my prediction.. And now we have here one car. moves off and then the timer stops-that criterion for on and off for one diode may not be exactly the same as for the other. you. But there's very little. Have to turn on the airflow. of course. and notice how frictionless it goes when I touch it. One car will fly in this direction. these air tracks-they're very expensive. and the car will fly in that direction. right? So I hope that these timers are on. And so effectively. So we're going to write down here the times. So I would roughly guess-I'm always on the conservative side-that this may add an uncertainty in the criterion of the diode of another millimeter. by the way.There is. this is a marvelous device. For the parents in my audience who haven't seen this one. and so we can move them in horizontal direction with extremely little friction. These are not cheap. . and here is that metal plate that I mentioned to you." and then the other end. let me tell. however. and that's why these experiments are done on these air tracks.000 tuition.
I can't wait. Ready for this? Make me happy. The timer's not on? Has to be reset. I can never predict the times. absolutely fantastic! 223. Thank you. So now I'm going to burn off that wire. momentum afterwards is also zero. oh. and they have equal mass to within one gram. fantastic. I erased this-- . because now you really begin to test the conservation of momentum. oh. But the momentum of the system as a whole after I burn the wire will remain zero. but the times will be the same within the uncertainty of the measurements. They have no momentum. What do you see? You're going to make me unhappy? I better walk around. because if I make the spring more squeezed. 219 milliseconds. the other one in this direction. That is well within the uncertainties. 220. Kinetic energy will increase. The momentum before is zero. Now we're going to do an experiment whereby I'm going to make m2 twice the mass. Yeah. then obviously I will have more potential energy.. And so I put potential energy in the spring by pushing them together. And so the speeds of the cars will be higher.. I burn the wire..And here we have another one. If I repeat the experiment and I make the string shorter. The momentum of each one of those cars will change. What was the number. that's going to be interesting. And there is a spring between them. Some of you may be able to see it. and they are lined up now here. So I can never predict the time. They're now both zero. That's the potential energy from the spring. m2 is 488 plus or minus one gram. One will go in this direction. Now. But the velocities. I will get different primes.. you're sure? Okay. 219? 219 milliseconds and 223 milliseconds. And I'm going to attach now that string to hold them together.
And that's potential energy that goes into the spring. And so now you're going to see that one car will go twice as slow as the other. Momentum is zero. And this one equals. So it must give the more massive car half the speed than it gives the other car. 9-3-- . There it is. So I have to bring them together again with a string.100... I do the work now.v2 prime divided by v1 prime equals m1 divided by m2. and I would like to make a prediction. What do you see? Ah! 406. and then we get a number and we get a number. there we go. I always do the work here in 26. I squeeze these springs. on your right is the 488. There is always an uncertainty in any measurement that you do. So I.. That's the only way that nature can conserve momentum. my car is here.00. I get paid for that. Oh. And this one is one mass. Nature can deal with kinetic energy one way or another. Kinetic energy is zero.. Where is my other car? Oh. And so we're going to redo this experiment now with a car here which is twice the mass.193. I do the work. All right? Make sure that.. by the way. but it cannot finagle momentum. 0.406-is that what you see? Yeah? And 0. we'll measure T1 and then we'll measure T2.. and if we multiply this number by 2. I don't even need my calculator to multiply this by two. 193-whoo! On the button! 406 and 193. so this is the 244. then I would like to get this number within the uncertainties of the measurements. And so twice the mass will get half the speed.. I have to zero the timers. Now.... and the one on the. I can even do that by heart. Nature has no choice. I would like to see. are the timers zero? Okay.
. the momentum remained zero. here.406. And the center of mass is defined as follows: the total mass of this object times the position vector of the center of mass is the sum. simply taking the first derivative. is the position vector of the center of mass. covering the entire object.. this is also 1 over m total times the total momentum. I take the derivative here. . you see. a total momentum. v center of mass-I find that by taking the derivative of this equation-equals one over the mass total. r of i. This is the center of mass. They picked up kinetic energy. together. Now I change the topic. Close enough. The center of mass of a system is defined as follows: I have here some kind of an object -not just a point mass. and that is that the total momentum of an object-- . that's exactly how you can demonstrate the conservation of momentum. I bring this on this side. for instance. which changes positions into velocities. because I've all these momenta of these individual particles. now. but it has a finite size. and then this is the position vector.. And so this is the sum of i. I pick any origin I want to.. but after the wire was burned. but you will see in a few weeks that it's really relatednot even a few weeks-you will see that it's really related to the conservation of momentum. They have a. And now I carve out a zillion little mass elements.. Now. The two are in excellent agreement within the 2?% uncertainty in each measurement.396. And let the center of mass be. And this. i-times the position vectors of the individual little particles that make up this object. summed over i-over all these little elements. of mi vi. So. It could be something like this-a squash racquet. I'm going to explain to you now what we physicists mean by center of mass of a system.. It could be a hammer.. And so now you come to another very important statement in physics. It. m of i. You're totally free to choose this origin-doesn't matter where you take it. it appears that I change the topic. and so here I get the sum of m of i times the dri/dt.
the center of mass. then if I throw this object up in 26. in any object-that the center of mass behaves as if all the matter were together in one point. But the center of mass is just one smooth motion. That is very mysterious that there is one and only one point in any one of us -in you. Then the center of mass. is the total external force. And if I take the derivative of this.the velocity of the center of mass. So the behavior of the center of mass is extremely predictable. the hammer may have this position.. If the external force on the squash racquet were zero. A little later in time. and so the center of mass will then keep its velocity unchanged. the hammer may have had this position. But the hammer itself may be tumbling. then dp/dt of the total momentum-of which we learned that the total momentum. then the center of mass behaves as if a the mass of ll the entire squash racquet was right at that center of mass. then it would continue to go always with the same velocity.. But if I have here this squash racquet and here is the center of mass. because I take the derivative of this equation. dp/dt. would have a velocity that never changes. which could be a squash racquet-is the total mass of that object times the velocity of the center of mass.which could be a hammer. and the velocity changes to acc eleration. And that means if the external force is zero-you can go back to the upper line again-if the external total force is zero. in me. It may start tumbling. And you take the derivative of that equation and you get F = ma. we already learned that earlier-that now is the total mass of the system times the acceleration of the center of mass. There's no acceleration. because if there's no external force then there is only a constant velocity. And so this is another quite important statement: For the center of mass.400. . but only the center of mass. whereas the behavior of the squash racquet is not. A little earlier in time. then the momentum of the system is conserved. This says F = ma. And look at this! This is really an amazing statement. That gives me dP/dt here. the total momentum is the total [no audio] . If I had here a hammer-this is a hammer-and there were no external forces-I would be somewhere in outer space-and it would have a certain velocity. as I will do later.
for those of you who have a good feeling for symmetry. It's a little bit complicated. I will take three masses which are held together by very unphysical. And so this will be the position vector r center of mass. plus this mass. r center of mass-I go all the way up there on the blackboard. where is the center of mass? So you have three point masses. I'll take a simple case. and here at zero I have a mass m. by massless rods.. And this i goes from one to three. Let this be the Y axis and this the X axis. So now I have that 4m times the x component of the center of mass equals this mass times the x component of its position vector. it sometimes pays off to split it into two components-a y and to an x component. this is a vectorial equation. and they are connected with massless rods. Now. and here I have a mass m. At a distance l. So it is the sum of i m of i times r i. And so in the x direction. I won't take a hammer. Then I have three point masses and that makes my life a little easier. which is 2m times the x position. and the position vector to this object is zero. they would say certainly it has to lie somewhere on this line. Now. say. you can do exactly the same. the same equation holds for the x component of these vectors. so this is equilateral triangle. And I'm asking you.. which is one-half l. . which is zero. That is five-eighths l..Let's do one calculation to give you some experience on how you derive the center of mass. which is l-so plus 2m times l-plus this mass times the x component of this mass. I have here a mass 2m. My m goes and so I get that x center of mass equals 2? divided by four. And so now we can calculate the position of the center of mass as follows. Well. and this will be a position vector to this object. So that gives me plus one-half m times l. This is also l and this is also l. there's my definition for center of mass -equals the sum of the individual masses times their position vectors. in the y direction. of course. We know that the total mass. and the individual position vectors from the origin here will be this. which is 4m times the position vector.. so it will probably be somewhere here. And it's probably slanted in the direction of the 2m. These are massless rods. So we were not too far off where we put it. and whenever we have a vectorial equation.
Yes. very roughly. And so you see that we didn't put it in so badly. You may need a lot of imagination to see that.You can split it up into the position vector of this object. and that I can demonstrate for you again with the air track. of course.22L. This is. as we just did. momentum of the center of mass will not change -only of the center of mass. and they keep going like this and making crazy things. because you're going to be distracted by the weird motion of the other two objects. I will turn on the air shortly because the air makes a lot of noise. And I think that's about 0. Not of this car. The objects have the same mass. If you have a car or if you have an object like this.. And so you can calculate the center of mass. It's about one-fifth of this distance. So you're going to get that 4m times y of the center of mass equals this mass m times the y component of that position vector. and that is one-half l square root of three. And it will be nearly impossible for us to evaluate the motion of these two cars individually. This is the center of mass. which is different from calculating it analytically. which is one -half l square root three. So if you concentrate on that little object. if you have discrete points. and so you see that y center of mass then becomes the square root of three divided by eight times l.. This one has no y component and this one has no y component. That's the uniqueness of the center of mass. you may be able to see that. And they will oscillate in a weird way because they are connected with a spring and I keep them connected. so this is very easy. There we go. It's right in the middle. But if I give the whole system a certain velocity and then they go like this. And so you lose your m. . That's really not too hard. I will teach you in a few weeks a very easy way to determine experi entally where the m center of mass is located-experimentally. not of that car. We have a system here of two cars which I connected by a spring. It's about one-fifth higher than this distance. And so the center of mass will just laugh at us and ignore all these motions and will travel at a constant speed very nicely. then it is. much harder to calculate the center of mass. So I mentioned to you that the motion of the center of mass is very uniform in the absence of external forces. these are two cars connected by a spring. and I will give these cars a certain motion and they will go in this direction.
well. From this one. Okay. When I throw up a hammer. but the center of mass will behave in a civilized way. the squash racquet may be like this.. Are the timers off? Yes. you would expect it to behave perfectly like a parabola. Forget the fact that it lights up. Beautifully! Constant velocity. and now look at that center of mass. I'll bring it out here again. Okay. If I show the whole thing in UV. The hammer will start to tumble and rotate.. and a little later. and when I then make it dark. it's not quite a tennis ball. Now at one point. And so we have here a squash racquet and we have here the center of mass.You see how complicated this motion is of the individual cars? Can you see that the center of mass is moving very uniformly. the center of mass. but close enough. dark. And then you can really see that the center of mass moves in a very civilized way. I have also here a regular. Let me throw this one up in light. I will do it with a squash racquet-at one point the squash racquet may be like this. but the center of mass of the squash racquet will perfectly go along a parabola. timers are off? Okay. Hard to predict but the center of mass behaves decently. Let your eyes get used to the darkness. I will turn off all the lights and only turn on ultraviolet light. so you can enjoy this once more. I can let it go backwards. in the absence of external forces has a constant velocity. and you will see that it has very strange motion.. I'm going to do the same thing.. If I throw up a hammer... This one. But I will help you. then the center of mass and only the center of mass will just go along a perfect parabola as if it were just a tennis ball. it may be like this. and at another point. you will only see the motion of the center of mass. you think you can see that? You have a lot of imagination. you would not expect it to behave like a parabola. And ultraviolet light will interact with that little ball. So now I'm going to help you to concentrate. Center of mass motion. or can you not see that? Oh. then you will see the same kind of beautiful parabola as you would see with this ball-something like this. . I will turn on. then the hammer will do very weird things. And we know that these cars are doing crazy things.
So now we're going to turn off the lights and I want to show you the motion of the center of mass. You see the center of mass here? Can you all see it? Okay. You ready? Concentrate only on the center of mass. there we go. Enjoy the presence of your parents.You remember it was the last lecture that I wanted to remind you of. Nice parabola or not? I'll do it again. Have a good weekend. You see the center of mass? Can you see it? You can still see it. See you Monday . right? Wonderful parabola for me! All right.


text:
import socket, re, sys, traceback
from os import _exit, path, remove
import re
from libs.python_modules.utils.sysutil import getstatusoutput
from multiprocessing import Process
from libs.python_modules.utils.utils  import fprintf, printf, eprintf
import time

class PythonCyc:

    _organism = 'meta'
    soc = None
    _ptoolsExec = None
    DEBUG = True
    def __init__(self):
        pass

    def setDebug( self, debug = False):
        DEBUG = debug

    def setPToolsExec(self, ptoolsExec):
        self._ptoolsExec = ptoolsExec

    def setOrganism(self, organism):
        self._organism = organism

    def makeSocket(self):
        self.soc = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
        self.soc.connect("/tmp/ptools-socket" )
        return True

    def tokenize(self,string):
        LPAREN = '\(';
        RPAREN = '\)';
        WSPACE = '\s+';
        STRING = '\"[^"]*?\"';
        PIPES = '\|[^\|]*?\|';

        regexp = re.compile(r'' + "(" + LPAREN + "|" + RPAREN + "|" + STRING + "|"+PIPES+ ")" + "|" + WSPACE)

        _tokens = [ x.strip() for x in   regexp.split(string) if x ]

        removePipes = re.compile(r'\|([^|]*)\|')
        tokens = []
        for _token in _tokens:
            tokens.append(re.sub(removePipes, r'', _token) )  #@tokens;  ## removes outer pipes from the string.

        return tokens;

    def parseLisp(self, string):
        tokens = self.tokenize(string)
        parsed_expr = self.parseExpr(tokens)
        return  parsed_expr

    def parseExpr(self, tokens):
        if not tokens:
            return []

        if tokens[0]== '(':
            tokens.pop(0)
            list_elements = []

            while tokens[0] != ')' :
                toAddResult = self.parseExpr(tokens)
                if toAddResult:
                    list_elements.append(toAddResult)

            tokens.pop(0)
            return  list_elements

        elif not tokens[0] :
            tokens.pop(0)
            return []
        else :
            return tokens.pop(0)

    def send_query(self, query):
        if self.makeSocket():
          self.soc.send(query)
        else:
           printf("ERROR\tCannot create or connect socket\n")

    def retrieve_results(self):
        data = '';
        while True:
            _data = self.soc.recv(1024)
            if not _data:
                break
            data += _data

        return self.parseLisp(data)

    def retrieve_results_string(self):
        data = '';
        results = []
        while True:
            _data = self.soc.recv(1024)
            if not _data:
                break
            _data = _data.strip()
            if _data != None:
                results.append(_data)
        return ''.join(results)

    def getOrganismList(self):
        negPatterns = [ re.compile(r'^ECOBASES'), re.compile(r'^[#@]') ]
        posPatterns = [ re.compile(r'BASE$') ]

        query= "(mapcar #'object-name (all-orgs :all))"

        self.send_query(query)
        data = self.retrieve_results()

        if not data :
            return []

        organisms = []

        for _datum in data:
            if not _datum:
                continue
            datum = _datum.strip()
            for patt in negPatterns:
                result = patt.search(datum)
                if result:
                    continue

            result = posPatterns[0].search(datum)
            if not result:
                continue

            organisms.append(datum)

        _organisms = []
        for organism in organisms:
            _organisms.append(re.sub(r'BASE$', r'', organism).lower())

        return _organisms

    def sendStopSignal(self):
        query= "(exit)"
        self.send_query(query)
        time.sleep(10)

    def getFlatFiles(self):

        functiondef = """(defun create-flat-files-for-current-kb ()
  (format t "~%[Dumping data for ~A]~%~%" *current-species*)
  (let ((directory (org-data-dir))
    (go-annotations? (pgdb-has-go-annotations?))) ;; This function is far too expensive to serve as a predicate for GO terms...
    (lisputils:noting-progress ("File Export"
                :denominator :number-of-subtasks
                :phase-spec-list (cond ((and go-annotations?
                                 (not (eq *current-species* 'META)))
                            '(1 2 3 4 5 6 7))
                            (go-annotations?
                             '(1 2 3 4 5))
                            ((not (eq *current-species* 'META))
                             '(1 2 3 4 5 6))
                            (t
                             '(1 2 3 4)))
                :value-format "~A file exports completed"
                :handle-name *file-export-progress*)

    (dump-frames-to-attribute-value-files directory)
    (dump-frames-to-tabular-files directory)))) """

        self.send_query(functiondef)

        result = self.retrieve_results()
        print(result, 'loaded definition')

        functiondef="""(defun dump-flat-files-for-epgdbs () (do-orgs (:orgkbs   (mapcar #'find-org orgs) :dbms-type :file :close-kb-no-save? t) ))"""

        self.send_query(functiondef)

        print('creating flat files')
        function1="""create-flat-files-for-current-kb"""
        self.send_query(self.wrap_query(function1))

   #     result = self.retrieve_results()
   #     print result, 'first'

   #     function="dump-flat-files-for-epgdbs"

   #     print  'dumping flat files'
   #     self.send_query(self.wrap_query(functiondef))

        result = self.retrieve_results()
        print(result, 'done dumping out')
        if result=='NIL':
            return []

        return result

    def wrap_query(self, function ):
        lisp = "(with-organism (:org-id\'%s) (mapcar #\'object-name(%s)))" \
               %(self._organism, function)
        return lisp

    def call_func(self, function):

        self.send_query(self.wrap_query(function))
        result = self.retrieve_results()

        if result=='NIL':
            return []
        return result

    def genes_of_pathway(self, pathway, T):
        function = "genes-of-pathway \'%s" %(pathway)
        result = self.call_func(function)
        return result

    def genes_of_reaction(self, reaction, T):
        function = "genes-of-reaction \'%s" %(reaction)
        result = self.call_func(function)
        return result

    def protectFrameName(self, frame):
        pipePatt = re.compile(r'^\|.*\|$') ## if already pipe protected, don't do anything.
        status  = pipePatt.search(frame)
        if status:
            return frame

        if len(frame.strip())==0:
            return "|" + frame + "|"

        return frame

    def get_slot_values(self, frame, slot_name):
        try:
            frame = self.protectFrameName(frame)
            function = "get-slot-values \'%s \'%s" %(frame, slot_name)
            result = self.call_func(function)
            return result
        except:
            print(frame, slot_name)
            _exit(0)

    def get_slot_value(self, frame, slot_name):
        try:
            frame = self.protectFrameName(frame)
            function =  "get-slot-value \'%s \'%s" %(frame, slot_name)
            result = self.call_func_that_returns_string(function)
            return result
        except:
            print(frame, slot_name)
            _exit(0)

    def call_func_that_returns_string(self, function):
        # use for functions that will return a string and not a list.
        # this function doesn't call mapcar and doesn't parse the returned list.
        query = "(with-organism (:org-id\'%s) (object-name (%s)))" %(self._organism, function);
        self.send_query (query)
        result = self.retrieve_results_string()
        return result

    TIME = 10

    def sendStartSignal(self):
        if self.DEBUG:
           printf("INFO\tStarting up pathway tools\n")
        process = Process(target=startUpPathwayTools, args=(self._ptoolsExec,))
        process.start()

    def removeSocketFile(self):
       if remove("/tmp/ptools-socket"):
          return True
       else:
          return False

    def doesSocketExist(self):
       if path.exists("/tmp/ptools-socket"):
          #print "Socket exists"
          return True
       else:
          #print "No socket exist"
          return False

    def startPathwayTools(self):
        try:
           self.stopPathwayTools()
           trial = 0
           while not self.doesSocketExist() :
             self.sendStartSignal()
             time.sleep(self.TIME)
             if trial > 5:
               print("Failed to Start pathway-tools")
               return False
             else:
                trial += 1
        except:
            print(traceback.print_exc(10) )
            print("Failed to Start pathway-tools")
            return False
        return True

    def stopPathwayTools(self):
        #print "Stopping the pathway tools"
        try:
           trial = 0
           while  self.doesSocketExist() :
             #print "Stopping the running pathway tools"
             self.sendStopSignal()
             time.sleep(self.TIME)
             if trial > 5:
               print("Failed to stop pathway-tools")
               if self.removeSocketFile():
                  return True
               else:
                  return False
             else:
                trial += 1
        except:
            print(traceback.print_exc(10))
            return False

#                self.getOrganismList()

    def getExpectedTaxonomicRange(self, pwy):
        """
        Given a pathway asks for its expected taxonomic range.
        """
        taxonomic_range = self.get_slot_values(pwy, "taxonomic-range")
        taxonomic_range_names = []
        for taxa in taxonomic_range:
            taxa_common_name = self.get_slot_value(taxa, "common-name")
            taxa = taxa.replace("TAX-","")
            taxonomic_range_names.append([taxa, taxa_common_name])
        return taxonomic_range_names

    def getAllPathways(self):
        """
        Function to get all pathways from the current organism.
        """
        pathway_list = []
        my_base_pathways = self.call_func("all-pathways :all T")
        for pathway in my_base_pathways:
            pathway_list.append(pathway)
        #    print pathway  #KMK
        return pathway_list

    def getPathwayORFs(self, pwy):
        """
        Return a list of ORFs for a given pathway.
        """
        pathwayORFs = {}
        mygenes = self.genes_of_pathway(pwy,'T')
        for gene in mygenes:
            orf = self.get_slot_value(gene,"common-name")
            if orf not in pathwayORFs:
                orf = orf.strip("\"")
                pathwayORFs[orf] = 0

        return pathwayORFs.keys()

    def getPathwayReactionInfo(self, pwy):
        """
        Return a list of reactions given an input pathway shortname.
        :param pwy: string pathway name shortname
        :return: list of pathway reactions
        """
        pathwayRxns = {}
        myRxns = self.get_slot_values(pwy, "REACTION-LIST")
        coveredRxns = 0
        for rxn in myRxns:
            pathwayRxns[rxn] = 1
            rxn_genes = self.genes_of_reaction(rxn, "T")
            rxngenes_list = []
            for rxn_gene in rxn_genes:
                rxngenes_list.append(self.get_slot_value(rxn_gene,"common-name"))

            if rxngenes_list: # this reaction is covered
                coveredRxns += 1

        return [len(pathwayRxns.keys()), coveredRxns]

    def getReactionListLines(self):
        my_base_pathways = self.call_func("all-pathways :all T")
        pwy_count=0
        unique_rxns ={}
        if self.DEBUG:
           printf("INFO\tExtracting the reaction list\n")
        for pathway in my_base_pathways:
            if self.DEBUG:
               printf(" " + pathway)
            sys.stdout.flush()
            pwy_count +=1
            mygenes = self.genes_of_pathway(pathway,'T')
            totalrxns = self.get_slot_values(pathway, "REACTION-LIST")

            for rxn in totalrxns:
                unique_rxns[rxn] = 1

            pathway_common_name = self.get_slot_value(pathway,"common-name")
            if not  pathway_common_name:
                pathway_common_name = "?"

            num_reactions = len(totalrxns)
            num_predicted_orfs = len(mygenes)

            num_covered_rxns =0
            num_genes =0
            orf_strings = {}

            for reaction in totalrxns :

                rngenes = self.genes_of_reaction(reaction,"T")

                rxngenes = []
                for rngene in rngenes:
                    rxngenes.append(self.get_slot_value(rngene,"common-name"))

                if rxngenes: # this reaction is covered
                    num_covered_rxns+= 1

                rxn_name = self.get_slot_value(reaction,"common-name")
                if not rxn_name:
                    rxn_name = '???'

                if reaction in unique_rxns:
                    unique_rxns[reaction]= {}
                    unique_rxns[reaction]['name'] = rxn_name
                    unique_rxns[reaction]['ORFs'] = rxngenes

                    if rxngenes:
                        unique_rxns[reaction]['covered']= 1
                    else :
                        unique_rxns[reaction]['covered']= 0

                    unique_rxns[reaction]['num_pwys']= 1

                else :
                    unique_rxns[reaction]['covered']= 1
                    unique_rxns[reaction]['num_pwys']+=1

                num_genes += len(rxngenes);
                for rxngene in rxngenes:
                    orf_strings[rxngene] =1

                    # done for the reactions in a  pathway
            outputstr =  "PWY:" + "\t" + pathway + "\t" + pathway_common_name \
                         + "\t" + str(num_reactions) + "\t" + str(num_covered_rxns) + "\t" + str(num_predicted_orfs)

            for orf_string in orf_strings.keys():
                outputstr += "\t" + orf_string
            outputstr += "\n";

        # printing the reactions MOST important part of the calculation
        rxnOutputStrings=[]

        for reaction in unique_rxns.keys():
            rxnOutputStr = reaction + "\t" + unique_rxns[reaction]['name']

            for orf in unique_rxns[reaction]['ORFs']:
                rxnOutputStr += "\t" + orf

            rxnOutputStrings.append(rxnOutputStr)
        return rxnOutputStrings

def startUpPathwayTools(ptoolsExec):
    cmd = ptoolsExec + " -api"
    status = getstatusoutput(cmd)

if __name__=="__main__":
    pythonCyc = PythonCyc()
    try:
        pythonCyc.stopPathwayTools()
    except:
        print("nothing to stop")

redpajama_set_name: RedPajamaGithub


Beauitful 3 bedroom, 2 bath, open floor plan home featuring 9 foot ceilings.
This gently lived in home includes granite counter tops, with gas range, refrigerator, dishwasher and microwave.
Home is equipped with 4 side rock masonry, sprinkler system, covered patio and a large back yard. Don't forget to check out the park that features a playground with a covered pavilion, that is sure to entertain!

More pictures of this immaculate home will be posted soon!
I was searching for a Property and found this listing (MLS® #373581). Please send me more information regarding 2599 Diamondback, New Braunfels, Texas, 78130. Thank you!
I'd like to request a showing of 2599 Diamondback, New Braunfels, Texas, 78130 (MLS® #373581). Thank you!


Commonwealth Brewery Ltd (CBL) reported $123.5 million in revenue and $68 million in total assets at its annual general meeting 8 June while remaining debt-free. However, the company reported relatively flat revenue year-over-year and a decline in profits and earnings per share.
Though the company's financials were mixed, relatively flat revenue year-over-year and a decline in profits and earnings per share, the figures reflected challenges and corrections, including a one-time adjustment and were described as paling by comparison to the significance of "exciting" strategic plans to take the company forward.
CBL chairman Julian Francis (photo courtesy CBL) called the results "particularly impressive" given that the maker of Kalik and leading distributor of more than 200 brands had invested heavily in inventory after being named a supplier of choice for Baha Mar, an expense it could not fully retrieve following the multi-billion dollar resort project's collapse in late June 2015.
While profits took a sharper dive from $18.2 million in 2014 to $11.8 million in 2015 as the company absorbed the cost of the new value added tax in addition to the stalling of Baha Mar and much-need price and inventory corrections, both the chairman and CEO Hans Neven said CBL had used the year to make important strides in operations and marketing that will benefit shareholders for years to come.
Both Kalik and Heineken as well as Coors are manufactured in the company's 150,000 sq ft plant at Clifton on New Providence.
Among the most noticeable changes came at the end of the year as Commonwealth Brewery began the roll-out of its new branding, uniting all stores under its distinctive 700 Wines & Spirits umbrella.
Since going public in 2011, CBL has paid out $80 million in dividends and its share price has continued to climb from $8.33 at the time of the initial public offering to a high of $15.50 at year-end.
Some 75 per cent of the shares are held by Heineken NV and 25 per cent by Bahamian investors including the National Insurance Board.
The Bahamas Institute of Chartered Accountants has held its 2016 Annual General Meeting. At the AGM, BICA president Darnell Osborne (pictured) highlighted milestones over the past year, while outlining the Institute's plans for the coming year.
A new president has been elected at the annual general meeting of the Caribbean Association of Investment Promotion Agencies to serve 2017-2019.


Below we have inserted 2 videos for your perusal. The first video is a schematic slideshow of a "Hydraulic Tube Changer" and a break down of all of the components needed for this to work. The second video is of a Tube Changer in action.
Answer all the questions according to your knowledge. If you are unsure of what to answer please use N/A (Not Applicable). If you cannot answer the question according to your knowledge please use UN (Unknown) This questionnaire is for the specific purpose of gathering information, so Alcar International can fully understand your exact requirements.
8. Is the tundish stopper controlled?
11. Hydraulic System:- Availability and properties of hydraulic systems on Tundish Cars (Pressure, Flow Rate, Oil Type) etc.
15. What is the limiting factor in 14, ie why do they stop after this number of ladles. Is it because of alumina blockage and if so where, or because of lack of steel, or because of tundish lining life or because of SES life or what?
18. Is the tundish bay provided with stands for tundishes before and after use.
Thank you for filling out our Questionnaire, we look forward in speaking with you soon.


Distance between Roslynmead and Quantong. How many miles from Roslynmead to Quantong.
The straight distance between Roslynmead (Victoria) and Quantong (Victoria) is 144.49 mi, but the driving distance is 169.83 mi.
It takes to go from Roslynmead to Quantong.


We provide end to end services for Electronic Evidence Gathering and Analysis using latest tools of digital forensics.
Further, Section 65B certificate is required in order to prove the authenticity & integrity of electronic evidence in court of law. It is one of the major prerequisites for the admissibility of electronic evidence. In today's world the ambit of technology is transcending each and every domain at rampant pace. It is not only becoming difficult to distinguish between the category of this evidence, this also requires specialize expertise and understanding of the ever-changing technology.
We provide 65B certificate along with Hash Value Report to legal professionals, law enforcement agencies, practitioners & end users for Audio/Video Transcript, Email/Social media/App Conversations. We also provide Expert Witness and Testimony services.
Mobiles are enjoying an ever increasing popularity for today's world. The phones are increasingly used to surf the Internet, store private information, access corporate network /confidential company information. Not only this they are also used to process such confidential information considering the computing power that they have these days. All of such features make smartphones an attractive target for Trojans, Malware, Phishing attacks and many more specially crafted attacks. The team at CLS prepares the organisations tackle such mobile security issues across all platforms.
The team at CLS assists its clients in improving the security of the software which they develop, outsource or purchase off-the-shelf. Our consultants help the enterprises to improve their security at every level of the life cycle i.e. in the design phase, implementation phase or even when the software is running in the production environment. The solutions provided by us help the enterprise understand the implications from business as well as security perspective.
Network Security audit is categorized into two vital areas of information. The first areas is the static data which would cover the system definitions, protocols used to communicate, password rules, firewall definitions etc. whereas the second category looks into the activities, events that have taken place which would cover areas such as database access, file transfers, sharing ,system log on etc. are some of the times that will be looked into the network audit. Such broad perspective will help organizations defend against external as well as internal threats.
Cyber Insurance is an emerging insurance product which protects businesses across sectors like IT & ITes, Importers – Exporters, Mfg. Units like Pharma, Chemical, Textile, Jewellers, Auto, BFSI and other Govt. bodies from internet-based risks like cyber frauds, ransomwares, phishing attacks etc.


text:
Gotham Central: In the Line of Duty
Posted on Jan 16, 2014 by Nick
Gotham Central, Vol. 1: In the Line of Duty by Ed Brubaker
A fascinating take on the world of Batman, Brubaker and Rucka's gritty police procedural takes you down to street level in Gotham City as the police try to juggle villains like Mr. Freeze and Two-Face with the more usual police fare of robberies, kidnappings, and murders. Two aspects of this ten-issue collection resonated with me the most. The first is that when a Batman story is taken down to street level, everything becomes much more brutal. It's fantasy when Batman fights Mr. Freeze. It's terrifying and tragic when cops try to and, more often than not, die horribly in the process. The human toll of Batman's world has never been made clearer. The second aspect that really stood out for me is the psychology of the GCPD detectives themselves. They don't like Batman because he pretty much solves all of Gotham's major crimes before they can. They know they only have until sundown to catch the bad guys before Batman comes swinging in to take the collar from them. It drives them to work harder, but it also makes them angry and insecure. Alas, I'm not that big a fan of Michael Lark's art here. It reminds me too much of the cramped artwork from newspaper comic strips, and I prefer clearer visuals. But that's only a small caveat. I really like the idea behind this series: Batman stories without Batman (although he does make occasional cameos, and through the POV of the detectives he often comes off sounding like an asshole.) It's got a lot of potential and a lot of promise. If the forthcoming Fox TV series GOTHAM is anything like this, I'll be tuning in.

redpajama_set_name: RedPajamaCommonCrawl


text:
Key Exempt Plans
Officer Decisons
Portfolio Holder Decisions
Your MEPs
Call In (Re-opening of South Holland's Markets, and Spalding Market Stall provision)
Meeting of Special meeting (Call-In). This meeting will be held virtually via Zoom and streamed live. The link for this can be found by clicking on the meeting date., Performance Monitoring Panel, Monday, 13th July, 2020 6.30 pm (Item 17.)
View the background to item 17.
At its meeting on 16 June 2020, the Cabinet made a number of decisions relating to the re-opening of South Holland's markets, and Spalding market stall provision. In accordance with the Constitution, this proposed decision has been called in by Councillors A M Newton, M Hasan and R Gibson.
Please find attached the following documents:
Appendix A Cabinet covering report and Appendix A – 16 June 2020
Appendix B Cabinet minute - 16 June 2020
Appendix C NABMA Social Distancing Guidance
Appendix D Market Charter
Appendix E Market Timeline
Appendix F Member Stall Feedback
Appendix G Budget Information
Appendix H Appendix B to Cabinet report – Cabinet 16 June 2020 (Exempt paragraphs 1 and 3)
Appendix I NABMA report (Exempt Paragraph 3)
Appendix J Market Trader Feedback (Exempt paragraphs 1 and 2)
Appendix K Risk Assessment Statement (Exempt paragraphs 1 and 2)
(Please note that appendices H, I, J and K to this report are not for publication by virtue of Paragraphs 1 (Information relating to any individual), 2 (Information which is likely to reveal the identity of any individual) and 3 (Information relating to the financial or business affairs of any particular person (including the authority holding that information)) in Part 1 of Schedule 12A of the Local Government Act 1972, and are therefore attached to this agenda at item 6.
The call-in will be considered in the following order:
· Chairman's introduction
· The members that have called in the decision to inform the Panel of the reasons for the call-in (maximum 10 minutes)
· Relevant Portfolio Holder to set out the reasons for the proposed decision (maximum 10 minutes)
· Questions – The Panel will then have the opportunity to ask questions of the Portfolio Holder
There are three options open to the Panel when drawing its conclusions on the call-in:
a) Take no further action;
b) Refer the proposed decision back to the Cabinet, setting out the nature of its concerns;
c) If, having taken officer advice, the Panel considers that the decision is contrary to the Policy Framework or Budget, it may refer the matter to Full Council.
The Performance Monitoring Panel received a report advising that on 16 June 2020, the Cabinet had considered a report regarding the re-opening of South Holland markets and Spalding Market Stall Provision. The following decision had been made by the Cabinet:
1) That in order to secure the safe re-opening of South Holland District Council markets, in line with government guidance introduced due to Covid-19:
a) The current practice of erecting and dismantling SHDC stalls at Spalding Tuesday and Saturday markets be suspended;
b) The removal of trade waste by South Holland District Council at Holbeach, Long Sutton and Crowland markets be terminated, thereby making the service equitable across all markets;
c) A book and pay system for traders who wish to stand at any SHDC market be introduced to enable a planned approach to market layouts each week and remove the need for cash handling, both of which assist with the opening of Covid-safe markets;
d) In the event that, following the consultation referred to in Appendix B of the report, the current practice of erecting and dismantling stalls at the Spalding market is ended, the fees for Spalding traders be amended as shown at paragraph 1.20 of the report;
e) A rent free period be introduced for traders until 31 July 2020 to support the recovery of markets;
f) Social distancing procedures be introduced at all markets including changing the layouts to accommodate the new government guidance;
g) The market trader handbook be amended in line with the above recommendations;
h) The following toilets be re-opened with an enhanced, hourly cleaning regime:
a) Spalding Vine Street and Winfrey Avenue, Tuesday to Saturday 8am to 4pm;
b) Long Sutton and Holbeach, Monday to Friday 8am – 2pm
2) That the Portfolio Holder for Place to authorised to:
a) Designate a statutory market at Victoria Street car park should the volume of traders increase to such a point that it is deemed appropriate to enable the Spalding markets to operate safely in accordance with Governance guidance; and
b) Make a recommendation to Full Council or the appropriate Chief Officer (in consultation with the Chief Executive) in relation to any proposed impact on employment arising from the consultation process referred to in Appendix B; and
3) That the Environmental Services Manager be authorised, in consultation with the Portfolio Holder for Place, to:
a) Undertake the necessary consultation in relation to any proposed impact on employment referred to in Appendix B of the report;
b) Change fees as set out;
c) Procure and implement a book and pay system;
d) To continue to monitor the government guidance as part of the Covid-19 response and make amendments alongside guidance changes, as requested;
e) Establish a Covid compliant market in the Market Place, Long Sutton if a road closure order can be obtained via the local Highway Authority and arrangements prove viable and achievable. If no such closure can be obtained the market to be established in the nearby council owned car park.
In accordance with the Council's Constitution, the decision had been called in by Councillors A M Newton, R Gibson and M Hasan, for consideration by the Performance Monitoring Panel. The report cited the reason why the decision should be called in as:
'We do not feel full and proper information has been available to all'.
The Councillors considered the following alternative decision should be made:
'Stalls should continue to be provided at Spalding market until the end of this financial year, or until proper and meaningful discussion is held with market traders, or their representatives'.
The report also laid out the following options available to the Panel, following consideration of all the information:
a) To take no further action in relation to the call in;
b) To refer the proposed decision back to Cabinet, setting out in writing the nature of its concerns; and
c) If, having taken officer advice, the Panel considers that the decision is contrary to the Policy Framework or Budget, it may refer the matter to full Council. (The Panel was advised by officers that this option was not viable as the decision had not been contrary to the Policy Framework or Budget).
The initiators of the call-in, the Portfolio Holder for Place and relevant officers were all given the opportunity to put forward their views on, and respond to the issue under discussion, and members of the Panel were also able to ask questions.
During discussion of the issues, it was agreed that debate could be undertaken without referencing the exempt information specifically, and there was therefore no need for the meeting to go into private session.
The Councillors who called the decision in raised the following key points as their reasons for call-in:
· Full and proper information had not been available to all;
· Lack of consultation between the Council and the market traders and the traders' representatives;
· Too short a timescale – 1) for consultation with traders and councillors; and 2) between the time the decision was made and markets re-opening again – this had not allowed traders sufficient time to source their own stalls;
· The members understood that the authority had to comply with Government guidelines, but markets at other authorities had continued to trade during the COVID period;
· Other authorities were continuing to erect stalls for stall holders;
· No trial had been undertaken to see if the erection of market stalls could be done safely;
· It was difficult for some stall holders to erect their own stalls;
· A robust assessment had not been undertaken;
· Had costs been challenged?
· Losing the market would have an adverse effect on the town centre – it was felt that one of the main reasons for the decision was to cut costs, that there was no vision for the future, and that the decision had been rushed, not giving members enough time to respond;
· The future of the market needed to be considered as part of future plans for the town centre;
· Changes detailed within the decision made by the Cabinet seem permanent and not solely as a reaction to the current pandemic.
Panel members raised the following issues:
· There was concern that there was a threat to the Spalding market;
· It was clarified that the call-in related specifically to the erection of market stalls at Spalding market, and that these decisions had been made as part of wider decisions relating to markets. Some members felt that the right decision had been made in response to the Covid pandemic, that there had been very short notice given allowing markets to re-open and that the short consultation period was therefore inevitable. They also felt that the decision was not permanent, and that the decision made had been Covid-related;
· Some members questioned the risk assessment, and the fact that it had been verbal rather than written – the markets were outdoors, spaced as guidance dictated and that the erection of the stalls was a low-risk role;
· Government guidance impacted upon all businesses across the area, with no-one being unaffected. The first priority should be to follow the guidance available at the time;
· Some members stated that they were hopeful for the Council's Spalding town centre improvement plans, which included the market;
The Portfolio Holder for Place responded to the call-in, and issues raised by members as follows:
· The Cabinet decision has been based on the correct advice from officers, and alongside guidance at the time, and had been the correct one in the circumstances that the authority had been confronted with;
· The Portfolio Holder did not wish to debate operational staffing matters, as this was the responsibility of officers however, he stated that the nature of the working practices, and the number of individuals employed to undertake them was correct;
· With regard to the way in which other authorities were operating their markets, he stated that all councils dealt with things differently and often had different budgets;
· Spalding market was not under threat as a result of the Cabinet's decision, and it did form part of the long term proposals for the Spalding town centre;
· The changes proposed were not permanent;
· Traders often commented on the negative impact of stalls being erected and then being left empty
Officers responded to the call-in, and issues raised by members as follows:
The Environmental Services Manager stated:
· No decision had been made to dispense of the market stalls;
· With regard to returning to work, whilst maintaining social distancing, legislation still stated a requirement for distancing of 2 metres, reduced to 1 metre in mitigating circumstances only. There was a need to protect traders, workers and businesses, and ensure their safety. There was a need to do a risk assessment, and to continue to do this alongside government guidance;
· Markets did form part of the Spalding town centre management programme;
· With regard to the current risk assessment for stalls not being erected during the Covid period being verbal rather than written, it was stated that it had been a verbal process as it was an iterative process, reviewed with each change in government guidance. Having a formally written assessment would be done when the risk had been assessed as appropriate to bring individuals formally back into that role, and this was not possible currently as it was considered currently too high risk in the current Covid crisis, and given the individual circumstances of SHDC and its employees;
· With regard to timescales, government guidance was moving very quickly. The authority would have liked more time to implement the changes, but this had not been possible. The Government had advised in late May that markets could re-open in June. Traders had wanted to return when it was as safe as possible to do so. They had also been contacted in person to ensure that they knew what the authority was doing, and why. The market had returned successfully although some traders had not wished to return.
The Place Manager stated:
· The Place Manager stated that she was the lead officer for the market towns improvement plan, and that prior to the Covid pandemic, a very successful event had been held with regard to identifying opportunities for the town. All plans would include the market traders, and the market was not solely specific to its stalls and structure. There was a whole package of improvements that the Council could look at, including promotion of the towns, including the markets themselves. As manager, she had undertaken a number of conversations with market representatives from Spalding, and also met with stall holders in the town centre to discuss layouts – these conversations had been positive and had resulted in other options being put forward. None of the representatives had stated that the market was a lost cause, or that nothing could be done about it.
Members considered the information, and in view of the options available to the Panel, the following two motions were proposed and subsequently voted upon:
First motion – Proposed by Councillor J Astill and seconded by Councillor A C Beal:
· That the Panel take no further action in relation to the call in
The Panel voted on this first motion, and the proposal was defeated.
Second motion – Proposed by Councillor A M Newton and seconded by Councillor S Walsh;
· Stalls should continue to be provided at Spalding market until the end of this financial year, or until proper and meaningful discussion is held with market traders, or their representatives, and that the whole issue be subject to a more thorough examination to enable the council to find a way to rebuild the Spalding market into an attractive, viable market, supporting the economic viability of the district and the town which would help support aims in our corporate plan.
The Panel voted on this second motion, and the proposal was carried.
AGREED:
That the decision made by the Cabinet on 16 June 2020 be referred back to the Cabinet, with the following response from the Performance Monitoring Panel:
Call In (Re-opening of South Holland's Markets, and Spalding Market Stall provision), item 17. PDF 144 KB
Appendix A1, item 17. PDF 248 KB
Appendix B, item 17. PDF 211 KB
Appendix C, item 17. PDF 583 KB
Appendix D, item 17. PDF 267 KB
Appendix E, item 17. PDF 222 KB
Appendix F, item 17. PDF 229 KB
Appendix G, item 17. PDF 187 KB