Hi Ximing. Unfortunately, that doesn't do the same thing at all. e2classifykmeans will not do any alignment of the particles it will just directly measure the symmetry of the unaligned particles and split them into two classes. In most situations this isn't what you want to do at all. Extracting the particles associated with the classes from the original process is the correct thing to do, and it is actually quite straightforward to accomplish, once you understand how the file/folder conventions work in EMAN2.
The trick is that in standard EMAN2.1 processing, you do not give an HDF stack directly to e2refine2d or e2refine_easy. You normally create a 'set' (a .lst file) and then use that as input to these programs (standards and reasoning are explained here:
http://blake.bcm.edu/emanwiki/EMAN2/DirectoryStructure). The main reason for this is to avoid making many copies of the particle data, which uses a lot of disk space. Instead, you create .lst files which are just text files representing subsets of particles from other files.
In any case, you CAN give an HDF file directly to these programs, and the output will still be fine. However, if you want to extract subsets of particles, you need to provide a .lst file representing the particles in the .hdf file. For example:
e2refine2d.py --input particles.hdf ... other options
produces, for example, r2d_01/
Let's say you want to extract the particles associated with classes 1,3 and 8 from r2d_01/classes_05.hdf
e2proclst.py particles.hdf --create particles.lst
echo "1,3,8" > goodclasses.txt
e2classextract.py --input_set particles.lst --classlist goodclasses.txt --setname output.lst r2d_01/classes_05.hdf
This will produce a file called 'output.lst' containing the particles in classes 1,3, and 8. ".lst" files can be treated as if they were image stacks for input in all EMAN2.1 programs. They do not contain actual images, but just pointers to existing images in other files.