Send attachment using mutt

Update [7/27/2011]: It doesn't work well with file containing texts (i.e. .cpp files). When I send a code or a data file, the file I received in the Attachment folder has texts all messed up.

I'm trying to use gnuplot to generate plots when I'm working on the cluster.  While both my laptop and PC at the office are Window OS, the most common way is to use file transfer software such as WinSCP. Although WinSCP is pretty handy to use, it is sometimes a pain in the ass to progress through many sub folders and then download it to the correct place on the Windows machine.

Most of the times the plot downloaded goes directly onto a powerpoint slide where I share my progress with my advisor through dropbox.  So I came up with this idea: Send the image as attachment to dropbox! This requires you to have a dropbox account and a email software installed on the remote linux machine.

I use mutt to send the attachment to my dropbox folder.  Dropbox has this function called: Send to dropbox. You'll be able to create an email address that will link to a folder called "Attachment".  Once you set up this "send to dropbox", the Attachment folder will be created. Below is a short script to send a file to my dropbox:

This script takes one argument: The path to the file you want to transfer to your dropbox ($1). It usually takes about 30 seconds until dropbox receives the file.  The time for using WinSCP and using this script are pretty much the same.  I'm happy about this script simply because it allows me not to move my hand over to the mouse.  After all, I'm more a key-board person.

Create/Remove shortcuts in Linux

To access a sub-sub-sub-sub-..... folder every time you log on to do your work might be a pain in the ass.  Although combining the first letter of consecutive folder names and 'tab' can make it faster.  If you are accessing the specific folder frequently, there is a way to save the hustle: Symbolic links. Symbolic links are similar to the shortcuts on Windows OS. It creates a link pointing to a file or a folder.

To create a symbolic link:
   ln -s [file/folder to link] [path of the link]
For example, to create a shortcut at my home directory that points to a folder ~/group/kxl281/Lammps/PEO/LJC/10/prog/dielectric_const/, use the syntax:
   ln -s ~/group/kxl281/Lammps/PEO/LJC/10/prog/dielectric_const/ ~/

The ~/ stands for the home directory. Now, I don't have to navigate to the original path to work on the dielectric_const folder. I could simply access it through the link.
The symbolic link also works for files. You could make a shortcut to access the file without making a duplicate.

To remove a symbolic link:
   rm [filename]


Note that if the symbolic link points to a folder, there shouldn't be a '/' at the end of the file name. For example, if I want to remove the shortcut I created above pointing to the dielectric_const folder:
   rm dielectric_const
without the slash (/).

Electrolytes in Lithium ion batteries

Lithium ion battery have been widely used in electronic gadgets due to its high energy/power density. Current electrolytes for Li-ion batteries are mostly organic solvents. Although they are good conducting medium for Li ion, the organic solvents are toxic and volatile. Besides, those liquid electrolytes require hard casing and separator to ensure good contacts among battery elements, therefore the flexibility of the battery as well as the gadget is limited. The problem aforementioned can be solved if a non-toxic polymer electrolyte is used.

PEO-salt electrolytes have two drawbacks: 1) ionic conductivity is small, and 2) concentration polarization in PEO degrades cell performance after several charge/discharge cycle. It reduces the capacity of the battery by creating depletion regions near electrodes. Many studies focused on improving the conductivity of polymer electrolytes. Using larger anions to decrease the attraction between anion and cation, therefore resulting in higher ratio of solvated Li ion in PEO. Another highly focused research area is to dope ceramic fillers to provide extra Lithium hopping sites.

Our research collaboration focuses on the second drawback. The material in which only cations conduct is called a single-ion conductor. In single-ion conductors, anions are covalently bound to the polymer backbone, therefore the transference number is unity. By reducing anion mobility, single ion conductors prevent concentration polarization and improve the lifetime of batteries. The single-ion conductor is a type of ionomer. In contrast to most ionomers, an ionomer with PEO as the non-ionic part can solvate the cations. The conductivity for PEO-based ionomer is nevertheless less promising, and people haven't paid much attention on this material.
Our collaboration aim to understand the morphology, structure and dynamics of PEO-based Li, Na, and Cs samples. By systematically varying the PEO spacer length and ion type, logistic analyses could be made.

Courtesy of Kokonad Sinha
                 Animation depicts Lithium ion hopping via PEO segmental motion

Molecular dynamics simulation

MD (molecular dynamics) simulation is a computational technique that describes the movement of atoms based on their interactions.The interactions among atoms can be described by empirical potentials (force field) or quantum chemical models, or a mix of the two. The most commonly seen MD in polymer or bio- physics uses force fields, and follows classical mechanics: solving Newton's equations of motion numerically to get the atom trajectory. By tracking where the atoms have been, structural and dynamical information can be extracted.

This type of classical MD has force field describing both intra- and inter-molecular interactions. Usually the force field refers to a set of empirical equations to describe the most essential part of the interaction. For example, the bonding between two atoms are often described in harmonic potential:

Bonding potential = K ( x - x0

Depending on the complexity of the potentials, MD simulation could achieve different levels of realism. The force fields that use harmonic equation for bonding is capable of agreeing to some extent the structural and dynamical information, but incapable of describing any chemical reactions. Ab initio based MD simulation could provide very accurate electron distribution and bond breaking/forming, but the trade of is that the large amount of computational time required.

It is important to know what properties one's interested in finding out using MD simulation, and choose the force field accordingly. There is always a compromise between accuracy and time/length scales of MD simulation.


Read more about MD: MD simulation on wikipedia

About Me

Hi, my name is Kan-Ju Lin. I am currectly a Ph.D candidate in Chemical Engineering department at Penn State. My advisor, Dr Janna Maranas, leads our group investigating molecular mobility in soft materials. While our group does both experimental and computaional stuides, my research is mainly computational, with insights provided from experimentalists.

My research focuses on ion motion and transport mechanism in solid state polymer electrlytes (SPEs), especially for battery application. I use molecular dynamics simulation to investigate polymer-cation correlation at molecular level. By collaborating with research groups from Penn State and UPenn, we conduct our investigations via various approaches: X-ray scattering, dielectric spectroscopy, NMR, FTIR, ab initio, quasi-elastic neutron scattering (QENS), and MD simulation. These techniques provide information a wide range of length scales and time scales, and also reveal phenomena from different perspectives. Connecting results among different techniques, and come up with comprehensive pictures on these materials are the main challenges/fun of my research.

While most studies on SPEs are devoted to PEO/salt systems, our research collaboration focuses on PEO-based ionomers. The major advantage of ionomers over PEO/salt is to prevent electrolyte concentration polarization, and consequently improves the lifetime of the batteries. For more about ionomers, please see the ionomer session.

To learn more about me and my research, check out the links above. If you would like to discuss the techniques I use and my research, or any comment, feel free to contact me at kxl281[at]psu.edu.

Resume

Education

Sep. 2007~ Present The Pennsylvania State University, University Park, PA 16801
- Doctoral candidate in Chemical Engineering
Sep. 2002~ July 2006 National Tsing Hua University, Hsin-Chu 30013, Taiwan
- Bachelor of Science in Chemical Engineering

Research/working experience

Jan. 2008~ Present Graduate Research Assistant - Penn State
Jan. 2011~ May 2011
Sep. 2009~ Dec. 2009
Graduate Teaching Assistant - Penn State
Summer 2009,2010,2011 Graduate Mentor - Penn State
Sep. 2006~ Mar. 2007 Research Assistant (Computer-Aided Engineering Lab)
-National Tsing Hua Univeristy, Hsin-Chu, Taiwan
Mar. 2006~ July 2006 Research Intern (Energy & Resource Lab)
-Industrial Technology Research Insititute, Hsin-Chu, Taiwan

I have four years of experience working with Linux and programming. I developed my own codes in C++ to analyze the simulation trajectories. The simulations are carried out on Penn State high performance computing systems using LAMMPS. All the communications between me and the clusters are via Linux systems.

To know more about me, please download the complete resume.