Tuesday, May 8, 2012

献血に行ってきた

タイトル通りです。

最近Facebookにて、ドナーの意思表示ができるようになって以来、ドナーの数がうなぎ上りだそうですが、自分の記憶が正しければ、本人が死亡した際、ドナーとして臓器が実際に提供されるためには、自身の意思表示に加え家族の同意が必要であるはず。Facebook話題の新機能に便乗するミーハー献身的な心意気は評価しますが、実際に本人が死亡した際にスムーズに臓器提供に至るには、事前に家族に話しておくことや、法に基づいて書かれた遺書を用意しておくことが大事なのではないでしょうか。自分たちの世代の親はFacebookなんて知らない人も大勢でしょう。不慮の際に事前の断り無くして、子供の臓器提供を促されても、親は何のためらいもなくそれに従うとは思えません。少なくとも臓器提供に至る数の減少は免れないでしょう。そんな事態を未然に防ぐため、またFacebookのドナーステータスを変えるという動機の無駄を防ぐためにも法的な手段を講じておこうと、自分は思った次第であります。

とりあえず、できることから始めようということで献血に行ってきました。当たり前すぎて、いまさら書くことでもありませんが、献血で救われる命もあることも事実です。献血とは人に勧めるものでは全くありませんが、行って良かったと自分は思いました。

Saturday, May 5, 2012

Guides to PyMOL movies


Guides to making movies with PyMOL

Here is an attempt to compile my current know-hows. By no means will this guide be sufficient for you, so please Google away for further questions. I will gradually update this guide, so please comment what you want to see, and I'll help to the best of my ability. I used PyMOL 1.3, but it may make sense to buy the latest version since it only costs $99 and supposedly it makes life so much easier.

Here is a link to an example along with the scripts I used. I am still a novice, and I don't know how to contain several maneuvers into a single file, and to move from one scene to the other, so you'll find that I frequently use Fade transition effect of PowerPoint animation.

1. Brief step by step guide
 
1.1 Decide your Framerate (FPS). 24 FPS is usually sufficient.

1.2 Visit the drawing board, decide what you want to present, and how many seconds to be allocated in each motions (zoom in, rotation, rock etc). For example, to make a movie that lasts for 3 seconds at 24 FPS, then:-
#To create 24 * 3 = 72 frames
mset 1 x72

1.3 Decide/define the size (2D pixel size) of your movie. This can be of any value you want, but why not stick to a typical pixel size for a movie, for example 640 ´ 480. Some video encoder will automatically add few pixels to the edge when fed with movies with odd-numbered pixels, which is confusing when you plan to do transition effect with static pictures in Powerpoint.
#Set the current window size to 640*480
viewport 640, 480

1.4 Add commands, or compile all the commands into one script file (.pml) and run it by File / Run.
####To be updated####
Please refer to section 2 for the time being.

1.5 Save Movie As / PNG images and output each frames as a PNG image.
 
★TIP: Check the Movie/Ray Trace Frames option on for better results. It will take longer to render every frames by ray tracing, but it's prettier

1.6 Convert the consecutive PNG images into a movie. There are several ways to achieve this, and the preferred way will depend case by case. First of all, decide if you want your movie to be either :-

A.       Animated GIF file  OR
B.       Movie

An animated GIF is not bad if you want to carry out simple maneuver (e.g rocking, rotation) that occurs indefinitely. Two issues are associated with animated GIF.

1.        I found that it is not suited for single-play maneuver (zoom-in), because PowerPoint 2010 does not interpret the “-loop” flag of the GIF file correctly, and will play the movie over and over again, even if you set the flag as play once only (GIF made by ImageMagick 6.7.6.5, the correctness of the GIF output confirmed by Firefox 11.0).

2.        An attempts to increase the play speed by decreasing the “-delay” value below 3.3 (milliseconds?) was not reflected in the PowerPoint sideshow, so the resulting animation was slow.

If you're happy with GIF, then compile the PNGs into one GIF file with the following command, and copy & Paste into your PowerPoint slideshow.

#ImageMagick
#-delay: time delay between each frames in milli seconds (?)
#-loop: 0 for no loop, 1 or remove altogether for loop.
convert -delay 3.3 -loop 0 mov00??.png movie.gif



If you think a GIF won't cut it for you, then I recommend compiling the PNG pictures into a movie.

Be careful about the codec when including a movie in a slideshow :-

1.        If you are bringing your own laptop and plugging it into the project for the talk:
You don’t have to worry so much, because the projector will project whatever you see on the screen, so you only need to worry the slide works on your computer or not. You can choose whatever codec you like.
Be aware, you could still face trouble unrelated to codec, such as that the projector doesn't show what you see on the screen. (
Videos play correctly on computer but not on projector (black box))

2.        If you are bringing just your presentation file in a USB stick:
You has to be sure that the codec you’ve used is also available on the computer you will be using. Usually it’s a Windows PC, so WMV format (comes default with any Windows) is the best bet. If you know that you’re using a Mac on the day, then either Quicktime (.mov) or h.264 format will do the job
.

Some software that can convert consecutive PNG images into movies.
MGen (Japanese): Used to create uncompressed AVI file from the PNG images. Can specify FPS.
QuicktimePro: It’s supposedly good, but I’ve never used it. I’m not sure if it can output in WMV format.
Or any encoder of your choice: To encode the uncompressed AVI into your favourite format.

As an example, I used :-
1. MGen to create uncompressed  AVI file from consecutive PNG files. (specify FPS)

2. TMPGEnc 4.0 Xpress to convert uncompressed AVI file into WMV file. (specify bit-rate)

You should specify FPS and the quality when converting the consecutive PNG into a movie file. I use 1500 kb/s for slow moving scene (rocking motion) and 5000 kb/s for fast moving scene (zoom-in).

Give me a shout if you want me to do the encoding for you.

1.7  Insert your movie into the PowerPoint slideshow. PowerPoint since 2007 can embed the movie into the slideshow file.


2. PyMOL commands, etc
Multiple commands can be copy &and pasted into a text file, save it with .pml extension, and be executed form  File - Run.

#make 60 frames
mset 1 x60


#Get current window pixel size
print cmd.get_session()["main"]

#Set the window pixel size to 640*480
viewport 640, 480

#label 44th residue at its CA atom
label n. CA and i. 44, "(%s, %s)" % (resn, resi)


#make label larger, size 1 (or any other value)
set label_size, -1


#zoom out along axis perpendicular to screen
move z, -70


#movie, rock. (first frame, last frame, +/- 5, 0=loop ?, axis)
movie.rock(1,60,10,0,1)


# Get the current point of view
get_view

# Set the current point of view
#An example given below. Copy & Paste the output from "get_view" command.
set_view (\
     0.774900615,   -0.588428438,    0.230829433,\
     0.420271188,    0.752415657,    0.507189453,\
    -0.472124964,   -0.296011031,    0.830345929,\
     0.000022355,    0.000021480,  -68.459259033,\
    37.393062592,  -43.430206299,  -63.053943634,\
    45.082897186,   91.842987061,  -20.000000000 )

# Smooth zoom in from one predefined point of view to the other over certain frames.
# go to the first frame
frame 1
#make sure you're at where you want to start your animation. Use "set_view" command.
mview store
# go to the last (or any other predefined) frame
frame 90
#make sure you're at where you want to end your animation. Use "set_view" command.
mview store
# now link the two stored camera positions together:
mview reinterpolate

#play your movie
mplay


#ImageMagick
#delay 3.3 seem to be the fastest for unknown reason (number in milli seconds.
#-loop: 0 for no loop, 1 or remove altogether for loop
convert -delay 3.3 -loop 0 mov00??.png movie.gif


3. Terminologies

Bitrate: Amount of information streamed per second. Larger the bitrate, clearer the picture is. But too high bitrate will result in enormous file size as well as insufficient bandwidth between where your slideshow is located (e.g. USB stick) and the PC, resulting in choppy movie. Bitrate will be affected by the FPS and quality of the picture.

Frames per second (FPS): How many pictures to be shown per seconds. Larger the number is, smoother the movie is, but will increase the bitrate.

Codec: A sub-program to encode your video. A codec is needed in order to encode and to decode a video. You need to encode your video with a codec for a certain format – otherwise uncompressed AVI will be impractically huge. Modern codec allows you to make your video file size tiny while maintaining reasonable quality.


Digital container format

180 degree rule: If your motion involves changes in point of view, it’s best to keep the positions of the objects constant relative to the audience, before and after the motion, otherwise the audience will become confused.

Saturday, April 21, 2012

BCA 英国結晶学会Spring meeting 2012

毎年春に行われる、BCA (British Crystallographic Association, 英国結晶学会) から生還してきました。

今年はWarwick大が主催、初日の火蓋は今や恒例となったYCG (Young Crystallographers' Group, 青年の部) の発表により、切って落とされました。博士課程の学生や卒業して間もないポスドクがお互いの研究を発表しました。そんな中、自分は口頭とポスターにての発表、特に口頭の発表はなんと初日の2番目でした。さらに自分はYCGの委員ですので、2日目朝一番のセッションを司会してきました。発表はともかく、司会を務めるのがあんなにプレッシャーがかかるものとは・・・(汗

YCGのセッションが初日と二日目の午前中に行なわれた後は、年配の方々が次々と到着し、普通通りの学会が4日目の正午まで行われました。最新の研究成果や、いろいろ興味深い発表が聞けるだけで満足ですが、とくに今年は2011年にノーベル賞を受賞したダニエル・シェヒトマン(Daniel Shechtman)本人による準結晶への発見にまつわる話に、誰もが耳を傾けていました。

個人的に面白かったのは、今まで別の分野として扱われてきた、タンパク質と小規模化合物の結晶学を、これからはお互いに歩み寄って行くべき、それには何が必要かというディスカッションでした。背景としては、タンパク質の結晶構造の信頼度が徐々に進歩してきた一方で、今までタンパク質とは比べ物にならないほどの高品質にて得られた小規模化合物の結晶構造も、対象である化合物の規模が徐々に大きくなるにつれて、今まで化学系の結晶学者たちが直面したことがない問題(比較的低い解像度や、高めの結晶内における溶液の割合)に向き合わなければならなくなってきたことがあります。ディスカッションはタンパク質と小規模化合物、それぞれの結晶学の大御所が、聴衆からの質問に答えながら意見を交わすといった風に行われました。

そのディスカッションの中から印象に残った話を一つ。タンパク質の結晶構造は解像度が2Å以上で得られればラッキーといった風潮がありますが、小規模化合物の結晶学者は1.3Å以下のデータは捨ててしまうそうな。(ナ、ナンダッテー  タンパク質を扱っている人間としては信じられない話です。

学会は終わり、自分の卒業も近づくなか、自分のYCGの委員としての期間もあと一年を残すのみとなりました。YCGが創立されたのは比較的最近(2000年代半ばだったかな)ですが、この若いが活発なコミュニティーを残った期間中にさらに盛り上げて行けば良いなと思います。学会中、ボスやほかのラボの大御所たちの間で学生たちがおとなしくかしこまっているよりも、フレンドリーでフランクな雰囲気のなか、自身と同じようなレベルの学生たちと話し合えるのは、将来的にコラボレーションを芽生えさせる機会を与えられる点で、長期的にとても良いと思います。

Thursday, March 29, 2012

国立アメリカ空軍博物館バーチャルツアー + RIAT2012(予定)

友人が面白いサイトへのリンクを送ってくれました。

National Museum of the U.S. Air Force 

国立アメリカ空軍博物館にてバーチャルツアーができる公式サイトです。新旧、採用されたものから実験機まで、ありとあらゆる軍用機が展示されています。その規模は自分が去年訪れたロンドンの王室空軍博物館を軽くしのぎます。ウィキペディアによれば入場料はタダだそうな。いつか行ってみたいものです。

軍用機つながりでもう一つ。今年もRoyal International Air Tattoo (RIAT 2012)に行く予定です。チケットは既に土曜日の分を購入し、あとは良い天候になることを祈るだけ。

今年も見どころがたくさんある中、やはり注目は米軍のチルトローター機、MV-22B Osprey (オスプレイ)です。実機を見るのは、自分が初めてRIATを訪れた2006年以来です。あの時見たオスプレイ、Mig-29OVTやユーロファイターなど、あの衝撃はいまだ色褪せません。当時はデジカメを持っていなかったのでインスタントで写真を撮ったものの、どれもヘボな写真の上、現像代で思わず吐血しそうになったのは、いい思い出です。

オスプレイ、2006年度RIATにて





最近思うんですけども、RIATを訪れる人の多くは、汽車でSwindonまで、そしてシャトルバスでFairfordに向かうわけですが、バスで直接ロンドンから開催地まで往復で移動するパッケージツアーなんてあれば便利でしょうね。

Monday, March 26, 2012

ニック・レーン 生命の跳躍 + (無料) 本へのリンク

最近ニック・レーン(Nick Lane)の生命の跳躍――進化の10大発明 (Life Ascending) を読み終えました。生命の発生から現在までに発生した特に重要な10の要素、それぞれについて近年の発見などを交えながら説明しています。たとえば生命の発生そのものや、シアノバクテリアによる光合成、真核細胞そして多細胞生命体の発生、さらには意識の発達などです。このように進化の過程を振り返れば対称性といった、現在の生物にとなっては当たり前にように感じられる特徴も、素晴らしい発生に感じられます。「進化のテープを巻き戻し、最初から再生しなおせば、決して生命は今我々が知っているような形にはならないであろう」と「ワンダフル・ライフ」にて主張したスティーブン・グールドに改めて共感します。

こんなことを書いていると相も変わらず創造説支持者は、「生命とは、進化によって説明するにはあまりにも複雑である」という論を展開します。それに対する反論とは、

1)進化のメカニズムとは、一つ一つの度合いは小さくとも、獲得した優位な形質とは遺伝によって次世代に受け継がれていく、いわゆる進歩の積み重ねである。一つ一つの小さな進化は比較的たやすく起こり得る。多くの創造説者が間違って認識している「単細胞生命が一気に高等生命に進化する」といったことは誰も主張していない。

2)確率的に低い頻度でしか起こりえない事柄でも、十分な時間があればそれは必然になる。それは生命の進化にも当てはまる。

の2点かと思われます。結局は個人の気持ち次第ではないだろうかと、最近思うようになってきました。真実を知りたいと思う人もいれば、手持ちの知識で十分という人もいるでしょう。個人的には現在の生命の多様性を神の技によるものと仮定した場合、その神の存在そのものが、進化よりも確率的にありえないと思います。


ニック・レーンの本を読む際に使ったキンドル、現役真っ盛りです。最近、著作権が切れた本を公開しているサイトを見つけ、ウハウハです。今読んでいるのは、ダーウィンの「種の起源」です。外にも、チャールズ・ディケンズなどの大御所もあるようです。有名な本がこのようにタダで公開されているとは素晴らしい。自分もこの年になってやっと年少時代に読み損ねたオズの魔法使いを読みました。リンクは以下に、ぜひどうぞ。



青空文庫をキンドルで読む際に必要。

Tuesday, March 13, 2012

外出 - 科学&エンジニア週間

卒論を書くことばかりに専念している近頃ですが、久しぶりに大学以外へ外出する機会がありました。

イギリスでは3月の9日から18日の間は「科学&エンジニア週間」 (National Week of Science and Engineering) となっており、各地で色んなイベントがあります。雰囲気的には「交通安全週間」みたいなノリでしょうかね。(BCA) 英国結晶学会-(YCG) 青年の部も小規模の単発イベントをReadingにて開催することになっていた所、YCGの委員である自分も手伝いに行きました。イベント名は

READING SCIENCE WEEK - The structure of stuff is sweet

とりあえず、構造を知ることが物理、化学、生物において極めて重要であること、そして物質の分子構造を調べるに当たり、結晶学が非常に有効な手段であることを一般に広めようというイベントでした。駅向かいにある大き目のパブを部分的に貸切り、好きに出入りできる形式で出し物を展示していました。事前に告知しておいたお陰か、悪くない人出でした。

一般の人の興味を引きつつ、わかりやすく結晶学を伝えるために、出し物もいろいろと工夫しました。他の委員はマシュマロと爪楊枝を使い結晶格子の説明や、穴の開いた紙に懐中電灯をあてることによって逆格子を、そしてバネを使った分子間の結合を説明していました。自分は生化学のバックグラウンドを生かし、「タンパク質の結晶を作ってみよう」という題でリゾチームを参加者に結晶化させる、というものでした。30分くらいで結果が確認できるので、我ながら良かったと思います。

リゾチームの結晶



科学を一般に広めることの重要性が指摘される中、科学者と一般の人が自由に交流できるサイエンスカフェといった取り組みは、イギリスでも日本でもまだ珍しいものです。そんな中、YCGが最初から最後まで取り仕切ったこのイベントは、なかなか健闘したうちに入るのではないでしょうか。これから増えていくであろう、この類の交流イベントがあれば、参加してみてはいかがでしょうか。質問があれば、その分野の知識があるなしにかかわらず、ぶつけてみるのが良いと思います。実際、今回のイベント中には鋭い質問も少なからずありました。

科学に携わっている者の視点からいえば、一般の科学に対するイメージというのはなかなか分からない物ですし、逆もまた然りでしょう。最終的には大局的な研究の方向性というのは納税者が決めるものだと自分は思っています。「2位じゃダメなんですか」なんてアホなコメントは論外ですが。

というわけで、ビバ・結晶構造!結晶学サイコー!な外出でした。来月は英国結晶学会のメイン・ミーティングがあるので、それまでまた卒論を書く作業が続きそうです。

Sunday, February 5, 2012

ブックマーク内の記事紹介 & 科学

インターネットの気に入った記事や、あとで読もうと思ったページなどをブックマークに登録し続けた結果、ブックマークが素晴らしい量に膨れ上がっています。それらの記事をここにて紹介し順に消していけば、ブックマークもすっきり、記事の内容も頭に残り、おまけにブログにネタも手に入るという一石三鳥、のはず。

そんな中でも紹介せずにはいられない記事を一つ。

アサリがあっさり死んだわけ


アサリをペットとして飼おうとしたものの、あっさりと死んでしまった経験をバネに、試行錯誤を重ねながら水槽の中で生きている日数を延ばしていく小学4年生による研究です。なぜ当初の飼育環境ではアサリは短命なのかという疑問に対し、その理由を仮定し、それらを一つ一つ検証しているのは見事としか言いようがありません。時折、アサリの殻の成分を分析したり、DNAを単離したりと、中には自分は民間で手に入るとは知らなかったキットを使う場面もありました。現地調査と文献の調査による、アサリの生態、環境、生理、地理的な要素を総合的に調査しているのは、他者の入れ知恵があったであろうことを考慮しても、よくまとめたなと感心します。

科学では、疑問に対し論理的に調査を進めることを重視します。一つ一つの事柄を地道につなげてゆくのが大切だと思います。「大発見にはそれに見合う規模の大冒険やエキサイティングな大実験が必要」と思われている節があるかと思いますが、必ずしもそうではありません。進化論で有名なダーウィンのキャリアでは何かとビーグル号での航海が注目されがちですが、彼が実際に色んな証拠を検証し、熟考を重ね進化論に至ったのは田舎で家族との奥まった暮らしの中でのことです。

科学の進歩は今なお続いています。そんな中、いままで通りやそれ以上に、大学院以上のレベルでの研究に力を入れるのは重要だと思いますが、次のステップはやはり一般の人々にも論理的な考え方というものが浸透されるのが大事だと思います。アメリカでは恐るべき割合の人々が、人類は恐竜と共存していたという与太話や、聖書の内容が史実だと信じており、なかには政策へ影響を与える立場にいる人もいます。「そんなこと、自分には関係ないよ」という人々は自分の子供が生物の授業にて、神は7日の内に地球を作ったなどの創造論を教えられる可能性について考えたことがあるのでしょうか。

技術の進歩による恩恵を受ける傍ら、それに至る過程や考え方を無視したり、論理的な意見であるにも関わらず自らの立場に都合の悪い意見を退けるのはズルいと思います。