visual approach to construction of QMMM input

Peter pmam... at
Tue Apr 21 14:39:56 UTC 2009

Dear CP2K users,

Recently I've written a simple script, which could be helpful to those
of us, who deals with large QMMM systems.
The script is intended to be used from PyMol (
molecular visualization system and allows one to generate &QM_KIND,
&LINK and &CELL parts of CP2K input easily. Given a molecular object
name and QM part selection name (which can be defined using either
approach available in PyMol) it generates output file with
corresponding input groups.
To use the script:
  1. Download it (
  2. Start PyMol and issue the following command from it's shell:
     >  run /path/to/
  3. Use it:
    > gen_cp2k_qmmm filename, qm_part_selection_name,
The output will be saved to file "filename".
N.B.: The file will be overwritten!

Another PyMol script which you may find handy is a multiframe XYZ file
(trajectory) loader (
"Installation procedure" is pretty the same.
 > load_xyz_traj, target_object [, stride]

N.B.: By default PyMol reorders atoms on molecule load. This PyMol
behavior may prevent correct loading of XYZ trajectories. To
workaround this issue add the following lines to ~/.pymolrc file
(create it if needed):
set retain_order, 1
set pdb_retain_ids, 1

Hopefully these simple scripts will help people familiar with PyMol in
doing biostuff with CP2K.

Best regards,

More information about the CP2K-user mailing list