atomes 1.3.1
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
cpmd_nose.c File Reference

Functions to prepare the thermostat(s) configuration widgets for QM / QM-MM input files. More...

#include "global.h"
#include "interface.h"
#include "glview.h"
#include "calc.h"
#include "cpmd.h"
#include "cp2k.h"
Include dependency graph for cpmd_nose.c:

Go to the source code of this file.

Functions

void print_the_section (int s, int p, GtkTextBuffer *buffer)
 print CPMD input section
ColRGBA init_color (int id, int numid)
 initialize color based id number over total number of elements
void proj_unselect_all_atoms ()
 unselect all atom(s) in the target project of the assistant
GtkWidget * cpmd_box (GtkWidget *box, gchar *lab, int v_space, int h_space, int dim)
 prepare a labelled box widget for the CPMD input creation assistant
dummy_atomget_active_dummy (int id)
 get dummy atom by id
void create_dummy_param_box (int dummy_id)
 crreate dummy atom parameter widgets
thermostatget_thermo ()
 get QM / QM-MM ions thermostat
int get_num_thermo ()
 get the number of thermostat(s)
gboolean are_all_atoms_thermostated ()
 are all atom(s) in the model thermostated ?
void set_going_forward ()
 QM / QM-MM assistant going forward on thermostat page.
void clean_nose_widgets ()
 clean thermostat widgets
thermostatget_active_thermostat (int id)
 get thermostat using id
G_MODULE_EXPORT void select_thermo (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select QM / QM-MM thermostat toggle callback
void thermo_set_color (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer color in the QM / QM-MM thermostat selection tree store
void thermo_set_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 show / hide cell renderer in the QM / QM-MM thermostat selection tree store
GtkWidget * create_nose_box (int n)
 create thermostat configuration widgets
G_MODULE_EXPORT void run_remove_nose_thermostat (GtkDialog *dialog, gint response_id, gpointer data)
 remove thermostat(s) - running the dialog
void remove_nose_thermostat (int num_to_remove)
 remove thermostat(s) - creating the dialog
thermostatinit_thermo (int id, int type, int sys)
 initialize new thermostat
void init_thermostats (int type, int elec)
 initialize thermostat(s)
void clean_thermostat (int new_type)
 free thermostat data, then initialiaze new type of thermostat
G_MODULE_EXPORT void update_thermo_parameter (GtkEntry *res, gpointer data)
 update thermostat parameter value entry callback
void nose_parameters (GtkWidget *vbox, int id, int jd, gchar **la, gchar **lb)
 create thermostat parameters configuration widgets
G_MODULE_EXPORT void cpmd_select_atom_id (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select CPMD atom id toggle callback
G_MODULE_EXPORT void cp2k_select_coord_id (GtkCellRendererToggle *cell_renderer, gchar *string_path, gpointer data)
 on select CP2K fixed id toggle callback
void atom_set_color (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 set renderer color in the CPMD atom selection tree store
void atom_set_visible (GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *mod, GtkTreeIter *iter, gpointer data)
 show / hide cell renderer in the CPMD atom selection tree store
int is_not_thermostated (int at, int therm)
 is atom thermostated ?
int is_fixed_atom (int at)
 is atom fixed ?
int in_dummy (int at, int id)
 is atom in dummy ?
gboolean was_it_selected (int id, int at)
 was this atom already selected ?
void fill_thermo_atom_model (int therm)
 fill thermostat atom model
G_MODULE_EXPORT void select_atoms_not_thermostated (GtkToggleButton *but, gpointer data)
 select atom to thermostat toggle callback GTK3
G_MODULE_EXPORT void run_select_atom_from_model (GtkDialog *dialog, gint response_id, gpointer data)
 select atom from model - running the dialgo
void select_atom_from_model (int therm)
 select atom from model - creating the dialog
G_MODULE_EXPORT void atom_selection_button (GtkButton *but, gpointer data)
 select atom(s) to be thermostated
void create_selection_button (GtkWidget *box, int num, int id, gpointer data)
 create thermostat atom(s) selection button
void create_nose_thermo_param_box (int therm_id)
 create thermostat configuration widgets
G_MODULE_EXPORT void changed_nose_thermo_id_box (GtkComboBox *box, gpointer data)
 change thermostat id
void create_selection_combo (int id, int num, int type, GCallback handler)
 create thermostat selection combo box
void add_thermostat (int extra)
 add thermostat(s)
G_MODULE_EXPORT void add_or_remove_thermostat (GtkSpinButton *res, gpointer data)
 add / remove thermostat
G_MODULE_EXPORT void changed_thermo_box_nose (GtkComboBox *box, gpointer data)
 change the type of the ionic thermostat
void prepare_therm_ions ()
 prepare ions thermostat widgets
void prepare_therm_elec ()
 prepare electrons thermostat widgets
G_MODULE_EXPORT void changed_thermo_box (GtkComboBox *box, gpointer data)
 change the thermostat family (ionic / fictitious electronic)
void thermo_type_box (GtkWidget *vbox, gchar *str, int id)
 prepare the thermostat option widgets
GtkWidget * thermo_box ()
 create the thermostat configuration widgets

Variables

gchar * c_thermo [2][CP2NTHERM][4]
gchar * u_thermo [2][CP2NTHERM][4]
gchar * ue_thermo [CP2NTHERM][4]
int v_thermo [2][CP2NTHERM] = {{1, 2, 2, 0, 0}, {0, 4, 1, 0, 4}}
double d_thermo [2][CP2NTHERM][4]
GtkWidget * sel_but [3]
GtkWidget * sel_img [3]
GtkWidget * electron_box
GtkWidget * therm_ions
GtkWidget * therm_elec
GtkWidget * therm_param_ions
GtkWidget * therm_param_elec
GtkWidget * nose_box
GtkWidget * combo_id [2]
GtkWidget * combo_id_box [2]
GtkWidget * nose_id_box [2]
GtkCellRenderer * thermo_renderer [6]
GtkTreeViewColumn * thermo_col [6]
int n_therm
int at_col
int * old_thermo
int ** old_fixed
int num_cpmd_objects
int the_therm
gboolean fixco
GtkTreeStore * add_model

Detailed Description

Functions to prepare the thermostat(s) configuration widgets for QM / QM-MM input files.

Author
Sébastien Le Roux sebas.nosp@m.tien.nosp@m..lero.nosp@m.ux@i.nosp@m.pcms..nosp@m.unis.nosp@m.tra.f.nosp@m.r

Definition in file cpmd_nose.c.

Function Documentation

◆ add_or_remove_thermostat()

G_MODULE_EXPORT void add_or_remove_thermostat ( GtkSpinButton * res,
gpointer data )

add / remove thermostat

Parameters
resthe GtkSpinButton sending the signal
datathe associated data pointer

Definition at line 1582 of file cpmd_nose.c.

◆ add_thermostat()

void add_thermostat ( int extra)

add thermostat(s)

Parameters
extrathe number of thermostat(s) to add

Definition at line 1549 of file cpmd_nose.c.

◆ are_all_atoms_thermostated()

gboolean are_all_atoms_thermostated ( )

are all atom(s) in the model thermostated ?

Definition at line 198 of file cpmd_nose.c.

◆ atom_selection_button()

G_MODULE_EXPORT void atom_selection_button ( GtkButton * but,
gpointer data )

select atom(s) to be thermostated

Parameters
butthe GtkButton sending the signal
datathe associated data pointer

Definition at line 1365 of file cpmd_nose.c.

◆ atom_set_color()

void atom_set_color ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

set renderer color in the CPMD atom selection tree store

Parameters
colthe target GtkTreeViewColumn
rendererthe target cell renderer
modthe target tree model
iterthe target tree iter
datathe associated data pointer

Definition at line 729 of file cpmd_nose.c.

◆ atom_set_visible()

void atom_set_visible ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

show / hide cell renderer in the CPMD atom selection tree store

Parameters
colthe target GtkTreeViewColumn
rendererthe target cell renderer
modthe target tree model
iterthe target tree iter
datathe associated data pointer

Definition at line 753 of file cpmd_nose.c.

◆ changed_nose_thermo_id_box()

G_MODULE_EXPORT void changed_nose_thermo_id_box ( GtkComboBox * box,
gpointer data )

change thermostat id

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 1489 of file cpmd_nose.c.

◆ changed_thermo_box()

G_MODULE_EXPORT void changed_thermo_box ( GtkComboBox * box,
gpointer data )

change the thermostat family (ionic / fictitious electronic)

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 1826 of file cpmd_nose.c.

◆ changed_thermo_box_nose()

G_MODULE_EXPORT void changed_thermo_box_nose ( GtkComboBox * box,
gpointer data )

change the type of the ionic thermostat

Parameters
boxthe GtkComboBox sending the signal
datathe associated data pointer

Definition at line 1741 of file cpmd_nose.c.

◆ clean_nose_widgets()

void clean_nose_widgets ( )

clean thermostat widgets

Definition at line 236 of file cpmd_nose.c.

◆ clean_thermostat()

void clean_thermostat ( int new_type)

free thermostat data, then initialiaze new type of thermostat

Parameters
new_typethe new type of thermostat

Definition at line 586 of file cpmd_nose.c.

◆ cp2k_select_coord_id()

G_MODULE_EXPORT void cp2k_select_coord_id ( GtkCellRendererToggle * cell_renderer,
gchar * string_path,
gpointer data )

on select CP2K fixed id toggle callback

Parameters
cell_rendererthe GtkCellRendererToggle sending the signal
string_paththe path in the tree store
datathe associated data pointer

Definition at line 699 of file cpmd_nose.c.

◆ cpmd_box()

GtkWidget * cpmd_box ( GtkWidget * box,
gchar * lab,
int v_space,
int h_space,
int dim )
extern

prepare a labelled box widget for the CPMD input creation assistant

Parameters
boxthe GtkWidget sending the signal
labthe label
v_spacevertical spacing
h_spacehorizontal spacing
dimlabel width

Definition at line 244 of file cpmd_init.c.

◆ cpmd_select_atom_id()

G_MODULE_EXPORT void cpmd_select_atom_id ( GtkCellRendererToggle * cell_renderer,
gchar * string_path,
gpointer data )

on select CPMD atom id toggle callback

Parameters
cell_rendererthe GtkCellRendererToggle sending the signal
string_paththe path in the tree store
datathe associated data pointer

Definition at line 660 of file cpmd_nose.c.

◆ create_dummy_param_box()

void create_dummy_param_box ( int dummy_id)
extern

crreate dummy atom parameter widgets

Parameters
dummy_iddummy atom id

Definition at line 144 of file cpmd_atoms.c.

◆ create_nose_box()

GtkWidget * create_nose_box ( int n)

create thermostat configuration widgets

Parameters
nthe thermostat system

Definition at line 1706 of file cpmd_nose.c.

◆ create_nose_thermo_param_box()

void create_nose_thermo_param_box ( int therm_id)

create thermostat configuration widgets

Parameters
therm_idthe thermostat id

Definition at line 1463 of file cpmd_nose.c.

◆ create_selection_button()

void create_selection_button ( GtkWidget * box,
int num,
int id,
gpointer data )

create thermostat atom(s) selection button

Parameters
boxthe GtkWidget sending the signal
numthe number of atom(s) already selected
id0 = ionic, 1 = fictitious electronic
datathe associated data pointer

Definition at line 1433 of file cpmd_nose.c.

◆ create_selection_combo()

void create_selection_combo ( int id,
int num,
int type,
GCallback handler )

create thermostat selection combo box

Parameters
id0 = ionic, 1 = fictitious electronic
numthe number of thermostat
typethe type of thermostat
handlerthe associated callback

Definition at line 1506 of file cpmd_nose.c.

◆ fill_thermo_atom_model()

void fill_thermo_atom_model ( int therm)

fill thermostat atom model

Parameters
thermthe thermostat id

Definition at line 902 of file cpmd_nose.c.

◆ get_active_dummy()

dummy_atom * get_active_dummy ( int id)
extern

get dummy atom by id

Parameters
idthe target dummy atom id

Definition at line 86 of file cpmd_atoms.c.

◆ get_active_thermostat()

thermostat * get_active_thermostat ( int id)

get thermostat using id

Parameters
idthe thermostat id

Definition at line 252 of file cpmd_nose.c.

◆ get_num_thermo()

int get_num_thermo ( )

get the number of thermostat(s)

Definition at line 181 of file cpmd_nose.c.

◆ get_thermo()

thermostat * get_thermo ( )

get QM / QM-MM ions thermostat

Definition at line 164 of file cpmd_nose.c.

◆ in_dummy()

int in_dummy ( int at,
int id )

is atom in dummy ?

Parameters
atthe atom id
idthe dummy list id

Definition at line 859 of file cpmd_nose.c.

◆ init_color()

ColRGBA init_color ( int id,
int numid )
extern

initialize color based id number over total number of elements

Parameters
idthe id number
numidthe total number of elements

Definition at line 81 of file initcoord.c.

◆ init_thermo()

thermostat * init_thermo ( int id,
int type,
int sys )

initialize new thermostat

Parameters
idthe new thermostat id
typethe type of thermostat
systhe thermostat system

Definition at line 532 of file cpmd_nose.c.

◆ init_thermostats()

void init_thermostats ( int type,
int elec )

initialize thermostat(s)

Parameters
typethe type of thermostat
elec1 = fictitious electronic thermostat

Definition at line 563 of file cpmd_nose.c.

◆ is_fixed_atom()

int is_fixed_atom ( int at)

is atom fixed ?

Parameters
atthe atom id

Definition at line 825 of file cpmd_nose.c.

◆ is_not_thermostated()

int is_not_thermostated ( int at,
int therm )

is atom thermostated ?

Parameters
atthe atom id
thermthe thermostat id

Definition at line 793 of file cpmd_nose.c.

◆ nose_parameters()

void nose_parameters ( GtkWidget * vbox,
int id,
int jd,
gchar ** la,
gchar ** lb )

create thermostat parameters configuration widgets

Parameters
vboxthe GtkWidget sending the signal
idthermostat id, -2 if fictitious electronic
jdnumber of parameter(s) for this thermostat
lathermostat parameter name(s)
lbthermostat parameter unit(s)

Definition at line 622 of file cpmd_nose.c.

◆ prepare_therm_elec()

void prepare_therm_elec ( )

prepare electrons thermostat widgets

Definition at line 1804 of file cpmd_nose.c.

◆ prepare_therm_ions()

void prepare_therm_ions ( )

prepare ions thermostat widgets

Definition at line 1764 of file cpmd_nose.c.

◆ print_the_section()

void print_the_section ( int s,
int p,
GtkTextBuffer * buffer )
extern

print CPMD input section

Parameters
sthe section id
p0 = section preview, 1 = complete input file
bufferthe GtkTextBuffer to print into

Definition at line 697 of file cpmd_print.c.

◆ proj_unselect_all_atoms()

void proj_unselect_all_atoms ( )
extern

unselect all atom(s) in the target project of the assistant

Definition at line 1049 of file cpmd_init.c.

◆ remove_nose_thermostat()

void remove_nose_thermostat ( int num_to_remove)

remove thermostat(s) - creating the dialog

Parameters
num_to_removethe number of thermostat(s) to remove

Definition at line 458 of file cpmd_nose.c.

◆ run_remove_nose_thermostat()

G_MODULE_EXPORT void run_remove_nose_thermostat ( GtkDialog * dialog,
gint response_id,
gpointer data )

remove thermostat(s) - running the dialog

Parameters
dialogthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 372 of file cpmd_nose.c.

◆ run_select_atom_from_model()

G_MODULE_EXPORT void run_select_atom_from_model ( GtkDialog * dialog,
gint response_id,
gpointer data )

select atom from model - running the dialgo

Parameters
dialogthe GtkDialog sending the signal
response_idthe response id
datathe associated data pointer

Definition at line 1035 of file cpmd_nose.c.

◆ select_atom_from_model()

void select_atom_from_model ( int therm)

select atom from model - creating the dialog

Parameters
thermthe thermostat id

Definition at line 1210 of file cpmd_nose.c.

◆ select_atoms_not_thermostated()

G_MODULE_EXPORT void select_atoms_not_thermostated ( GtkToggleButton * but,
gpointer data )

select atom to thermostat toggle callback GTK3

Parameters
butthe GtkToggleButton sending the signal
datathe associated data pointer

Definition at line 989 of file cpmd_nose.c.

◆ select_thermo()

G_MODULE_EXPORT void select_thermo ( GtkCellRendererToggle * cell_renderer,
gchar * string_path,
gpointer data )

on select QM / QM-MM thermostat toggle callback

Parameters
cell_rendererthe GtkCellRendererToggle sending the signal
string_paththe path in the tree store
datathe associated data pointer

Definition at line 279 of file cpmd_nose.c.

◆ set_going_forward()

void set_going_forward ( )

QM / QM-MM assistant going forward on thermostat page.

Definition at line 224 of file cpmd_nose.c.

◆ thermo_box()

GtkWidget * thermo_box ( )

create the thermostat configuration widgets

Definition at line 1891 of file cpmd_nose.c.

◆ thermo_set_color()

void thermo_set_color ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

set renderer color in the QM / QM-MM thermostat selection tree store

Parameters
colthe target GtkTreeViewColumn
rendererthe target cell renderer
modthe target tree model
iterthe target tree iter
datathe associated data pointer

Definition at line 316 of file cpmd_nose.c.

◆ thermo_set_visible()

void thermo_set_visible ( GtkTreeViewColumn * col,
GtkCellRenderer * renderer,
GtkTreeModel * mod,
GtkTreeIter * iter,
gpointer data )

show / hide cell renderer in the QM / QM-MM thermostat selection tree store

Parameters
colthe target GtkTreeViewColumn
rendererthe target cell renderer
modthe target tree model
iterthe target tree iter
datathe associated data pointer

Definition at line 336 of file cpmd_nose.c.

◆ thermo_type_box()

void thermo_type_box ( GtkWidget * vbox,
gchar * str,
int id )

prepare the thermostat option widgets

Parameters
vboxthe GtkWidget sending the signal
strthermostat information
idthe type of thermostat

Definition at line 1860 of file cpmd_nose.c.

◆ update_thermo_parameter()

G_MODULE_EXPORT void update_thermo_parameter ( GtkEntry * res,
gpointer data )

update thermostat parameter value entry callback

Parameters
resthe GtkEntry sending the signal
datathe associated data pointer

Definition at line 1654 of file cpmd_nose.c.

◆ was_it_selected()

gboolean was_it_selected ( int id,
int at )

was this atom already selected ?

Parameters
idthe selection type
atthe atom id

Definition at line 879 of file cpmd_nose.c.

Variable Documentation

◆ add_model

GtkTreeStore* add_model

Definition at line 157 of file cpmd_nose.c.

◆ at_col

int at_col

Definition at line 151 of file cpmd_nose.c.

◆ c_thermo

gchar* c_thermo[2][CP2NTHERM][4]
Initial value:
= {{{i18n("Initial temperature: "), " ", " ", " "},
{i18n("Target temperature: "),i18n("Tolerance: "), " ", " "},
{i18n("Target temperature: "), i18n("Target frequency: "), " ", " "},
{" ", " ", " ", " "},
{" ", " ", " ", " "}},
{{" ", " ", " ", " "},
{i18n("Time constant (Langevin): "), i18n("Time constant (Nosë-Hoover): "), i18n("Mass: "), "Chi: "},
{i18n("Time constant: "), " ", " ", " "},
{" ", " ", " ", " "},
{i18n("Length: "), i18n("Multiple time steps: "), i18n("Time constant: "), i18n("Yoshida integrator: ")}}}
#define i18n(String)
Definition global.c:80

Definition at line 98 of file cpmd_nose.c.

◆ combo_id

GtkWidget* combo_id[2]

Definition at line 145 of file cpmd_nose.c.

◆ combo_id_box

GtkWidget* combo_id_box[2]

Definition at line 146 of file cpmd_nose.c.

◆ d_thermo

double d_thermo[2][CP2NTHERM][4]
Initial value:
= {{{ 300.0, 0.0, 0.0, 0.0},
{ 300.0, 20.0, 0.0, 0.0},
{ 300.0, 200.0, 0.0, 0.0},
{ 0.0, 0.0, 0.0, 0.0},
{ 0.0, 0.0, 0.0, 0.0}},
{{ 0.0, 0.0, 0.0, 0.0},
{ 100.0, 100.0, 1.0, 1.0},
{ 100.0, 0.0, 0.0, 0.0},
{ 0.0, 0.0, 0.0, 0.0},
{ 3.0, 2.0, 1000.0, 3.0}}}

Definition at line 127 of file cpmd_nose.c.

◆ electron_box

GtkWidget* electron_box

Definition at line 139 of file cpmd_nose.c.

◆ fixco

gboolean fixco

Definition at line 156 of file cpmd_nose.c.

◆ n_therm

int n_therm

Definition at line 150 of file cpmd_nose.c.

◆ nose_box

GtkWidget* nose_box

Definition at line 144 of file cpmd_nose.c.

◆ nose_id_box

GtkWidget* nose_id_box[2]

Definition at line 147 of file cpmd_nose.c.

◆ num_cpmd_objects

int num_cpmd_objects

Definition at line 154 of file cpmd_nose.c.

◆ old_fixed

int** old_fixed

Definition at line 153 of file cpmd_nose.c.

◆ old_thermo

int* old_thermo

Definition at line 152 of file cpmd_nose.c.

◆ sel_but

GtkWidget* sel_but[3]

Definition at line 137 of file cpmd_nose.c.

◆ sel_img

GtkWidget* sel_img[3]

Definition at line 138 of file cpmd_nose.c.

◆ the_therm

int the_therm

Definition at line 155 of file cpmd_nose.c.

◆ therm_elec

GtkWidget* therm_elec

Definition at line 141 of file cpmd_nose.c.

◆ therm_ions

GtkWidget* therm_ions

Definition at line 140 of file cpmd_nose.c.

◆ therm_param_elec

GtkWidget* therm_param_elec

Definition at line 143 of file cpmd_nose.c.

◆ therm_param_ions

GtkWidget* therm_param_ions

Definition at line 142 of file cpmd_nose.c.

◆ thermo_col

GtkTreeViewColumn* thermo_col[6]

Definition at line 149 of file cpmd_nose.c.

◆ thermo_renderer

GtkCellRenderer* thermo_renderer[6]

Definition at line 148 of file cpmd_nose.c.

◆ u_thermo

gchar* u_thermo[2][CP2NTHERM][4]
Initial value:
= {{{" K", " ", " ", " "},
{" K", " K", " ", " "},
{" K", " cm<sup>-1</sup>", " ", " "},
{" ", " ", " ", " "},
{" ", " ", " ", " "}},
{{" ", " ", " ", " "},
{" fs", " fs", " fs<sup>-1</sup>", " fs<sup>-1</sup>"},
{" fs", " ", " ", " "},
{" ", " ", " ", " "},
{" ", " ", " fs", " "}}}

Definition at line 109 of file cpmd_nose.c.

◆ ue_thermo

gchar* ue_thermo[CP2NTHERM][4]
Initial value:
= {{" a.u.", " ", " ", " "},
{" a.u.", " ", " ", " "},
{" a.u.", " a.u.", " ", " "},
{" a.u.", " cm<sup>-1</sup>", " ", " "}}

Definition at line 120 of file cpmd_nose.c.

◆ v_thermo

int v_thermo[2][CP2NTHERM] = {{1, 2, 2, 0, 0}, {0, 4, 1, 0, 4}}

Definition at line 125 of file cpmd_nose.c.