text: the method for inhibiting the formation of hydrocarbon hydrates of the present disclosure preferably uses quaternary ammonium compound in which q has formula r 1 r 2 r 3 r 4 n + where r 1 , r 2 , r 3 , r 4 are , each independently , linear or branched , substituted or unsubstituted , c 3 - c 25 alkyl , alkenyl or alkyl ether groups , or substituted or unsubstituted aryl groups . more preferably at least two of r 1 , r 2 , r 3 , r 4 are linear or branched , substituted or unsubstituted , c 3 - c 6 alkyl groups , one of r 1 , r 2 , r 3 , r 4 is a propenyl group and one of r 1 , r 2 , r 3 , r 4 is a propyl ether group where the c2 bears a — oh group and the c3 bears a linear or branched , substituted or unsubstituted , c 4 - c 22 alkyloxy group . most preferably two of r 1 , r 2 , r 3 , r 4 are butyl groups , one of r 1 , r 2 , r 3 , r 4 is a propenyl group , and one of r 1 , r 2 , r 3 , r 4 is a propyl ether group where the c3 bears a linear c 12 - 14 alkyloxy group . according to a preferred embodiment in step i . the quaternary ammonium halide qx is reacted with a metal hydroxide m ( oh ) x in this embodiment , step i . may be carried out according to the method described in u . s . pat . no . 5 , 760 , 088 ( lonza inc ., us ) for the preparation of wood preservative systems comprising quaternary ammonium compounds ( that are typically dimethyl di - fatty alkyl - and trimethyl fatty alkyl - ammonium compounds ). in one preferred embodiment , the starting quaternary ammonium halide is a quaternary ammonium chloride and the metal halide which is formed in step i . is a metal chloride . the metal of the metal hydroxide of step i . is a mono -, bi -, or trivalent metal ; preferably the metal hydroxide is an alkali metal hydroxide such as sodium hydroxide or potassium hydroxide , potassium hydroxide being the most preferred metal hydroxide . the amount of metal hydroxide to be used in step i . is a stoichiometric amount with respect to the quaternary ammonium chloride reactant . a stoichiometric excess of metal hydroxide ranging from about 2 % to about 20 % excess may also be used to increase the yield , as it is suggested in u . s . pat . no . 5 , 760 , 088 . according to another embodiment , in step i . the quaternary ammonium halide qx is reacted with a metal salt ma , in which the anion is not a halide anion . the metal of the metal salt ma of step i . is a mono -, bi -, or trivalent metal ; preferably the metal is an alkali metal , such as sodium or potassium . in principle , the metal salt ma may be the salt of any organic or inorganic acid ( ah ). metal salts from mixture of organic and inorganic acid may also be used . preferred metal salts from organic acid salts are metal salts of carboxylic acids , such as glycolic acid , acetic acid , formic acid , benzoic acid , lactic acid , stearic acid , oxalic acid , and the like . metal salts from di - and poly - carboxylic acids , such as succinic acid , maleic acid , citric acid , phthalic acid , adipic acid , and from organic sulfonic acids , such as methane sulfonic acid and toluenesulfonic acid , may also be used . preferred metal salts from inorganic acids are the partial or total salts of carbonic acid ( co 2 ), phosphoric acid , sulfuric acid , nitric acid . according to this embodiment , preferably in step i . the quaternary ammonium hydroxide qoh is reacted with an alkali metal salt of co 2 , formic acid , acetic acid or oxalic acid , more preferably with anhydrous potassium acetate . step i . is typically performed at 20 - 80 ° c . for 1 - 5 hours , under stirring . the metal halide formed in step i . precipitates and may be easily removed directly after step i ., i . e . by filtration or the like , yielding a quaternary ammonium hydroxide dissolved in the solvent that has been used to carry out the reaction of step i ., which is preferably methanol , ethanol , n - propanol , isopropanol , n - butanol , isobutanol , t - butanol , or mixture thereof . alternatively , the metal chloride formed in step i . may be removed from the solution of quaternary ammonium hydroxide by adding water and separating the aqueous solution which is formed and contains most of the metal chloride which is present in the reaction mixture . the quaternary ammonium hydroxide which may be obtained from step i . is a very strong base that may decompose both oxidatively and thermally through hofmann elimination , that originates tertiary amine , water and olefin . as a consequence , although quaternary ammonium hydroxides are reported to perform as gas hydrate inhibitors too , it is preferable to neutralize them in order to obtain the non corrosive , quaternary ammonium compounds q + a − that may be used as such for inhibiting the formation of hydrocarbon hydrates . according to u . s . pat . no . 5 , 438 , 034 ( lonza inc ., us ) dialkyldimethyl ammonium carbonates or bicarbonates may be obtained from the corresponding hydroxides and may be used for preserving wood substrates . analogously , the quaternary ammonium hydroxide q + oh − may be reacted with an organic or inorganic acid ah , which is different from a hydrogen halide , to form a quaternary ammonium compound q + a − ( step ii .) step ii . may be performed after having removed the metal halide or directly on the heterogeneous mixture which is obtained from step i . in principle any organic or inorganic acid may be used in step ii . mixture of organic and inorganic acids may also be used . preferred organic acids are carboxylic acids , such as glycolic acid , acetic acid , formic acid , benzoic acid , lactic acid , stearic acid , oxalic acid , and the like . di - and poly - carboxylic acids , such as succinic acid , maleic acid , citric acid , phthalic acid , adipic acid , and organic sulfonic acids , such as methanesulfonic acid and toluenesulfonic acid , may also be used . preferred inorganic acids are carbonic acid ( co 2 ), phosphoric acid , sulfuric acid , nitric acid . according to a preferred embodiment in step ii . the quaternary ammonium hydroxide q + oh − is reacted with an acid selected among co 2 , formic acid , acetic acid and oxalic acid . the reaction of step ii . takes place at 20 - 50 ° c . for 30 min .- 2 hours , under stirring . a stoichiometric amount of acid ( that considers the possible excess of metal hydroxide used in step i .) is generally used . a stoichiometric excess of acid ranging from about 2 % to about 20 % excess may also be used to increase the yield . in case the acid ( s ) is added in the heterogeneous mixture resulting from step i ., the removal of the metal halide which is formed in step i , and the possible salts deriving from the excess of metal hydroxide of step i . may be filtered in a single final step iii . by filtration . the metal halide mx and additional salts may also be removed from the reaction mixture deriving from i . or from ii . by phase separation after addition of water . advantageously , in case the separation of the metal halide is performed by phase separation , addition after step ii . of a water immiscible solvent , such as xylene , and water may help the solubilization of the quaternary ammonium compound in the organic phase and removal of the inorganic undesired salt in the aqueous phase . the following examples illustrate the invention without limitation . all parts and percentage are given by weight unless otherwise indicated . 150 grams ( 0 . 254 mol ) of a 90 % quaternary ammonium chloride of formula r 1 r 2 r 3 r 4 n + cl − in which r 1 and r 2 are butyl , r 3 is allyl and r 4 is 2 - hydroxy - 3 - c 12 - 14 alkoxypropyl ( dbaapc ) in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 60 - 70 ° c . for two hours . the mixture was then allowed to cool to room temperature and finally cooled to 5 ° c . potassium chloride precipitated and the precipitate was collected on vacuum filter . the solid was washed with cold ethanol and subsequently was dried , yielding 21 grams ( calculated yield 19 grams ) of dry potassium chloride . the filtrate was a yellow liquid containing the quaternary ammonium hydroxide and less than 0 . 1 % quaternary ammonium chloride . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 60 °- 70 ° c . for two hours . the mixture was then allowed to cool to room temperature and finally cooled to 5 ° c . potassium chloride precipitated and the precipitate was collected on vacuum filter . the solid was washed with cold ethanol and subsequently was dried , yielding 21 grams ( calculated yield 19 grams ) of dry potassium chloride . the ethanolic solution of quaternary ammonium hydroxide containing about 0 . 066 mol of unreacted koh , was stirred while carbon dioxide was bubbled over one hour . the resultant mixture was then filtered to remove 5 . 2 grams of potassium carbonate ( 4 . 5 grams calculated ) yielding a yellow liquid containing the quaternary ammonium carbonate and less than 0 . 1 % quaternary ammonium chloride . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 50 ° c . for one hour . potassium chloride precipitated and the precipitate was collected on vacuum filter . the solid was washed with cold ethanol and subsequently was dried , yielding 21 grams ( calculated yield 19 grams ) of dry potassium chloride . the ethanolic solution of quaternary ammonium hydroxide containing about 0 . 066 mol of unreacted koh , was stirred while carbon dioxide was bubbled over one hour . the resultant mixture was then filtered yielding a yellow liquid . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 25 ° c . for one hour . potassium chloride precipitated and the precipitate was collected on vacuum filter . the solid was washed with cold ethanol and subsequently was dried , yielding 21 grams ( calculated yield 19 grams ) of dry potassium chloride . the ethanolic solution of quaternary ammonium hydroxide containing about 0 . 066 mol of unreacted koh , was stirred while carbon dioxide was bubbled over one hour . the resultant mixture was then filtered yielding a yellow liquid . the procedure of example 2 is followed , substituting 120 ml of ethanol for methanol . the procedure of example 2 is followed , substituting 120 ml of ethanol for isopropanol . the procedure of example 2 is followed , substituting 120 ml of ethanol for n - propanol . the procedure of example 2 is followed , substituting 0 . 32 mole of koh for naoh . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 60 °- 70 ° c . for two hours . the mixture was then allowed to cool to room temperature and finally cooled to 5 ° c . potassium chloride precipitated and the precipitate was collected on vacuum filter . the solid was washed with cold ethanol and subsequently was dried , yielding 21 grams ( calculated yield 19 grams ) of dry potassium chloride . the ethanolic solution of quaternary ammonium hydroxide containing about 0 . 066 mol of unreacted koh , was mixed with a stoichiometric amount ( 0 . 32 mol , 17 . 33 g ) of formic acid 85 % and stirred at 50 ° c . for 2 hours . the resultant mixture was then filtered to yield a yellow liquid . the procedure of example 9 is followed , substituting formic acid for acetic acid . the procedure of example 9 is followed , substituting formic acid for nitric acid . the procedure of example 9 is followed , substituting formic acid for sulfuric acid . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous isopropanol and 21 grams ( 0 . 32 mol ) of 85 % potassium hydroxide pellets ( 18 grams of koh ) were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer . the mixture was stirred and heated at 60 °- 70 ° c . for two hours . the mixture was then allowed to cool to room temperature and finally cooled to 5 ° c . the solution of quaternary ammonium hydroxide containing about 0 . 066 mol of unreacted koh , was mixed with a stoichiometric amount ( 0 . 32 mol , 17 . 33 g ) of formic acid 85 % and stirred at 50 ° c . for 2 hours . the mixture was washed with 35 grams of water dissolving the precipitate and the aqueous phase separated using a separatory funnel . the organic phase was collected to yield a yellow liquid . the procedure of example 13 is followed , substituting formic acid for acetic acid . the procedure of example 13 is followed , substituting formic acid for nitric acid . the procedure of example 13 is followed , substituting formic acid for sulfuric acid . 150 grams ( 0 . 254 mol ) of 90 % dbaapc in 10 % isopropanol ( 135 grams of quaternary ammonium halide ), 120 ml of anhydrous ethanol , and a stoichiometric excess ( 31 grams , 0 . 32 mol ) of anhydrous potassium acetate were mixed in a flask that was purged with nitrogen and equipped with a heating mantle and magnetic stirrer , and a condenser . the mixture was stirred and heated at 60 °- 70 ° c . for two hours . the insoluble potassium acetate crystals slowly dissolved and a fine solid ( kcl ) separated . the mixture was then cooled to 5 ° c . and vacuum filtered to yield a yellow liquid .