Chloroplast membrane

Chloroplasts contain several important membranes, vital for their function. Like mitochondria, chloroplasts have a double-membrane envelope, called the chloroplast envelope, but unlike mitochondria, chloroplasts also have internal membrane structures called thylakoids. Furthermore, one or two additional membranes may enclose chloroplasts in organisms that underwent secondary endosymbiosis, such as the euglenids and chlorarachniophytes.
The chloroplasts come via endosymbiosis by engulfment of a photosynthetic cyanobacterium by the eukaryotic, already mitochondriate cell. Over millions of years the endosymbiotic cyanobacterium evolved structurally and functionally, retaining its own DNA and the ability to divide by binary fission (not mitotically) but giving up its autonomy by the transfer of some of its genes to the nuclear genome.
Envelope membranes.
Each of the envelope membranes is a lipid bilayer that is between 6 and 8 nm thick. The lipid composition of the outer membrane has been found to be 48% phospholipids, 46% galactolipids and 7% sulfolipids, while the inner membrane has been found to contain 16% phospholipids, 79% galactolipids and 5% sulfolipids in spinach chloroplasts.
The outer membrane is permeable to most ions and metabolites, but the inner membrane of the chloroplast is highly specialised with transport proteins. For example, carbohydrates are transported across the inner envelope membrane by a triose phosphate translocator. The two envelope membranes are separated by a gap of 10–20 nm, called the intermembrane space.
Thylakoid membrane.
Within the envelope membranes, in the region called the stroma, there is a system of interconnecting flattened membrane compartments, called the thylakoids. The thylakoid membrane is quite similar in lipid composition to the inner envelope membrane, containing 78% galactolipids, 15.5% phospholipids and 6.5% sulfolipids in spinach chloroplasts. The thylakoid membrane encloses a single, continuous aqueous compartment called the thylakoid lumen.
These are the sites of light absorption and ATP synthesis, and contain many proteins, including those involved in the electron transport chain. Photosynthetic pigments such as chlorophylls a,b,c and some others, e.g., xanthophylls, carotenoids, phycobilins are also embedded within the granum membrane. With exception of chlorophyll a, all the other associated pigments are "accessory" and transfer energy to the reaction centers, Photosytems I and II.
The membranes of the thylakoid contain photosystems I and II which harvest solar energy to excite electrons which travel down the electron transport chain. This exergonic fall in potential energy along the way is used to draw (not pump!) H+ ions from the lumen of the thylakoid into the cytosol of a cyanobacterium or the stroma of a chloroplast. A steep H+ gradient is formed, which allows chemiosmosis to occur, where the thylakoid, transmenbrane ATP-synthase serves a dual function as a "gate" or channel for H+ ions and a catalytic site for the formation of ATP from ADP + a PO43− ion.
Experiments have shown that the pH within the stroma is about 7.8, while that of the lumen of the thylakoid is 5. This corresponds to a six-hundredfold difference in concentration of H+ ions. The H+ ions pass down through the ATP-synthase catalytic gate. This chemiosmotic phenomenon also occurs in mitochondria.