{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cb9d00f5-9613-471e-a4bb-6181311bf73b",
   "metadata": {},
   "source": [
    "# Using the API functionality of binarycpython\n",
    "This notebook shows how to use the API functions that interface with binary_c. It usually is better to use wrapper functions that internally use these API functions, because most of the output here is very raw\n",
    "\n",
    "Binarycpython uses the Python-C extension framework to interface Python with C. The sourcecode for this is contained in `src/binary_c_python.c`, and the functions are available via `from binarycpython import _binary_c_bindings`.\n",
    "\n",
    "The following functions are available through the API: (run cell below)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ded7eaf6-e1ba-46c2-9f6f-9ebcb14a264d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on module binarycpython._binary_c_bindings in binarycpython:\n",
      "\n",
      "NAME\n",
      "    binarycpython._binary_c_bindings - Module to interface the Binary_c API with python.\n",
      "\n",
      "FUNCTIONS\n",
      "    free_persistent_data_memaddr_and_return_json_output(...)\n",
      "        Frees the persistent_data memory and returns the json output\n",
      "    \n",
      "    free_store_memaddr(...)\n",
      "        Frees the store memaddr\n",
      "    \n",
      "    return_arglines(...)\n",
      "        Return the default args for a binary_c system\n",
      "    \n",
      "    return_help(...)\n",
      "        Return the help info for a given parameter\n",
      "    \n",
      "    return_help_all(...)\n",
      "        Return an overview of all the parameters, their description, categorized in sections\n",
      "    \n",
      "    return_maximum_mass_ratio_for_RLOF(...)\n",
      "        Returns a string containing the maximum mass ratio for which a binary system does not RLOF at zams. Optionally accepts a store_capsule. Please use the wrapper functions in utils for this except when you know what you're doing\n",
      "    \n",
      "    return_minimum_orbit_for_RLOF(...)\n",
      "        Returns a string containing the minimum orbit and separation for which a binary system does not RLOF at zams. Please use the wrapper functions in utils for this except when you know what you're doing\n",
      "    \n",
      "    return_persistent_data_memaddr(...)\n",
      "        Return the store memory adress that will be passed to run_population\n",
      "    \n",
      "    return_store_memaddr(...)\n",
      "        Return the store memory adress that will be passed to run_population\n",
      "    \n",
      "    return_version_info(...)\n",
      "        Return the version information of the used binary_c build\n",
      "    \n",
      "    run_system(...)\n",
      "        Function to run a system. This is a general function that will be able to handle different kinds of situations: single system run with different settings, population run with different settings, etc. To avoid having too many functions doing slightly different things. \n",
      "        \n",
      "        Arguments:\n",
      "                argstring: argument string for binary_c\n",
      "                (opt) custom_logging_func_memaddr: memory address value for custom logging function. Default = -1 (None)\n",
      "                (opt) store_memaddr: memory adress of the store. Default = -1 (None)\n",
      "                (opt) write_logfile: Boolean (in int form) for whether to enable the writing of the log function. Default = 0\n",
      "                (opt) population: Boolean (in int form) for whether this system is part of a population run. Default = 0.\n",
      "    \n",
      "    test_func(...)\n",
      "        Function that contains random snippets. Do not expect this to remain available, or reliable. i.e. dont use it.\n",
      "\n",
      "FILE\n",
      "    /home/david/.pyenv/versions/3.6.4/envs/dev-binarycpython3.6.4/lib/python3.6/site-packages/binarycpython/_binary_c_bindings.cpython-36m-x86_64-linux-gnu.so\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "from binarycpython import _binary_c_bindings\n",
    "help(_binary_c_bindings)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7ddede71-ffaa-4b24-aece-e94128a60d7f",
   "metadata": {},
   "source": [
    "There are three main categories of functions:\n",
    "\n",
    "- Functions to get information from binary_c: these can be used to evolve systems, and get utility information from binary_c.\n",
    "    - run_system\n",
    "    - return_minimum_orbit_for_RLOF\n",
    "    - return_maximum_mass_ratio_for_RLOF\n",
    "    - return_help\n",
    "    - return_help_all\n",
    "    - return_arglines\n",
    "\n",
    "- Memory creation functions: these can be used to have binary_c allocate memory which is used or written to by binary_c\n",
    "    - return_persistent_data_memaddr\n",
    "    - return_store_memaddr\n",
    "\n",
    "- Memory freeing functions: These can be used to free the allocated memory, and in the case of persistent memory it will also return the contents of the ensemble\n",
    "    - free_persistent_data_memaddr_and_return_json_output\n",
    "    - free_store_memaddr"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0dd3e115-1571-42f7-9ab9-cf7688fa28c1",
   "metadata": {},
   "source": [
    "## Example usage:"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c5015daa-35ab-4736-a04d-f3cbe661638c",
   "metadata": {},
   "source": [
    "### Setting up, using and freeing store"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "10a74d5a-a3d5-4543-a5bc-20d1fe885bb4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<capsule object \"STORE\" at 0x7f163859d0c0>\n",
      "SINGLE_STAR_LIFETIME 10 27.7358\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# allocating store memory\n",
    "store_memaddr = _binary_c_bindings.return_store_memaddr()\n",
    "print(store_memaddr)\n",
    "\n",
    "# Here we set up the argument string that is passed to the bindings\n",
    "argstring = \"\"\"\n",
    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
    "\"\"\".format(\n",
    "    M_1=10,\n",
    "    orbital_period=4500,\n",
    "    eccentricity=0.0,\n",
    "    metallicity=0.02,\n",
    "    max_evolution_time=15000,\n",
    ").strip()\n",
    "\n",
    "#\n",
    "output = _binary_c_bindings.run_system(argstring, store_memaddr=store_memaddr)\n",
    "print(output)\n",
    "\n",
    "# Freeing store\n",
    "_binary_c_bindings.free_store_memaddr(store_memaddr)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e9da5fc6-e680-483c-982e-4819767ed5b2",
   "metadata": {},
   "source": [
    "### Getting information from binary_c"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "24f7ffe5-0076-459d-a37f-254e10d0d9f9",
   "metadata": {},
   "source": [
    "We can get information for a parameter via return_help(parameter_name):\n",
    "This will return an unparsed output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "318874f6-7acf-49bb-9786-299d4dffc0b3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "binary_c help for variable : M_1 <Float>\n",
      "\n",
      "The initial mass of star one (in solar units, internally this is star index 0).\n",
      "\n",
      "Default : 0\n",
      "\n",
      "\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(_binary_c_bindings.return_help('M_1'))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f7fafce6-a522-43ac-a0c2-15a3db393b49",
   "metadata": {},
   "source": [
    "We can get information on all available parameters via return_help(parameter_name):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "d7e757ae-579c-42a2-a310-f0401b7800e8",
   "metadata": {
    "scrolled": true,
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "############################################################\n",
      "##### Section Stars\n",
      "############################################################\n",
      "metallicity : This sets the metallicity of the stars, i.e. the amount (by mass) of matter which is not hydrogen or helium. If you are using the BSE algorithm, this must be 1e-4 <= metallicity <= 0.03. See also nucsyn_metallicity and effective_metallicity. : (null)\n",
      "effective_metallicity : This sets effective metallicity of stars as used in routines like the Schneider wind loss. If not set, or set to DEFAULT_TO_METALLICITY (==-1, the default), this is just the same as metallicity. The main difference between effective_metallicity and metallicity is the range of validity: 0 <= effective_metallicity <= 1, while metallicity's range of validity is limited by the stellar evolution algorithm (so, for BSE, is 1e-4 <= metallicity <= 0.03). : (null)\n",
      "M_1 : The initial mass of star one (in solar units, internally this is star index 0). : (null)\n",
      "M_2 : The initial mass of star two (in solar units, internally this is star index 1). : (null)\n",
      "M_3 : The initial mass of star three (in solar units, internally this is star index 2). : (null)\n",
      "M_4 : The initial mass of star four (in solar units, internally this is star index 3). : (null)\n",
      "vrot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot2,3,4. : (null)\n",
      "vrot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,3,4. : (null)\n",
      "vrot3 : The initial equatorial rotational velocity of star three (in km/s, internally this is star index 2). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,4. : (null)\n",
      "vrot4 : The initial equatorial rotational velocity of star four (in km/s, internally this is star index 3). If 0.0, the Hurley et al 2000/2002 prescription is used to set the main-sequence velocity, so for a truly non-rotating star, set to something small (e.g. 0.001). See also vrot1,2,3. : (null)\n",
      "Prot1 : The initial equatorial rotational velocity of star one (in km/s, internally this is star index 0). See also Prot2,3,4. : (null)\n",
      "Prot2 : The initial equatorial rotational velocity of star two (in km/s, internally this is star index 1). See also Prot1,3,4. : (null)\n",
      "Prot3 : The initial equatorial rotational period of star three (in days, internally this is star index 2). See also Prot1,2,4. : (null)\n",
      "Prot4 : The initial equatorial rotational period of star four (in days, internally this is star index 3). See also Prot1,2,3. : (null)\n",
      "inclination1 : The initial inclination of star one (in degrees). : (null)\n",
      "inclination2 : The initial inclination of star two (in degrees). : (null)\n",
      "inclination3 : The initial inclination of star three (in degrees). : (null)\n",
      "inclination4 : The initial inclination of star four (in degrees). : (null)\n",
      "B_1 : The initial magnetic field of star one (in Gauss, internally this is star index 0). : (null)\n",
      "B_2 : The initial magnetic field of star two (in Gauss, internally this is star index 1). : (null)\n",
      "B_3 : The initial magnetic field of star three (in Gauss, internally this is star index 2). : (null)\n",
      "B_4 : The initial magnetic field of star four (in Gauss, internally this is star index 3). : (null)\n",
      "B_inclination1 : The initial inclination of the magnetic field of star one (in degrees). : (null)\n",
      "B_inclination2 : The initial inclination of the magnetic field of star two (in degrees). : (null)\n",
      "B_inclination3 : The initial inclination of the magnetic field of star three (in degrees). : (null)\n",
      "B_inclination4 : The initial inclination of the magnetic field of star four (in degrees). : (null)\n",
      "stellar_type_1 : Set the stellar type of star 1 (internal index 0), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
      "stellar_type_2 : Set the stellar type of star 2 (internal index 1), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
      "stellar_type_3 : Set the stellar type of star 3 (internal index 2), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
      "stellar_type_4 : Set the stellar type of star 4 (internal index 3), usually MAIN_SEQUENCE (main sequence). Note that setting the stellar type only works for stars with both age=0 and core_mass=0, i.e. main sequence (hydrogen or helium), white dwarfs, black holes and neutrn stars. : (null)\n",
      "max_stellar_type_1 : The maximum stellar type of star 1 (internal index 0). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value. \n",
      " : (null)\n",
      "max_stellar_type_2 : The maximum stellar type of star 2 (internal index 1). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
      " : (null)\n",
      "max_stellar_type_3 : The maximum stellar type of star 3 (internal index 2). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
      " : (null)\n",
      "max_stellar_type_4 : The maximum stellar type of star 4 (internal index 3). Evolution is stopped when the star reaches this stellar type. If this is negative, massless remnants are allowed, and the maximum stellar type is the absolute value.\n",
      " : (null)\n",
      "probability : The probability is a weighting applied to the star based on, say, the initial mass function. When running a grid of stars to simulate *all* stars, the summed probability of all the stars should be 1.0. : (null)\n",
      "phasevol : The system's phase volume, used by binary_grid. : (null)\n",
      "stellar_structure_algorithm : Set the stellar structure algorithm. 0=modified BSE (default), 1=none, 2=external function (must be defined by the calling code), 3=binary_c (not yet implemented). : (null)\n",
      "solver : The type of solver. Default is the Forward-Euler (0), but could be RK2 (1), RK4 (2) or a predictor-corretor (3). : (null)\n",
      "max_evolution_time : Set the maximum age for the stars (Myr). : (null)\n",
      "max_model_number : Set the maximum number of models, ignored if 0 (default is 0). : (null)\n",
      "monte_carlo_kicks : Turn on Monte-Carlo SN kicks. On (True) by default, and indeed other algorithms are probably broken. : (null)\n",
      "disable_debug : Disables debug output. Only has an effect when DEBUG is 1, which probably requires a rebuild. Default FALSE. : (null)\n",
      "timestep_logging : Turn on timestep logging (default is False). : (null)\n",
      "rejects_in_log : Show timestep rejections in the main log (default is False). : (null)\n",
      "vandenHeuvel_logging : Turn on van den Heuvel logging (default is False). : (null)\n",
      "evolution_splitting : If True, turn on splitting of an evolutionary run if splitpoint (e.g. supernova) occurs. : (null)\n",
      "disable_events : Whether to disable the new events code (defaults to False, so we use events by default)\n",
      " : (null)\n",
      "evolution_splitting_sn_eccentricity_threshold : Threshold eccentricity above which evolution splitting happens in a system with no SN kick. (0.01) : (null)\n",
      "evolution_splitting_sn_n : Number of runs to split into when a SN occurs. : (null)\n",
      "evolution_splitting_maxdepth : Max number of splits in an evolutionary run. : (null)\n",
      "equation_of_state_algorithm : Set the equation of state algorithm. 0 = Paczynski. : (null)\n",
      "opacity_algorithm : Set the opacity algorithm. 0 = Paczynski, 1 = Ferguson/Opal. : (null)\n",
      "wind_mass_loss : Defines the algorithm used for stellar winds. 0 = none, 1 = Hurley et al. (2002), 2 = Schneider (2018). : 0\n",
      "gbwind : Wind prescription for first red giant branch stars.  0=Reimers (Hurley et al 2000/2002; choose gb_reimers_eta=0.5 for their mass loss rate), 1=Schroeder+Cuntz 2005 (set gb_reimers_eta=1.0 for their mass loss rate). : (null)\n",
      "mattsson_Orich_tpagbwind : Experimental : turns on Mattsson's TPAGB wind when the star is oxygen rich. Requires MATTSSON_MASS_LOSS. : (null)\n",
      "magnetic_braking_factor : Multiplier for the magnetic braking angular momentum loss rate. : (null)\n",
      "magnetic_braking_gamma : gamma factor in Rappaport style magnetic braking expression. : (null)\n",
      "magnetic_braking_algorithm : Algorithm for the magnetic braking angular momentum loss rate. 0 = Hurley et al. 2002, 1 = Andronov, Pinnsonneault and Sills 2003, 2 = Barnes and Kim 2010  : (null)\n",
      "helium_flash_mass_loss : Mass to be lost at the helium flash. : (null)\n",
      "gb_reimers_eta : First red giant branch wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) : (null)\n",
      "gbwindfac : Multiplier for the giant branch wind mass loss rate : (null)\n",
      "tpagbwindfac : Multiplier for the TPAGB wind mass loss rate : (null)\n",
      "eagbwindfac : Multiplier for the EAGB wind mass loss rate : (null)\n",
      "nieuwenhuijzen_windfac : Multiplier for the Nieuwenhuijzen & de Jager wind mass loss rate : (null)\n",
      "tpagbwind : Wind prescription during the TPAGB. 0=Karakas 2002 (a modified Vassiliadis and Wood 1993), 1=Hurley et al 2000/2002 (Vassiliadis and Wood 1993), 2=Reimers, 3=Bloecker, 4=Van Loon,  5=Rob's C-wind (broken?), 6,7=Vassiliadis and Wood 1993 (Karakas,Hurley variants respectively) when C/O>1, 8=Mattsson, 9 = Goldman et al. (2017), 10 = Beasor et al. (2020). : (null)\n",
      "eagbwind : Wind prescription during the EAGB. 0=BSE (Hurley+2002, based on VW93), 1 = Goldman et al. (2017), 2 = Beasor et al. (2020). : (null)\n",
      "wind_gas_to_dust_ratio : Gas to dust ratio used in wind calculations (e.g. Goldman et al. 2017). Typically 200 (Milky Way)-500 (Magellanic Clouds). Default is 200, approximately as in MW stars. : (null)\n",
      "vwind_multiplier : Multiplier for the stellar wind velocity. : (null)\n",
      "vwind_beta : Beta for stellar wind speed calculations, where vwind=sqrt(beta) * escape velocity. Default 0.125 (from BSE, Hurley et al. 2002).  : (null)\n",
      "superwind_mira_switchon : In the Vassiliadis and Wood (1993) AGB wind prescription, the superwind is turned on at a given Mira period, usually 500 days. You can vary when this switch-on happens with this parameter. : (null)\n",
      "vw93_mira_shift : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate depends on the Mira period plus this offset. Requires VW93_MIRA_SHIFT. : (null)\n",
      "vw93_multiplier : In the Vassiliadis and Wood (1993) AGB wind prescription, the wind loss rate is multiplied by this factor. Requires VW93_MULTIPLIER. : (null)\n",
      "tpagb_reimers_eta : TPAGB Reimers wind multiplication factor, cf. eta in Reimers' mass loss formula. (This multiplies the 4e-13 in Reimers' formula, or the 8e-14 in Schroeder and Cuntz.) Note that Reimers is not the default TPAGB wind prescription. See also tpagbwind. : (null)\n",
      "artificial_mass_accretion_rate%d : Constant mass accretion rate for star <n>. : (null)\n",
      "artificial_angular_momentum_accretion_rate%d : Constant angular momentum accretion for star <n>. : (null)\n",
      "artificial_orbital_angular_momentum_accretion_rate : Constant angular momentum accretion rate on the orbit. : (null)\n",
      "artificial_accretion_start_time : Time at which artificial accretion stars. Ignored if <0 (default is -1). : (null)\n",
      "artificial_accretion_end_time : Time at which artificial accretion ends. Ignored if <0 (default is -1). : (null)\n",
      "wr_wind : Massive-star (WR) wind prescription. 0 = Hurley et al 2000/2002, 1=Maeder and Meynet, 2=Nugis and Lamers, 3=John Eldridge's version of Vink's early-2000s wind (See Lynnette Dray's thesis, or John Eldridge's thesis) : (null)\n",
      "wr_wind_fac : Massive-star (WR) wind multiplication factor. : (null)\n",
      "wrwindfac : Massive-star (WR) wind multiplication factor. Synonymous with wr_wind_fac (which you should use instead). : (null)\n",
      "BH_prescription : Black hole mass prescrition: relates the mass of a newly formed black hole to its progenitor's (CO) core mass. 0=Hurley et al 2000/2002, 1=Belczynski (early 2000s). : (null)\n",
      "PPISN_prescription : (Pulsational) Pair-Instability Supernova prescription: Relates initial helium core mass of star to whether the star undergoes PPISN or PISN. Requires PPISN flag to be True (see binary_c_parameters.h). 0=no ppisn, 1=Farmer et al 2019. : Ignore\n",
      "sn_kick_distribution_II : Set the distribution of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_ECAP : Set the distribution of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_NS_NS : Set the distribution of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_IBC : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_GRB_COLLAPSAR : Set the distribution of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_TZ : Set the distribution of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_AIC_BH : Set the distribution of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_BH_BH : Set the distribution of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_BH_NS : Set the distribution of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_IA_Hybrid_HeCOWD : Set the distribution of speeds applied to any survivor of a hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_IA_Hybrid_HeCOWD_subluminous : Set the distribution of speeds applied to any survivor of a subluminous hybrid He-COWD SNIa explosion. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_PPISN : Set the distribution of speeds applied to PPISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_PISN : Set the distribution of speeds applied to PISN supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_distribution_PHDIS : Set the distribution of speeds applied to PHDIS supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_II : Set the dispersion of speeds applied to kick type II core collapse supernova systems. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_ECAP : Set the dispersion of speeds applied to the remnants of electron-capture supernovae. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_NS_NS : Set the dispersion of speeds applied to kick neutron stars and black holes that survive a NS-NS merger. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_IBC : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_GRB_COLLAPSAR : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes after a type Ib/c core-collapse supernova which is also a collapsar. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_TZ : Set the dispersion of speeds applied to kick newly-born neutron stars and black holes at the death of a Thorne-Zytkow object. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_AIC_BH : Set the dispersion of speeds applied to kick newly-born neutron stars black holes after accretion induced collapse of a neutron star. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_BH_BH : Set the dispersion of speeds applied to black holes formed by the merger of two black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_BH_NS : Set the dispersion of speeds applied to black holes formed by the merger of a neutron star and a black holes. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_IA_Hybrid_HeCOWD : Set the dispersion of speeds applied to the survivor of a SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_IA_Hybrid_HeCOWD_subluminous : Set the dispersion of speeds applied to the survivor of a subluminous SNIa explosion of a hybrid He-COWD. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_PPISN : Set the dispersion of speeds applied to the survivor of a PPISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_PISN : Set the dispersion of speeds applied to the survivor of a PISN supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_dispersion_PHDIS : Set the dispersion of speeds applied to the survivor of a PHDIS supernova. 0=fixed, 1=maxwellian (hurley/BSE), 2=custom function (see monte_carlo_kicks.c). : (null)\n",
      "sn_kick_companion_IA_He : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia He supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_ELD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia ELD (sub-Mch) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_CHAND : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_AIC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an accretion induced collapse (supernova) occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_ECAP : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when an electron capture supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_He_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia helium merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_CHAND_Coal : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Ia Mch merger supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_NS_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron-star neutron-star merger. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_GRB_COLLAPSAR : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a GRB Collapsar (rapidly rotating SN Ibc) supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_HeStarIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a He-star Ia supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IBC : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type Ib/c supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_II : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type II supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IIa : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a type IIa supernova occurs. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_WDKICK : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a WD is kicked. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_TZ : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a Thorne-Zytkow object is formed. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_AIC_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a neutron star collapses to a black hole. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_BH_BH : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when two black holes merge. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_BH_NS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the, kick on the companion when a black hole merges with a neutron star. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_Hybrid_HeCOWD : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_IA_Hybrid_HeCOWD_subluminous : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a subluminous hybrid He-COWD type Ia explosion. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_PPISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PPISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_PISN : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PISN supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "sn_kick_companion_PHDIS : Set the speed (if >=0) of, or the algothim (if <0) used to calculate the kick on the companion, if it survives, in a PHDIS supernova. 0 = none, 1 = Liu+2015, 2 = Wheeler+ 1975. : (null)\n",
      "wd_sigma : Set the speed at which white dwarfs are kicked when they form, in km/s. Default is zero (i.e. no kick). Requires WD_KICKS. : (null)\n",
      "wd_kick_direction : Set the direction of white dwarf kicks. 0 = random, 1 = up, 2 = forward, 3 = backward, 4 = inward, 5 = outward. Requires WD_KICKS. : (null)\n",
      "wd_kick_when : Decide when to kick a white dwarf. 0=at birth, 1=at first RLOF, 2=at given pulse number (see wd_kick_pulse_number), 3 at every pulse Requires WD_KICKS. : (null)\n",
      "wd_kick_pulse_number : Apply a kick to a star at a desired pulse number on the TPAGB (i.e. pre-WD). Requires WD_KICKS. : (null)\n",
      "minimum_helium_ignition_core_mass : Minimum helium core mass required to ignite helium in the case that the hydrogen envelope is stripped on the giant branch, e.g. to make an sdB or sdO star. Typically 0.4, if 0.0 then the BSE algorithm (based on the total mass) is used. : (null)\n",
      "minimum_CO_core_mass_for_carbon_ignition : Minimum CO core mass for carbon ignition, assuming Mc,bagb>1.6Msun. Typically around 1.08Msun (Pols+1998). : (null)\n",
      "minimum_CO_core_mass_for_neon_ignition : Minimum CO core mass for neon ignition. Typically around 1.42Msun. Stars that have cores that ignite carbon, but not neon explode in electon-capture supernovae. : (null)\n",
      "minimum_mcbagb_for_nondegenerate_carbon_ignition : Minimum Mc,bagb (core mass at the base of the AGB) for non-degenerate carbon ignition. Typically around 2.25Msun (Pols+1998). : (null)\n",
      "maximum_mcbagb_for_degenerate_carbon_ignition : Maximum Mc,bagb (core mass at the base of the AGB) for degenerate carbon ignition. Typically around 1.6Msun (Pols+1998). : (null)\n",
      "max_neutron_star_mass : Maximum mass of a neutron star before it collapses to a black hole. Typically around 2Msun. : (null)\n",
      "chandrasekhar_mass : The Chandrasekhar mass, usually 1.44Msun : (null)\n",
      "delta_mcmin : A parameter to reduce the minimum core mass for third dredge up to occur on the TPAGB. As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
      "lambda_min : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. See also lambda_multiplier. : (null)\n",
      "lambda_multiplier : A parameter to increase the efficiency of third dredge up on the TPAGB. The efficiency is lambda * lambda_mult, and setting lambda_min>0 implies that, once Mc>Mcmin (see delta_mcmin) lambda=Max(lambda(fit to Karakas), lambda_min). As used by Izzard and Tout (2004) to increase the amount of dredge up, hence carbon, in Magellanic cloud stars. : (null)\n",
      "minimum_envelope_mass_for_third_dredgeup : The minimum envelope mass for third dredge up on the TPAGB. Early, solar metallicity models by Straniero et al suggested 0.5Msun is typical. However, circumstantial evidence (Izzard et al 2009) as well as newer models by Stancliffe and Karakas suggest that at low metallicity a value nearer zero is more appropriate. : (null)\n",
      "mass_of_pmz : The mass in the partial mixing zone of a TPAGB star, using the Karakas 2012 tables. Ask Carlo Abate for more details, or see the series of papers Abate et al 2012, 2013, 2014. Requires NUCSYN and USE_TABULAR_INTERSHELL_ABUNDANCES_KARAKAS_2012. : (null)\n",
      "c13_eff : The \"efficiency\" of partial mixing in a TPAGB star intershell region, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
      "mc13_pocket_multiplier : Multiplies the mass in the partial mixing zone of a TPAGB star, when using the s-process tables of Gallino, Busso, Lugaro et al. as provided by Maria Lugaro for the Izzard et al. 2009 paper. Requires NUCSYN and NUCSYN_S_PROCESS. : (null)\n",
      "tides_convective_damping : Tidal convective damping algorithm. 0=TIDES_HURLEY2002 Zahn 197x timescales + Hut, as in Hurley et al (2002), 1 = TIDES_ZAHN1989 : Zahn 1989 lambdas + Hut. : (null)\n",
      "E2_prescription : Choose how to calculate the E2 structural parameter (used in tidal timescale calculations). 0=Hurley 1=Izzard (see Siess et al 2013). : (null)\n",
      "dtfac : A parameter to decrease the timestep ONLY during the TPAGB phase. : (null)\n",
      "hbbtfac : A parameter to modulate the temperature at the base of the hot-bottom burning zone in TPAGB stars. (Works only if NUCSYN is defined) : (null)\n",
      "wind_multiplier_%d : Wind multiplier for the stellar type specified by the intger %d. By default these are all 1.0. : (null)\n",
      "wind_type_multiplier_%d : Wind multiplier for different types of wind (MS, GB, AGB, WR, LBV, OTHER), given by the integer %d. By default these are all 1.0. : (null)\n",
      "pre_main_sequence : Set to True to turn on pre-main sequence evolution. Currently this is not a special stellar type, rather the first (small) fraction of the main sequence has increased radii to match the Railton et al 2014 fits to Tout's pre-main sequence stars. Requires PRE_MAIN_SEQUENCE. See also pre_main_sequence_fit_lobes. : (null)\n",
      "pre_main_sequence_fit_lobes : Set to True force a pre-main sequence star into its Roche lobe. This is done by artificially aging it. Requires PRE_MAIN_SEQUENCE : (null)\n",
      "small_envelope_method : Choose the method used to determine the stellar radius when the envelope mass is very thin. 0 = Hurley et al. (2002), 1 = Miller Bertolami et al. (2016+) for GB and AGB stars only. : (null)\n",
      "timestep_modulator : Multiplier applied to the global timestep. Requires TIMESTEP_MODULATION. : (null)\n",
      "timestep_multiplier%d : Multiplier applied to timestep limit <n>. : (null)\n",
      "maximum_timestep : The maximum timestep (MYr). : (null)\n",
      "zoomfac_multiplier_decrease : When a timestep is rejected, decrease the timestep by this factor (0.5). : (null)\n",
      "zoomfac_multiplier_increase : When a timestep is rejected, zooms, then succeeds, increase the timestep by this factor (1.2). : (null)\n",
      "maximum_timestep_factor : The maximum factor between two subsequent timesteps (1.2). : (null)\n",
      "maximum_nuclear_burning_timestep : The maximum timestep (MYr) in any nuclear burning phase. : (null)\n",
      "nova_retention_method : Algorithm used to calculate the amount of mass retained during a nova explosion. 0=use nova_retention_fraction. (other methods pending) : (null)\n",
      "MINT_metallicity : This sets the metallicity for MINT. It is ignored if set to -1.0, the default, in which case the normal metallicity parameter is used. : (null)\n",
      "gaia_Teff_binwidth : log10(Effective temperature) bin width used to make Gaia-like HRDs\n",
      " : (null)\n",
      "gaia_L_binwidth : log10(luminosity) bin width used to make Gaia-like HRDs\n",
      " : (null)\n",
      "gaia_colour_transform_method : Use this to select the method used to transform to Gaia colours from other colour schemes. GAIA_CONVERSION_UBVRI_UNIVARIATE_JORDI2010 = 0 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_UBVRI_BIVARIATE_JORDI2010 = 1 Jordi et al.'s bivariate UBVRI fits, GAIA_CONVERSION_ugriz_UNIVARIATE_JORDI2010 = 2 Jordi et al.'s univariate UBVRI fits, GAIA_CONVERSION_ugriz_BIVARIATE_JORDI2010 = 3 Jordi et al.'s univariate ugriv fits, GAIA_CONVERSION_UBVRI_UNIVARIATE_EVANS2018 = 4 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_ugriz_UNIVARIATE_EVANS2018 = 5 Evans et al. (2018, DR2) fits, GAIA_CONVERSION_UBVRI_RIELLO2020 = 6 Riello et al. (2020, DR3) fits, GAIA_CONVERSION_ugriz_RIELLO2020 = 7 Riello et al. (2020, DR3) fits. : (null)\n",
      "rotationally_enhanced_mass_loss : Set to 1 to enable rotationally enhanced mass loss rate algorithms: 0= none, 1=formula cf. Langer models (=ROTATIONALLY_ENHANCED_MASSLOSS_LANGER_FORMULA), 2=limit accretion rate before wind loss is applied, 3 = both 1 and 2. See also rotationally_enhanced_exponent : (null)\n",
      "AGB_core_algorithm : Algorithm to use for calculating AGB core masses. 0=Hurley et al. 2002 if no NUCSYN, Karakas 2002 if NUCSYN is defined; 1=Hurley et al. 2002 (overshooting models); 1=Karakas 2002 (non-overshooting models). : (null)\n",
      "AGB_radius_algorithm : Algorithm to use for calculating radii on the TPAGB. : (null)\n",
      "AGB_luminosity_algorithm : Algorithm to use for calculating luminosities on the TPAGB. : (null)\n",
      "AGB_3dup_algorithm : Algorithm to use for calculating third dredge up efficiency on the TPAGB. : (null)\n",
      "overspin_algorithm : Algorithm to determine what we do when a star is rotating at its breakup velocity. OVERSPIN_BSE (0) conservatively transfers the angular momentum back to the orbit. OVERSPIN_MASSLOSS uses the rotationally_enhanced_massloss parameter to lose mass which carries away the angular momentum. : (null)\n",
      "rotationally_enhanced_exponent : The exponent (power) by which rotationally enhanced mass loss is raised. Requires ROTATIONALLY_ENHANCED_MASS_LOSS. See also rotationally_enhanced_mass_loss. : (null)\n",
      "batchmode : Set the batchmode control variable. Use only if you know what you are doing! : (null)\n",
      "speedtests : If True, turns on speedtests during version information (off by default). : (null)\n",
      "use_fixed_timestep_%d : Set to True to use fixed timestep <n>, False to turn off. Fixed timesteps are on (this is True) by default. : (null)\n",
      "task%d : Control tasks to be performed by binary_c. By default, these are all TRUE. For more information see binary_c_macros.h, particularly the BINARY_C_TASK_* macros. : (null)\n",
      "orbiting_object : Usage: --orbiting_object mass,spinrate,central_object,period. : 1.0\n",
      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
      "orbiting_objects_log : If True, turn on orbiting-object log. : (null)\n",
      "orbiting_objects_wind_accretion_multiplier : Multiplier for wind accretion on orbiting objects. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
      "orbiting_objects_close_pc_threshold : How close are orbiting objects allowed to be? Set this to be the absolute percentage difference minimum. : (null)\n",
      "orbiting_objects_tides_multiplier : Multiplier for tidal torques on orbiting objects. : (null)\n",
      "evaporate_escaped_orbiting_objects : If True, evaporate orbiting objects that have escaped the system. : (null)\n",
      "RLOF_transition_objects_escape : If True, objects that escape their Roche lobe are ejected from the system, otherwise they are placed just outside the minimum stable orbit. : (null)\n",
      "PN_resolve : If True, the timestep will be shortened to resolve better the PN phase (FALSE). : (null)\n",
      "PN_resolve_minimum_luminosity : The luminosity above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
      "PN_resolve_maximum_envelope_mass : The envelope mass below which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
      "PN_resolve_minimum_effective_temperature : The minimum effective temperature above which extra time resolution for PNe is applied (see PN_resolve). : (null)\n",
      "PN_fast_wind : If True, thin-envelope PNe will have fast winds (FALSE). : (null)\n",
      "PN_fast_wind_dm_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
      "PN_fast_wind_mdot_GB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_GB) : (null)\n",
      "PN_fast_wind_dm_AGB : The envelope mass below which fast wind used during the AGB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
      "PN_fast_wind_mdot_AGB : The envelope mass below which fast wind used during the GB if PN_fast_wind is TRUE. (See also PN_fast_wind, PN_fast_wind_mdot_AGB) : (null)\n",
      "HeWD_HeWD_ignition_mass : HeWD-HeWD mergers above this mass reignite helium. (0.3) : (null)\n",
      "wind_Nieuwenhuijzen_luminosity_lower_limit : Above this luminosity we activate the Nieuwenhuijzen and de Jager wind (4e3 Lsun). : (null)\n",
      "wind_LBV_luminosity_lower_limit : Above this luminosity we activate the LBV wind (6e5 Lsun). : (null)\n",
      "\n",
      "############################################################\n",
      "##### Section Binary\n",
      "############################################################\n",
      "separation : Set the orbital separation (actually the semi-major axis) of the binary (internal index 0, stellar indices 0 and 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
      "separation_triple : Set the orbital separation (actually the semi-major axis) of the triple (internal index 1) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
      "separation_quadruple : Set the orbital separation (actually the semi-major axis) of the quadruple (internal index 2) in solar radii. Note that if the orbital period is given, it is used to calculate the separation. So if you want to set the separation instead, either do not set the orbital period or set the orbital period to zero (0.0). : (null)\n",
      "orbital_period : Set the initial orbital period of the binary, stars 1 and 2 (internal indices 0 and 1) in days. See also separation. : (null)\n",
      "orbital_period_triple : Set the initial orbital period of the triple in days. See also separation. : (null)\n",
      "orbital_period_quadruple : Set the orbital period of the outer binary in a quadrulple (stars 3 and 4, internal indices 2 and 3) in days. See also separation. : (null)\n",
      "eccentricity : Set the initial eccentricity of the binary orbit (stars 1 and 2, internal indices 0 and 1). : (null)\n",
      "eccentricity_triple : Set the initial eccentricity of the triple orbit. : (null)\n",
      "eccentricity_quadruple : Set the initial eccentricity of the outer binary of a quadruple (stars 3 and 4, internal indices 2 and 3). : (null)\n",
      "incliniation : Set the initial orbital_inclination of the binary relative to zero. : (null)\n",
      "incliniation_triple : Set the initial orbital_inclination of the triple orbit relative to zero. : (null)\n",
      "incliniation_quadruple : Set the initial orbital_inclinationy of the quadruple orbit relative to zero. : (null)\n",
      "orbital_phase : Set the initial orbital phase of the binary orbit. : (null)\n",
      "orbital_phase_triple : Set the initial orbital phase of the triple orbit. : (null)\n",
      "orbital_phase_quadruple : Set the initial orbital phase of the quadruple orbit. : (null)\n",
      "argument_of_periastron : Set the initial argument of periastron of the binary orbit. : (null)\n",
      "argument_of_periastron_triple : Set the initial argument of periastron of the triple orbit. : (null)\n",
      "argument_of_periastron_quadruple : Set the initial argument of periastron of the quadruple orbit. : (null)\n",
      "disc_timestep_factor : Factor that multiplies the natural timestep of a disc. : (null)\n",
      "white_dwarf_cooling_model : White dwarf cooling model, relates age to luminosity. WHITE_DWARF_COOLING_MESTEL = 0 is Mestel's model, WHITE_DWARF_COOLING_MESTEL_MODIFIED = 1 is Hurley's modified Mestel model, WHITE_DWARF_COOLING_CARRASCO2014 = 2 is based on Carrasco (2014) tables.   : (null)\n",
      "white_dwarf_radius_model : White dwarf radius model, radius to mass (and perhaps age). WHITE_DWARF_RADIUS_NAUENBERG1972 = 0 Nauenberg (1972), WHITE_DWARF_RADIUS_MU = 1 mu-dependent variant, WHITE_DWARF_RADIUS_CARRASCO2014 = 2 is based on Carrasco (2014) tables. : (null)\n",
      "cbdisc_mass_loss_inner_viscous_accretion_method : Chooses where the mass that is accreted from the inner edge of a circumbinary disc goes, i.e. to which star. 0 = Young and Clarke 2015, 1 = Gerosa et al 2015, 2 = 50:50 (i.e. not dependence on mass). : (null)\n",
      "cbdisc_inner_edge_stripping : If True, allow inner edge mass stripping. : (null)\n",
      "cbdisc_end_evolution_after_disc : If True, stop evolution when a disc evaporates. : (null)\n",
      "cbdisc_no_wind_if_cbdisc : If True, disable stellar winds when there is a circumbinary disc. : (null)\n",
      "cbdisc_outer_edge_stripping : If True, allow outer edge mass stripping. : (null)\n",
      "disc_n_monte_carlo_guesses : Number of monte carlo guesses to try in the disc solver if the normal list of guesses fails (0). : (null)\n",
      "disc_log : If 1, turn on the disc log. Requires DISC_LOG to be defined on build. : (null)\n",
      "disc_log2d : If 1, turn on the 2d disc log. Requires DISC_LOG to be defined on build. : (null)\n",
      "disc_log_dt : If non-zero, only allows disc log output every disc_log_dt Myr. : (null)\n",
      "disc_log_directory : Directory into which disc logging is sent (must exist!). : /tmp/\n",
      "post_ce_adaptive_menv : If TRUE, and if post_ce_objects_have_envelopes is TRUE, then the envelope mass of a post-CE star is such that it sits just inside its Roche lobe. If FALSE then a fixed (thin) envelope mass is applied that depends on the stellar type (see macros POST_CE_ENVELOPE_DM_GB, POST_CE_ENVELOPE_DM_EAGB and POST_CE_ENVELOPE_DM_TPAGB). : (null)\n",
      "post_ce_objects_have_envelopes : If TRUE then post-common-envelope objects have thin envelopes. You need this if you are to have post-CE post-AGB stars. Note that this *may* be unstable, i.e. you may end up having many CEEs. The mass in the envelope is controlled by post_ce_adaptive_menv. TRUE by default. : (null)\n",
      "PN_comenv_transition_time : post-common envelope transition time in years (1e2).  This is the time taken to move from CEE ejection to Teff > 30e4 K. Hall et al. (2013) suggest ~100 years. : (null)\n",
      "minimum_time_between_PNe : The minimum time (Myr) between planetary nebula detections. This prevents multiple, fast common envelopes triggering two PNe (0.1). : (null)\n",
      "PN_Hall_fading_time_algorithm : In stars with low mass (<0.45Msun) cores, you can choose to set the PN fading time to either the minimum (PN_HALL_FADING_TIME_ALGORITHM_MINIMUM) or maximum (PN_HALL_FADING_TIME_ALGORITHM_MAXIMUM) as shown in Fig. 6 of Hall et al. (2013). : (null)\n",
      "PPN_envelope_mass : Desired pre-planetary nebula (post-AGB) envelope mass. : (null)\n",
      "cbdisc_eccentricity_pumping_method : Select from various eccentricity-pumping methods when there is a circumbinary disc. Requires DISCS. 0 = off. : (null)\n",
      "cbdisc_viscous_photoevaporative_coupling : Set to 1 to turn on viscous-photoevaporative coupling in circumbinary discs. Requires DISCS. 0 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_NONE = off, 1 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_INSTANT instant, 2 = CBDISC_VISCOUS_PHOTOEVAPORATIVE_COUPLING_VISCOUS slow, viscous wind. : (null)\n",
      "cbdisc_inner_edge_stripping_timescale : Defines the timescale for mass loss from by inner edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_in. : (null)\n",
      "cbdisc_outer_edge_stripping_timescale : Defines the timescale for mass loss from by outer edge stripping. 0 = instant, 1 = very long, 2 = viscous at Revap_in, 3 = orbital at Revap_out. : (null)\n",
      "cbdisc_viscous_L2_coupling : Set to 1 to turn on viscous-L2-loss coupling in circumbinary discs. Requires DISCS. 0 = off. : (null)\n",
      "gravitational_radiation_model : Model for gravitational radiation from the system. 0=Hurley et al 2002 (Landau and Lifshitz 1951). 1 = as 0 but only when there is no RLOF. 2 = none. : (null)\n",
      "nova_irradiation_multiplier : Multiplier for nova-radiative induced mass loss. (Shara+1986) : (null)\n",
      "gravitational_radiation_modulator_J : Modulator for gravitational wave radiation angular momentum loss rate (1.0). : (null)\n",
      "gravitational_radiation_modulator_e : Modulator for gravitational wave radiation eccentricity pumping rate (1.0). : (null)\n",
      "nova_faml_multiplier : Nova friction-induced angular momentum loss multiplier. (Shara+1986) : (null)\n",
      "RLOF_angular_momentum_transfer_model : Choose angular momentum transfer model in RLOF. 0=BSE (with discs), 1=conservative : (null)\n",
      "post_SN_orbit_method : Method by which the post-SN orbit is calculated. 0=BSE, 1=Tauris&Taken 1998. : (null)\n",
      "multiplicity : Multiplicity: 1=single star, 2=binary, 3=triple, 4=quadruple. : (null)\n",
      "accretion_limit_eddington_steady_multiplier : Steady accretion is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_steady_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
      "accretion_limit_eddington_LMMS_multiplier : Accretion from a low-mass, convective, main_sequence star is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_LMMS_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
      "accretion_limit_eddington_WD_to_remnant_multiplier : Accretion from a WD onto a remnant star (e.g. another white dwarf, neutron star or black hole) is limited by the Eddington instability, with limiting rate given by the accretion_limit_eddington_WD_to_remnant_multiplier * the normal (spherically symmetric) Eddington rate. This is known in the trade as the Eddington factor, and anything greater than 1.0 potentially gives you super-Eddington accretion. : (null)\n",
      "accretion_limit_thermal_multiplier : Mass transfer onto a MS, HG or CHeB star is limited by the accretor's thermal rate times this multiplier. : (null)\n",
      "accretion_limit_dynamical_multiplier : Mass transfer is limited by the accretor's dynamical rate times this multiplier. : (null)\n",
      "donor_limit_envelope_multiplier : Mass transfer by RLOF is limited by this fraction of the donor's envelope mass per timestep : (null)\n",
      "donor_limit_thermal_multiplier : Mass transfer by RLOF is limited by the accretor's thermal rate times this multiplier. : (null)\n",
      "donor_limit_dynamical_multiplier : Mass transfer by RLOF is limited by the donor's dynamical rate times this multiplier. : (null)\n",
      "Bondi_Hoyle_accretion_factor : Wind accretion rate, as calculated by the Bondi-Hoyle-Littleton formula, multiplcation factor. Hurley et al 2002 use 1.5, which is the default. : (null)\n",
      "tidal_strength_factor : A modulator for the tidal strength. If this factor > 1 then tides are stronger, i.e. tidal timescales are reduced. : (null)\n",
      "hachisu_qcrit : Critical q=Maccretor/Mdonor above which Hachisu's disk wind turns on. : (null)\n",
      "hachisu_disk_wind : Set to True to turn on Hachisu's disk wind when material accretes too fast onto a white dwarf. This helps to make more SNeIa. See also hachisu_qcrit. : (null)\n",
      "mass_accretion_for_eld : The mass that must be accreted onto a COWD for it to ignite as an edge-lit detonation SNIa. : (null)\n",
      "WDWD_merger_algorithm : Algorithm to be used when merging two white dwarfs. 0 = Hurley et al. (2002), 1 = Perets+ (2019), 2 = Chen+ (2016, todo)  : (null)\n",
      "type_Ia_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from Chandrasekhar-mass exploders. 0 = DD7 (Iwamoto 1999), 1 = Seitenzahl 2013 3D hydro yields (you must also set Seitenzahl2013_model)  : (null)\n",
      "Seitenzahl2013_model : Which of Seitenzahl et al. 2013's models to use? One of N1,N3,N5,N10,N20,N40,N100L,N100,N100H,N150,N200,N300C,N1600,N1600C,N100_Z0.5,N100_Z0.1,N100_Z0.01 (defaults to N100). : N1\n",
      "type_Ia_sub_MCh_supernova_algorithm : Algorithm to be used when calculating type Ia yields from sub-Chandrasekhar-mass exploders. (Currently unused.) : (null)\n",
      "max_HeWD_mass : The maximum mass a HeWD can have before it ignites helium (0.7). : (null)\n",
      "merger_mass_loss_fraction : Fraction of the total mass which is lost when stars merge. : (null)\n",
      "merger_angular_momentum_factor : When two stars merge the resulting single star retains a fraction of the total system angular momentum (or the critical spin angular momentum, if it is smaller) multiplied by this factor. : (null)\n",
      "wind_angular_momentum_loss : Prescription for losing angular momentum in a stellar wind. 0=Hurley et al 2002 ('Tout') prescription, 1=lw i.e. a factor multiplying the specific orbital angular momentum, 2=lw hybrid for fast winds. Set wind_djorb_fac to the desired factor.. : (null)\n",
      "wind_djorb_fac : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=0 (the Tout/Hurley et al 2002 prescription). See wind_angular_momentum_loss. : (null)\n",
      "lw : Factor multiplying angular momentum loss in a stellar wind when wind_angular_momentum_loss=1,2 (the 'lw' prescription). See wind_angular_momentum_loss. : (null)\n",
      "VW93_EAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
      "VW93_TPAGB_wind_speed : Activate this to use Vassiliadis and Wood (1993) wind speed during the EAGB. : (null)\n",
      "use_periastron_Roche_radius : Set this to True to use the Roche lobe radius at periastron, rather than (the default to) assume a circular orbit. This will be useful one day when we treat RLOF in eccentric orbits properly, hopefully. : (null)\n",
      "qcrit_LMMS : Apply critical q=Mdonor/Maccretor value for low-mass main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for non-degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_LMMS : Apply critical q=Mdonor/Maccretor value for (low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_MS : Apply critical q=Mdonor/Maccretor value for (non-low mass) main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_HG : Apply critical q=Mdonor/Maccretor value for Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_GB : Apply critical q=Mdonor/Maccretor value for first red giant branch stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_CHeB : Apply critical q=Mdonor/Maccretor value for core helium burning stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_EAGB : Apply critical q=Mdonor/Maccretor value for early-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_TPAGB : Apply critical q=Mdonor/Maccretor value for TP-AGB stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_HeMS : Apply critical q=Mdonor/Maccretor value for helium main sequence stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_HeHG : Apply critical q=Mdonor/Maccretor value for helium Hertzsprung gap stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_HeGB : Apply critical q=Mdonor/Maccretor value for helium red giant stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_HeWD : Apply critical q=Mdonor/Maccretor value for helium white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_COWD : Apply critical q=Mdonor/Maccretor value for carbon-oxygen white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_ONeWD : Apply critical q=Mdonor/Maccretor value for oxygen-neon white dwarf stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_NS : Apply critical q=Mdonor/Maccretor value for neutron stars to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "qcrit_degenerate_BH : Apply critical q=Mdonor/Maccretor value for black holes to determine the stability of Roche-lobe overflow for degenerate accretors. See also qcrits_*, qcrits_degenerate_*. : (null)\n",
      "mass_for_Hestar_Ia_upper : Only helium stars below this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_lower. : (null)\n",
      "mass_for_Hestar_Ia_lower : Only helium stars above this mass can explode as SNIa. Default is zero, i.e. it never happens. See also mass_for_Hestar_Ia_upper. : (null)\n",
      "alphaCB : Circumbinary disk viscosity parameter, alpha. : (null)\n",
      "minimum_donor_menv_for_comenv : Minimum donor envelope mass for common envelope evolution to be triggered (Msun). Default 0. : (null)\n",
      "comenv_prescription : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
      "comenv_prescription%d : Use this to choose which common envelope prescription you should use. 0=Hurley et al 2002 (based on the Paczyński energy model) or 1=Nelemans and Tout (angular momentum model). See also alpha_ce, comenv_ms_accretion_mass, comenv_ms_accretion_fraction, comenv_ns_accretion_fraction, comenv_ns_accretion_mass, nelemans_gamma, nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs, lambda_ce, lambda_ionisation. : (null)\n",
      "comenv_ejection_spin_method : When a common envelope is ejected, we need to decide how fast the stars are left spinning. COMENV_EJECTION_SPIN_METHOD_DO_NOTHING (0) is the default, this just leaves the stars/stellar cores spinning with the same spin rate (omega = angular velocity) with which they entered the common envelope phase. COMENV_EJECTION_SPIN_METHOD_SYCHRONIZE instead tidally synchronizes the stars with their new orbital angular velocity. : (null)\n",
      "comenv_merger_spin_method : When a common envelope binary merges, we need to decide how fast the resulting single star is left spinning. COMENV_MERGER_SPIN_METHOD_SPECIFIC (0) is the default, this preserves angular momentum but limits the specific angular momentum of the merged star to the specific angular momentum of the system at the onset of common envelope evolution. COMENV_MERGER_SPIN_METHOD_CONSERVE_ANGMOM (1) sets the merger's angular momentum to be that of the system at the onset of common envelope evolution (which means the star may be rotating supercritically). COMENV_MERGER_SPIN_METHOD_CONSERVE_OMEGA (2) sets the spin rate (angular frequency = omega) of the merged star to be that of the orbit just at the onset of common envelope evolution. : (null)\n",
      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
      "comenv_ms_accretion_fraction : Experimental. During common envelope evolution, a main sequence may accrete a fraction of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_mass. : (null)\n",
      "comenv_ns_accretion_mass : Experimental. During common envelope evolution, a neutron star may accrete some of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_fraction. : (null)\n",
      "comenv_ns_accretion_fraction : Experimental. During common envelope evolution, a neutron star may accrete a fraction of the envelope's mass. Requires COMENV_NS_ACCRETION. See also comenv_ns_accretion_mass. : (null)\n",
      "alpha_ce : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
      "alpha_ce%d : Common envelope energy formalism parameter. A fraction alpha of the orbital energy is used to eject the envelope. See Hurley et al 2002 for details. : (null)\n",
      "lambda_ce : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
      "lambda_ce%d : Common envelope parameter. The binding energy of the common envelope is G*M*Menv/(lambda*R). Typically this is taken to be 0.5, but if set to -1 binary_c uses the Dewi and Tauris fits instead, -2 uses the formalism of Wang, Jia and Li (2016) and if -3 then a polytropic formalism is used (see also comenv_splitmass). : (null)\n",
      "comenv_splitmass : When lambda_ce=-2, the envelope binding energy, lambda, is calculated using a polytropic formalism. The comenv_splitmass defines the point, in the units of the core mass, above which material is ejected. : (null)\n",
      "nelemans_recalc_eccentricity : If True, recalculate the eccentricity after angular momentum is removed.  : (null)\n",
      "comenv_post_eccentricity : Eccentricity remaining after common envelope ejection. : (null)\n",
      "nelemans_gamma : Set the fraction of the orbital specific angular momentum that is used to eject the common envelope according to the Nelemans and Tout prescription. See also nelemans_minq, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
      "nelemans_minq : Only activate the Nelemans and Tout common envelope prescription for q>nelemans_minq. See also nelemans_gamma, nelemans_max_frac_j_change, nelemans_n_comenvs. : (null)\n",
      "nelemans_max_frac_j_change : Maximum fractional angular momentum change in the Nelemans and Tout common envelope prescription. See also nelemans_gamma, nelemans_minq, nelemans_n_comenvs. : (null)\n",
      "nelemans_n_comenvs : Set the maximum number of common envelope ejections allowed to follow the Nelemans and Tout prescription, after which the standard alpha prescription is used. : (null)\n",
      "lambda_ionisation : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
      "lambda_ionisation%d : A fraction lambda_ionisation of the recombination energy in the common envelope goes into ejecting the envelope. This is usually 0.0, but a positive value can make a big difference to the outcome of common envelope evolution. : (null)\n",
      "lambda_enthalpy : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
      "lambda_enthalpy%d : A fraction of the enthalpy to be included in the common envelope evolution binding energy. Only used for the Wang 2016 prescription (so far). : (null)\n",
      "cbdisc_albedo : Circumbinary-disc albedo. Requires DISCS. : (null)\n",
      "cbdisc_gamma : Circumbinary disc gamma (equation of state) parameter. Requires DISCS. : (null)\n",
      "cbdisc_alpha : Circumbinary disc alpha (viscosity) parameter. Requires DISCS. : (null)\n",
      "cbdisc_kappa : Circumbinary disc kappa (opacity) parameter. Requires DISCS. : (null)\n",
      "cbdisc_minimum_evaporation_timescale : Circumbinary disc minimum evaporation timescale (years). If (slow, not edge stripped) mass loss would evaporate the disc on a timescale less than this, simply evaporate the disc immediated. Usually set to 1y, ignore if zero. Requires DISCS. : (null)\n",
      "cbdisc_torquef : Circumbinary disc binary torque multiplier. Requires DISCS. : (null)\n",
      "cbdisc_max_lifetime : Circumbinary disc maximum lifetime (years, ignored if 0). Requires DISCS. : (null)\n",
      "cbdisc_init_dM : On cbdisc start, reduce mass by a fraction dM if it won't converge. Requires DISCS. : (null)\n",
      "cbdisc_init_dJdM : On cbdisc start, reduce angular momentum by a fraction dJ/dM*dM if it won't converge. Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_constant_rate : Circumbinary disc constant mass loss rate (Msun/year). Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_FUV_multiplier : Circumbinary disc FUV mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_Xray_multiplier : Circumbinary disc X-ray mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_ISM_ram_pressure_multiplier : Circumbinary disc interstellar medium ram pressure stripping mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_ISM_pressure : Circumbinary disc interstellar medium ram pressure in units of Boltzmann constant per Kelvin (I think...). Requires DISCS. Typically 3000.0. See e.g. http://www.astronomy.ohio-state.edu/~pogge/Ast871/Notes/Intro.pdf page 15 or https://arxiv.org/pdf/0902.0820.pdf Fig. 1 (left panel). : (null)\n",
      "cbdisc_mass_loss_inner_viscous_multiplier : Circumbinary disc inner edge viscous mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
      "cbdisc_mass_loss_inner_viscous_angular_momentum_multiplier : Circumbinary disc inner edge viscous angular momentum multiplier (no units). The inner edge angular momentum Requires DISCS. : (null)\n",
      "cbdisc_resonance_multiplier : Circumbinary disc resonant interaction multiplier, affects eccentricity pumping and angular momentum rates. Requires DISCS. : (null)\n",
      "cbdisc_resonance_damping : Circumbinary disc resonant interaction damping: should be on (True) to damp the l=1, m=2 resonance when the disc inner edge lies outside the resonance location. Requires DISCS. : (null)\n",
      "cbdisc_fail_ring_inside_separation : If True, while converging on a structure, circumbinary discs with Rring < the binary separation are immediately failed. : (null)\n",
      "cbdisc_mass_loss_inner_L2_cross_multiplier : Circumbinary disc inner edge L2-crossing mass loss rate multiplier (no units). Requires DISCS. : (null)\n",
      "cbdisc_minimum_luminosity : Circumbinary disc minimum luminosity. If the disc becomes dimmer than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
      "cbdisc_minimum_mass : Circumbinary disc minimum mass. If the disc becomes less massive than this, the disc is evaporated instantly. Requires DISCS. : (null)\n",
      "cbdisc_minimum_fRing : Circumbinary disc minimum fRing. If the disc becomes a ring, and fRing = |Rout/Rin-1| < this value (and this value is non-zero), the disc is evaporated instantly. Requires DISCS. : (null)\n",
      "comenv_disc_angmom_fraction : If >0 Fraction of the common envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the moments of inertia to calculate (deprecated), if -2 use the common envelope's specific angular momentum, if -3 uses the L2 point at the end of the common envelope to set the angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
      "comenv_disc_mass_fraction : Fraction of the common envelope's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_COMENV. : (null)\n",
      "wind_disc_angmom_fraction : If >0 Fraction of the wind envelope's angular momentum that goes into the circumbinary disc. If -1 then uses the L2 point's specific angular momentum. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
      "wind_disc_mass_fraction : Fraction of the stellar wind's mass that goes into the circumbinary disc. Requires DISCS and DISCS_CIRCUMBINARY_FROM_WIND. : (null)\n",
      "WRLOF_method : Choose whether and how to apply wind-Roche-lobe-overflow. 0=none, 1=q-dependent, 2=quadratic See Abate et al 2013/14 for details. Requires WRLOF_MASS_TRANSFER. : (null)\n",
      "minimum_timestep : The minimum timestep (Myr). : (null)\n",
      "timestep_solver_factor : Factor applied in timestep_limits, e.g. to prevent X changing too fast by comparing to X/dX/dt, which is usually 1 but can be higher to lengthen timesteps when using an alternative solver. : (null)\n",
      "RLOF_mdot_factor : Multiplier applied to the mass transfer rate during Roche-lobe overflow. Requires RLOF_MDOT_MODULATION. : (null)\n",
      "RLOF_f : Factor to enlarge a Roche lobe, nominally because of radiation pressure (see Dermine et al paper). Requires RLOF_RADIATION_CORRECTION. : (null)\n",
      "minimum_separation_for_instant_RLOF : If True, instead of evolving the system just report the minimum separation (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_orbital_period_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
      "minimum_orbital_period_for_instant_RLOF : If True, instead of evolving the system just report the minimum orbital period (on the zero-age main sequence) that would lead to instant RLOF. Used by binary_grid. See also minimum_separation_for_instant_RLOF and maximum_mass_ratio_for_instant_RLOF. : (null)\n",
      "maximum_mass_ratio_for_instant_RLOF : If True, instead of evolving the system just report the maximum mass ratio (on the zero-age main sequence) that would lead to instant RLOF, given M1 and orbital period. Used by binary_grid. See also minimum_separation_for_instant_RLOF and minimum_orbital_period_for_instant_RLOF. : (null)\n",
      "RLOF_method : Use RLOF_method to choose the algorithm you use for Roche-lobe overflow mass loss rate calculations. 0=Hurley et al 2002, 1=Adaptive (for radiative stars) R=RL method, 2=Ritter (probably broken), 3=Claeys etal 2014 variant on Hurley et al 2002. : (null)\n",
      "RLOF_interpolation_method : When a star overflows its Roche lobe, it always has R>RL because of the limited time resolution of the simulation. Binary_c then uses an algorithm to get back to when R~RL (within a desired tolerance, set in RLOF_ENTRY_THRESHOLD which is usually 1.02, i.e. overflow of 2%). You can choose algorithm 0, the Hurley et al 2002 method which reverses time (i.e. uses a Newton-like scheme), or 1 to use the binary_c method which rejects a timestep (and hence does no logging on that timestep) and repeats with half the timestep until R~RL. The latter is now the default, because this means there are no negative timesteps which break various other algorithms (e.g. nucleosynthesis). : (null)\n",
      "nova_retention_fraction : The mass accreted during a nova as fraction of mass transferred : (null)\n",
      "beta_reverse_nova : The fraction of mass ejected in a nova explosion which is accreted back onto the companion star. Set to -1 to automatically calculate based on a geometric argument, or 0 or positive to set the value. : (null)\n",
      "WD_accretion_rate_novae_upper_limit_hydrogen_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is hydrogen rich : above this rate the mass transfer leads to stable burning. : (null)\n",
      "WD_accretion_rate_novae_upper_limit_helium_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
      "WD_accretion_rate_novae_upper_limit_other_donor : Upper limit of the stable mass transfer rate onto a white dwarf that leads to novae when the donor is neither hydrogen nor helium rich : above this rate the mass transfer leads to stable burning. : (null)\n",
      "WD_accretion_rate_new_giant_envelope_lower_limit_hydrogen_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a hydrogen-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
      "WD_accretion_rate_new_giant_envelope_lower_limit_helium_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope with a helium-rich donor. Below this mass transfer leads to stable burning. : (null)\n",
      "WD_accretion_rate_new_giant_envelope_lower_limit_other_donor : Lower limit of the mass transfer rate onto a white dwarf that leads to a the formation of a new giant envelope when the donor is neither hydrogen nor helium rich. Below this mass transfer leads to stable burning. : (null)\n",
      "CRAP_parameter : Tidally enhanced mass loss parameter. See Tout and Eggleton's paper on the subject. (Was the parameter bb). : (null)\n",
      "individual_novae : If individual_novae is True, novae are resolved such that each explosion is performed separtaely. : (null)\n",
      "nova_timestep_accelerator_num : The nova timestep is accelerated if the nova number exceeds nova_timestep_accelerator_num. If zero or negative, acceleration is off. See also nova_timestep_accelerator_index and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
      " : (null)\n",
      "nova_timestep_accelerator_index : The index at which the nova timestep is accelerated. A larger value gives longer timesteps. See also nova_timestep_accelerator_num and nova_timestep_accelerator_max. Only used if individual_novae is on.\n",
      " : (null)\n",
      "nova_timestep_accelerator_max : The nova timestep is accelerated by a factor that is capped at nova_timestep_accelerator_max. This parameter is ignored if it is zero or negative. See also nova_timestep_accelerator_num and nova_timestep_accelerator_index. Only used if individual_novae is on.\n",
      " : (null)\n",
      "nonconservative_angmom_gamma : Mass lost from the system (but NOT from a stellar wind) takes a fraction gamma of the orbital angular momentum with it. Set to -1 to take the specific angular momentum of the donor star. Set to -2 to take super-Eddington, nova and disk-wind angular momenta as if a wind from the accretor. : (null)\n",
      "max_stellar_angmom_change : Maxmimum fractional change in stellar angular momentum allowed before a timestep is rejected (0.05). : (null)\n",
      "comenv_ms_accretion_mass : Experimental. During common envelope evolution, a main sequence star may accrete some of the envelope's mass. Requires COMENV_MS_ACCRETION. See also comenv_ms_accretion_fraction. : (null)\n",
      "\n",
      "############################################################\n",
      "##### Section Nucsyn\n",
      "############################################################\n",
      "third_dup : If True, enables third dredge up. Requires NUCSYN and NUCSYN_THIRD_DREDGE_UP. : (null)\n",
      "third_dup_multiplier : Usage: --third_dup_multiplier <i> <f>. Multiplies the abundance of element <i> by <f> during third dredge up. : 1.0\n",
      "NeNaMgAl : Enables NeNaMgAl reaction network. Requires NUCSYN and NUCSYN_HBB. : Ignore\n",
      "nucsyn_network%d : Usage: --nucsyn_network%d <boolean>. Turn a nuclear network on or off. : (null)\n",
      "nucsyn_network_error%d : Usage: --nucsyn_network_error%d <f>. Threshold error in nuclear network solver for network %d. : (null)\n",
      "nucreacmult%d : Usage: --nucreacmult%d <f>. Multiply nuclear reaction given by the integer %d (integer) by f (float).  : (null)\n",
      "nucsyn_metallicity : This sets the metallicity of the nucleosynthesis algorithms, i.e. the amount (by mass) of matter which is not hydrogen or helium. Usually you'd just set this with the metallicity parameter, but if you want the nucleosynthesis to be outside the range of the stellar evolution algorithm (e.g. Z=0 or Z=0.04) then you need to use nucsyn_metallicity. That said, it's also outside the range of some of the nucleosynthesis algorithms as well, so you have been warned! : (null)\n",
      "nucsyn_solver : Choose the solver used in nuclear burning. 0 = KAPS_RENTROP is a Kaps-Rentrop scheme (fast, not great for stiff problems), 1 = LSODA (Adams/BSF switcher), 2 = CVODE library (https://computing.llnl.gov/projects/sundials. Default 0.  : 0\n",
      "initial_abundance_mix : initial abundance mixture: 0=AG89, 1=Karakas 2002, 2=Lodders 2003, 3=Asplund 2005 (not available?), 4=Garcia Berro, 5=Grevesse Noels 1993 : 0\n",
      "init_abund : Usage: --init_abund <i> <X>. Sets the initial abundance of isotope number <i> to mass fraction <X>. : 0.02\n",
      "init_abund_mult : Usage: --init_abund_mult <i> <f>. Multiplies the initial abundance of isotope number <i> by <f>. : 1.0\n",
      "init_abund_dex : Usage: --init_abund_dex <i> <f>. Changes the initial abundance of isotope number <i> by <f> dex. : 0.0\n",
      "init_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
      "initial_abunds_only : If True, outputs only the initial abundances, then exits. : (null)\n",
      "no_thermohaline_mixing : If True, disables thermohaline mixing. : (null)\n",
      "lithium_GB_post_Heflash : Sets the lithium abundances after the helium flash. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
      "lithium_GB_post_1DUP : Sets the lithium abundance after first dredge up. Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
      "lithium_hbb_multiplier : Multiplies the lithium abundances on the AGB during HBB (based on Karakas/Fishlock et al models).Requires NUCSYN and LITHIUM_TABLES. : (null)\n",
      "angelou_lithium_decay_function : Functional form which describes Li7 decay. Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Choices are : 0 expoential (see angelou_lithium_decay_time). : (null)\n",
      "angelou_lithium_LMMS_time : Time at which lithium manufacture is triggered in a low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_MS_time : Time at which lithium manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_HG_time : Time at which lithium manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_GB_time : Time at which lithium manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_CHeB_time : Time at which lithium manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_EAGB_time : Time at which lithium manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_TPAGB_time : Time at which lithium manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_LMMS_decay_time : Decay time for surface lithium abundance during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_MS_decay_time : Decay time for surface lithium abundance on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_HG_decay_time : Decay time for surface lithium abundance on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_GB_decay_time : Decay time for surface lithium abundance on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_CHeB_decay_time : Decay time for surface lithium abundance during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_EAGB_decay_time : Decay time for surface lithium abundance on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_TPAGB_decay_time : Decay time for surface lithium abundance on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_LMMS_massfrac : Lithium mass fraction when its manufacture is triggered during the low-mass (convective) main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_MS_massfrac : Lithium mass fraction when its manufacture is triggered on the main sequence (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_HG_massfrac : Lithium mass fraction when its manufacture is triggered on the Hertzsprung gap (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_GB_massfrac : Lithium mass fraction when its manufacture is triggered on the giant branch (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_CHeB_massfrac : Lithium mass fraction when its manufacture is triggered during core helium burning (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_EAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the early AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_TPAGB_massfrac : Lithium mass fraction when its manufacture is triggered on the thermally pulsing AGB (Myr). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0 (for the start, use 1e-6).\n",
      " : (null)\n",
      "angelou_lithium_vrot_trigger : Equatorial rotational velocity at which lithium manufacture is triggered (km/s). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
      " : (null)\n",
      "angelou_lithium_vrotfrac_trigger : Fraction of Keplerian (breakup) equatorial rotational velocity at which lithium manufacture is triggered (must be <1, ignored if 0). Requires NUCSYN and NUCSYN_ANGELOU_LITHIUM. Ignored if 0.\n",
      " : (null)\n",
      "\n",
      "############################################################\n",
      "##### Section Output\n",
      "############################################################\n",
      "david_logging_function : Function to choose which kind of information gets logged Requires DAVID. Choices are: 0= None, >0 for custom logging functions : Ignore\n",
      "cf_amanda_log : Enable logging to compare to Amanda's models. : (null)\n",
      "float_overflow_checks : Turn on to enable floating-point overflow checks at the end of each timestep, if they are available. 0=off, 1=warn (stderr) on failure, 2=exit on failure (0) : (null)\n",
      "save_pre_events_stardata : Enable this to save a copy of stardata to stardata->pre_events_stardata just before an event. : (null)\n",
      "disable_end_logging : Disable the logging that happens at the end of the evolution. : (null)\n",
      "ensemble : Turn on ensemble calculations and output. : (null)\n",
      "ensemble_filters_off : Sets all ensemble filters to be off (FALSE) - these can then be enabled one-by-one with --ensemble_filter_[...] TRUE. : (null)\n",
      "ensemble_filter_%d : Turn on or off ensemble filter <n>. For a list of filters, see ensemble_macros.h. : (null)\n",
      "ensemble_legacy_ensemble : Turn on ensemble legacy population output. : (null)\n",
      "legacy_yields : Turn on ensemble legacy yield output. : (null)\n",
      "ensemble_defer : Defer ensemble output. : (null)\n",
      "ensemble_dt : When doing ensemble calculations, data are stored and/or output every ensemble_dt Myr. See also ensemble, ensemble_logdt, ensemble_startlogtime. : (null)\n",
      "ensemble_logdt : When doing ensemble calculations, and when logensembletimes is set, the ensemble is stored/output every ensemble_logdt Myr. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
      "ensemble_startlogtime : Start log ensemble data storage/calculations/output at ensemble_startlogtime. See also ensemble, ensemble_dt, ensemble_startlogtime. : (null)\n",
      "ensemble_logtimes : When doing ensemble calculations/output, set this to act at log times rather than linear times. : (null)\n",
      "postagb_legacy_logging : Turn on post-AGB legacy logging. : (null)\n",
      "disc_legacy_logging : Turn on disc legacy logging. : (null)\n",
      "EMP_logg_maximum : Maximum logg that EMP stars are allowed to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_minimum_age. : (null)\n",
      "EMP_minimum_age : Minimum age that EMP stars are required to have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum. : (null)\n",
      "EMP_feh_maximum : Maximum [Fe/H] that an EMP stars may have. See Izzard et al 2009. See also CEMP_cfe_minimum, NEMP_nfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default -2.0. : (null)\n",
      "CEMP_cfe_minimum : Minimum [C/Fe] that CEMP stars are required to have. See Izzard et al 2009. See also NEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 0.7. : (null)\n",
      "NEMP_cfe_minimum : Minimum [N/Fe] that NEMP stars are required to have. See Izzard et al 2009, Pols et al. 2012. See also CEMP_cfe_minimum, EMP_logg_maximum, EMP_minimum_age. Default 1.0. : (null)\n",
      "thick_disc_start_age : Lookback time for the start of the thick disc star formation, e.g. 13e3 Myr. Units = Myr. : (null)\n",
      "thick_disc_end_age : Lookback time for the end of the thick disc star formation, e.g. 4e3 Myr. Units = Myr. : (null)\n",
      "thick_disc_logg_min : Minimum logg for thick disc giants to be logged. : (null)\n",
      "thick_disc_logg_max : Maximum logg for thick disc giants to be logged. : (null)\n",
      "escape_velocity : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 1e9 km/s. See also escape_fraction. : (null)\n",
      "escape_fraction : A parameter used in constructing galactic chemical evolution (GCE) models. If the stellar wind velocity exceeds this value, any chemical yield from the wind is ignored, i.e. assumed lost. (km/s) Requires NUCSYN_GCE_OUTFLOW_CHECKS. Default 0.0. See also escape_velocity. : (null)\n",
      "colour_log : If set to True, thelog is coloured with ANSI colour formatting. Requires FILE_LOG to be defined. : \n",
      "log_filename : Location of the output logging filename. If set to \"/dev/null\" then there is no logging. : \n",
      "stopfile : File which, when it exists, will stop the current binary_c repeat run. : \n",
      "stardata_dump_filename : Location of the stardata dump file. : \n",
      "stardata_load_filename : Location of the stardata file to load. : \n",
      "api_log_filename_prefix : Location of the output logging filename prefix for the API. If set to \"/dev/null\" then there is no logging. : 0\n",
      "hrdiag_output : Set to True to output high time-resolution Hertzstrpung-Russell diagram information. Requires HRDIAG. : (null)\n",
      "internal_buffering : Experimental. Set to non-zero values to implement internal buffering prior to output. For use with binary_grid, you shouldn't really be playing with this. : (null)\n",
      "eccentric_RLOF_model : Chooses which model is used to handle eccentric RLOF. Default is RLOF_ECCENTRIC_AS_CIRCULAR, i.e. ignore the eccentricity. Note: requires force_corotation_of_primary_and_orbit to be FALSE.\n",
      " : (null)\n",
      "force_circularization_on_RLOF : If True forces circularization of stars and orbit when RLOF starts, this is as in the BSE algorithm. (True) : (null)\n",
      "wtts_log : If True, enables log file output for WTTS2. : (null)\n",
      "fabian_imf_log_time : Time at which to output for Fabian Schneider's IMF project. Requires FABIAN_IMF_LOG : Ignore\n",
      "fabian_imf_log_timestep : Timestep for Fabian Schneider's IMF project logging. Requires FABIAN_IMF_LOG : Ignore\n",
      "version : Display binary_c version and build information. Also performs timing tests. : Ignore\n",
      "dumpversion : Display binary_c version number (short format). : Ignore\n",
      "version_only : Display binary_c version number and build information, but do not perform timing tests or anything that requires stardata to be non-NULL. : Ignore\n",
      "\n",
      "############################################################\n",
      "##### Section Input\n",
      "############################################################\n",
      "MINT_dir : Location of MINT algorithm data. : \n",
      "MINT_data_cleanup : Activate checks on incoming data to try to account for problems. Will make data-loading slower, but may fix a few things. : \n",
      "MINT_MS_rejuvenation : Turn on or off (hydrogen) main-sequence rejuvenation. : \n",
      "MINT_remesh : Turn on or off MINT's remeshing. : \n",
      "MINT_use_ZAMS_profiles : Use chemical profiles at the ZAMS if MINT_use_ZAMS_profiles is TRUE, otherwise set homogeneous abundances. (Default is TRUE, so we use the profiles if they are available.) : \n",
      "MINT_disable_grid_load_warnings : Use this to explicitly disable MINT's warnings when loading a grid with, e.g., missing or too much data. : \n",
      "MINT_Kippenhahn : Turn on or off MINT's Kippenhahn diagrams. If 0, off, if 1, output star 1 (index 0), if 2 output star 2 (index 1). Default 0. : \n",
      "MINT_Kippenhahn_stellar_type : Stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for which Kippenhahn plot data should be output. : \n",
      "MINT_Kippenhahn_companion_stellar_type : Companion stellar type selector for Kippenhahn plots. Set to -1 to ignore, otherwise the stellar type number for the companion for which Kippenhahn plot data should be output. : \n",
      "MINT_nuclear_burning : Turn on or off MINT's nuclear burning algorithm. : \n",
      "MINT_minimum_shell_mass : Minimum shell mass in MINT's nuclear burning routines. : \n",
      "MINT_maximum_shell_mass : Maximum shell mass in MINT's nuclear burning routines. : \n",
      "\n",
      "############################################################\n",
      "##### Section I/O\n",
      "############################################################\n",
      "go : batchmode control command : Ignore\n",
      "gogo : batchmode control command : Ignore\n",
      "reset_stars : Reset the star structures. Used in batchmode : Ignore\n",
      "reset_stars_defaults : Reset the star structures and set defaults. Used in batchmode : Ignore\n",
      "defaults : Reset all defaults. Used in batchmode : Ignore\n",
      "echo : Activate batchmode command echoing, i.e. when you enter a command, binary_c repeats the command then executes it. : Ignore\n",
      "noecho : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
      "noechonow : Deactivate batchmode command echoing. See 'echo'. : Ignore\n",
      "bye : Quit binary_c. Used in batchmode. : Ignore\n",
      "fin : batchmode control command : Ignore\n",
      "reset_prefs : Reset preferences struct. Used in batchmode : Ignore\n",
      "status : Output batchmode status information. : Ignore\n",
      "\n",
      "############################################################\n",
      "##### Section Algorithms\n",
      "############################################################\n",
      "repeat : If > 1, repeats the system as many times as required. Handy if you're using Monte-Carlo kicks and want to sample the parameter space well. Also, if you are running speed tests this is good to give a statistically more reasonable result. (See e.g. 'tbse pgo'). : (null)\n",
      "random_systems : Experimental. Use this to apply random initial system parameters (masses, separations, etc.). Useful for testing only. : (null)\n",
      "\n",
      "############################################################\n",
      "##### Section Misc\n",
      "############################################################\n",
      "random_seed : Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
      "random_systems_seed : Random number seed for the generation of random systems. See random_systems and random_seed. : (null)\n",
      "random_skip : Skip the first <random_seed> random numbers that are generated. Usually this is 0 so they are all used. : (null)\n",
      "idum : [NB: deprecated, please use 'random_seed' instead.] Random number seed, usually a (possibly negative) integer. Useful for exactly reproducing the evolution of a system which involves a kick (which is a Monte-Carlo, i.e. pseudorandom, process). : (null)\n",
      "reverse_time : Make time go backwards. To be considered very experimental! : (null)\n",
      "start_time : Start time for the simulation. : (null)\n",
      "warmup_cpu : Uses the CPU at maximum power the given number of seconds, prior to running normal stellar evolution. : Ignore\n",
      "help : Display help pages. Usage: --help <help topic>. : Ignore\n",
      "argopts : Display argument options. Usage: --argopts <argument>. : Ignore\n",
      "help_all : Display all help pages. : Ignore\n",
      "list_args : Display list of arguments with their default values. Useful for batchmode. : Ignore\n",
      "\n"
     ]
    }
   ],
   "source": [
    "print(_binary_c_bindings.return_help_all())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bfec32cf-7240-4a82-ac30-b3d99a018a28",
   "metadata": {},
   "source": [
    "We can get all the parameter names and their default values with return_arglines(): (abridged output)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "3d29ca9d-ac66-4f9e-81cf-2edd14a98b79",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "__ARG_BEGIN\n",
      "metallicity = 0.02\n",
      "effective_metallicity = -1\n",
      "M_1 = 0\n"
     ]
    }
   ],
   "source": [
    "print('\\n'.join(_binary_c_bindings.return_arglines().splitlines()[:4]))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e8b1c8b6-a878-43f4-bc36-1b20b3e66c6f",
   "metadata": {},
   "source": [
    "Lastly, we can ask binary_c to determine the minimum period or maximum mass for RLOF at the ZAMS: Both of them need an argstring as input"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e517f561-09c6-419d-ba89-d9cb61e6ebab",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MINIMUM SEPARATION 0.31\n",
      "MINIMUM PERIOD 0.00632092\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Here we set up the argument string that is passed to the bindings\n",
    "argstring = \"\"\"\n",
    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
    "\"\"\".format(\n",
    "    M_1=10,\n",
    "    orbital_period=4500,\n",
    "    eccentricity=0.0,\n",
    "    metallicity=0.02,\n",
    "    max_evolution_time=15000,\n",
    ").strip()\n",
    "\n",
    "#\n",
    "output = _binary_c_bindings.return_minimum_orbit_for_RLOF(argstring, store_capsule=store_memaddr)\n",
    "print(output)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "7da75a95-8831-4346-a584-e042ced75249",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MAXIMUM MASS RATIO 0.0141\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Here we set up the argument string that is passed to the bindings\n",
    "argstring = \"\"\"\n",
    "binary_c M_1 {M_1} orbital_period {orbital_period} eccentricity {eccentricity} metallicity {metallicity} max_evolution_time {max_evolution_time}\n",
    "\"\"\".format(\n",
    "    M_1=5,\n",
    "    M_2=1,\n",
    "    orbital_period=0.0001,\n",
    "    eccentricity=0.0,\n",
    "    metallicity=0.02,\n",
    "    max_evolution_time=15000,\n",
    ").strip()\n",
    "\n",
    "#\n",
    "output = _binary_c_bindings.return_maximum_mass_ratio_for_RLOF(argstring)\n",
    "print(output)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "5fe52d8e-1721-4796-a856-002cf4525d96",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
