Merge release-4-5-patches into release-4-6
[alexxy/gromacs.git] / src / gmxlib / selection / selmethod.c
index 8a16536d2540997047e052dfb7865f1b26de47ab..457238745554b65f0f594b0c880c2dcb2cc440e8 100644 (file)
@@ -76,6 +76,7 @@ extern gmx_ana_selmethod_t sm_resnr;
 extern gmx_ana_selmethod_t sm_resindex;
 extern gmx_ana_selmethod_t sm_molindex;
 extern gmx_ana_selmethod_t sm_atomname;
+extern gmx_ana_selmethod_t sm_pdbatomname;
 extern gmx_ana_selmethod_t sm_atomtype;
 extern gmx_ana_selmethod_t sm_resname;
 extern gmx_ana_selmethod_t sm_insertcode;
@@ -134,7 +135,11 @@ static const t_register_method smtable_def[] = {
     {"mol",        &sm_molindex},
     {"molecule",   &sm_molindex},
     {NULL,         &sm_atomname},
+    {"name",       &sm_atomname},
+    {NULL,         &sm_pdbatomname},
+    {"pdbname",    &sm_pdbatomname},
     {NULL,         &sm_atomtype},
+    {"type",       &sm_atomtype},
     {NULL,         &sm_resname},
     {NULL,         &sm_insertcode},
     {NULL,         &sm_chain},
@@ -435,6 +440,12 @@ check_callbacks(FILE *fp, gmx_ana_selmethod_t *method)
         report_error(fp, method->name, "error: outinit should be provided because the method has POS_VALUE");
         bOk = FALSE;
     }
+    /* Check presence of outinit for variable output count methods */
+    if ((method->flags & SMETH_VARNUMVAL) && !method->outinit)
+    {
+        report_error(fp, method->name, "error: outinit should be provided because the method has SMETH_VARNUMVAL");
+        bOk = FALSE;
+    }
     /* Warn of dynamic callbacks in static methods */
     if (!(method->flags & SMETH_MODIFIER))
     {