text:
COVID-19 vaccine distribution continues to rollout for Ventura and Santa Barbara County
A sign on Princeton Ave. in Moorpark alerts people to social distancing measures during the coronavirus pandemic on May 13, 2020. Photo Credit: Justin Downes
By Karla Vazquez
[Update] As of Feb. 9, Ventura County is now allowing persons aged 65 and older can make an appointment to receive the vaccine.
On Jan. 28, 2021 Senator Monique Limón, Congressman Salud Carbajal and Assembly member Steve Bennett hosted a virtual town hall to talk about the COVID-19 vaccine. Public Health experts talked about the safety, effectiveness, and phases of the vaccine distribution. The COVID-19 vaccine rollout has begun in the State of California.
The State of California has vaccinated more than 3 million residents. As of Feb. 1, 2021, the total doses administered in Ventura County is 73,480 and in Santa Barbara County is 38,334. To make sure the pace of vaccination increases, the state launched the MyTurn website. The site will help California residents make vaccination appointments, find out if they are eligible for the COVID-19 vaccine and if they are ineligible they can sign up to be notified when they become eligible.
Dr. Van-Do-Reynoso speaks at virtual town hall meeting about the COVID-19 response in Santa Barbara County in a Zoom call on Jan. 28, 2021. Photo credit: Karla Vazquez
Dr. Van Do-Reynoso, Santa Barbara County Public Health Department Director, explained the effectiveness of the MyTurn platform.
"(Providers can use) the platform to schedule vaccination clinics, to enroll community members and to record the vaccinations so that it becomes a very seamless process." Do-Reynoso said. "The state is moving towards this new third party administration… in order to more quickly distribute vaccines to our community members as well as collect the data that is needed."
Last week Santa Barbara received 44,825 vaccines for the county. Of the allocation that the county has received, approximately 80% is to hospitals, community clinics, medical providers, and pharmacies. The remaining 20% public health allocation is being used to for community vaccination sites in Santa Barbara, Lompoc, and Santa Maria. Currently, Santa Barbara County is offering vaccines to people 75 years old and above, as well as healthcare workers with current direct patient contact.
Do-Reynoso touched upon the 65 plus criteria other counties throughout California are using and Santa Barbara County's current distribution plan.
"It is frustrating to see other counties offering that, but because of our limited number of vaccines, and because of our data of whose vulnerable in our community to becoming very sick and suffering severe outcomes, fatal outcomes, even we as a community, in partnership with our health care providers, decided to make the decision to focus on the most vulnerable segments of our community, and that is at this point the 75 plus," Do-Reynoso said.
Barry L. Zimmerman, Chief Deputy Director of the Ventura County Health Care Agency, spoke about the efforts Ventura County is doing and the similarities with Santa Barbara County.
"Our goal is to get back seems to those who are at highest risk. And to start off, we too have limited our access to 75 and older population, which in our county has proven to be the highest risk and the most likely that end in a death within the hospital, if they are hospitalized," Zimmerman explained.
Representatives of Santa Barbara and Ventura County discussed the rollout of the vaccines on Jan. 28, 202 over Zoom. Photo credit: Karla Vazquez
The primary way for an individual to get access to an appointment and a vaccination center is through the county's website or venturacountyrecovers.org. For those who do not have access to a computer, internet, or may have language barriers, they can call the local registration center at 805-477-7161. The local registration center will help individuals register, have access to multiple languages, and address individuals who are trying to get appointments.
At the federal level, the United States President Joe Biden, plans to utilize the Defense Production Act to help expedite and expand the supply of vaccines. President Biden has set an ambitious goal of fully vaccinating 300 million Americans plus, nearly the entire US population, by the end of the summer or early fall.
Congressman Salud Carbajal, addressed the COVID-19 response to date.
"As we move forward, finally with a cohesive and strategic national COVID-19 response, we must address the deficiencies and inadequacies of the response to date," Carbajal said. "We cannot change the past, but we can develop and implement an effective and collaborative national strategy once and for all, with our state and local communities moving forward."
Karla Vazquez, News Desk Editor
Karla Vazquez is a communications student and a first year staff writer for the Moorpark Reporter. She enjoys writing, sports, and watching documentaries. Vazquez plans to transfer to a four-year university to earn her B.A and become a journalist.


The prospect of gambling brings to mind the glittering lights of Las Vegas, but its real home is a dingy RSL club in Western Sydney. Here, countless desperate folks see their only chance at escape within the tawdry reels of what is euphemistically called 'gaming'. These dens of inequity ensnare the poor, the uneducated and pensioners with little to live for but the promise of riches through feedback specifically designed to trick players into taking just one more spin. Loyalty programs turn saps into VIPs and give them a free spin every visit to re-engage those gambling faculties and maintain the addiction cycle. Australia leads the world in gambling spend per person, thanks to these obiquitous poker machines. We spend $1,273 per adult each year on gambling in this country. More than half of this expenditure is taken up by the particularly loathsome category of poker machines.
Australia has the second highest number of poker machines in the world, 195,631 at last count which places us second only to the USA (but with a much higher number per capita). This makes one poker machine for every 95 adults. Of those machines, nearly half are in New South Wales, which records an abominable machine per 65 people. Consequently, the average New South Welsh adult loses $1,580 per year gambling(roughly 2/3 of that on the pokies), or about $30 every week. We lose $23.7B each year on a turnover of $204B to the gambling industry. To put these numbers in perspective, the agriculture industry earned profits before tax, depreciation, etc of $21.1B last year, while the construction industry earned $43.2B.
What these statistics conceal however is that not all of us gamble. The HILDA survey found that 8.1% of Australians play poker machines once or more a month. So neglecting the (likely only small) losses of irregular players, each poker machine player loses $8,023 a year on the pokies alone. Eight thousand bucks per person per year, so more than the average household spends on electricity, gas, clothing, footwear and telecommunications combined! Losses per player are likely higher within NSW alone, but HILDA doesn't break down participation to state levels. Even worse, the HILDA survey asked gamblers how much they thought they spent on a monthly basis. Pokie players underreported their losses by a factor of six compared with the industry data, demonstrating how the tricks of the machines cause addicts to lose track of their spending.
HILDA does break down demographics, so we can see who these players are. Poker machine gamblers are disproportionately poorer, less educated, more likely to be indigenous, of lower socio-economic status, older and more likely to be on government assistance than the general population. So those who are compelled to throw their money away are also those who can least afford it. Pokies steal from the poor addicts and give to the rich owners of these suburban casinos, who are commonly professional sporting teams. This isn't just a moral issue, but also one of social justice.
How have we got to the point where pokie addicts each sacrifice eight thousand dollars every year to these one armed bandits? Governments are well aware of the clear and present harm which they are doing to the community, with multiple studies undertaken and maverick NXT leader Nick Xenophon starting his career as a 'No Pokies Independent'. One major problem is that state governments have themselves become addicted to the taxes pokies bring in. Government revenue from gambling comes to $6B across the country, making up around 8% of taxation taken in by the governments of New South Wales, Victoria, Queensland, South Australia and Tasmania and 12% in the NT. Both major parties have also been given hefty donations from hotels and clubs, with $6.6M donated to Labor and $4.4M to the Liberal and National parties since 1998. This includes $3M just from Clubs NSW (split $1.2M to Labor and $1.8M to the LNP), the statewide representative group for the clubs which hold most of these machines. So there is quite an incentive to maintain the status quo.
Is it any wonder that the government's committment to problem gamblers focuses entirely on overseas online sports betting, which accounts for only a small sliver of the gambling pie? Or that the most recent Productivity Commission report into gambling found that "people's willingness to pay for gambling over alternative products reveals their underlying preferences" rather than addiction and so "gambling provides significant enjoyment for many Australians", in a classic case of the economist's ignorance of reality? Both governments and the parties who run them have been entirely captured by this callous industry which sells an illusion of glamour coating an exploitative core.
The election of Donald Trump was the rebel yell of the forgotten seeking an alternative to the neoliberal status quo. Any alternative. He not only smashed the overton window, campaigning on policies which were outside the narrow acceptable margins, but his manner was also entirely outside the established norms. For a press which is more used to challenging politicians on procedural rather than policy grounds, these mannerisms were particularly offensive. Democratic pundits and pollsters refused to believe that such a man could win. When faced with the choice between four more years of status quo neoliberalism and a loose cannon promising to drain the swamp, the disenfranchised masses opted for the Trump, hoping for a wrecking ball.
The liberal press and democratic establishment still refused to believe it. An odious man who refused to hide his racism and sexism behind any of the obligatory smokescreens could not beat their golden girl, the pre-ordained first woman president. In the world of Red Brand versus Blue Brand, each occupying the sensible centre with a different sales pitch, such a result was unthinkable. So they rejected reality and substituted their own.
The conservative right understood that politics was a class war rather than a beauty pageant, as demonstrated by the rise of the Tea Party. The liberal media and political establishment instead had so thoroughly oriented themselves towards the market that even elections were understood as a marketplace of ideas, one where facts and reasonableness would outshine emotional appeals. Educated coastal elites saw Trump's statements fact-checked and the charlatanry at the core of his being digested by the media. But desperate folks in the rust belt left behind by neoliberalism only saw a successful man promising that he alone could fix their problems. Whatever his faults, he offered the strugglers something different, the chance of something better. With the status quo offering only continued despair, these folks grabbed onto the only life-raft they were offered.
If America was already great, as the Clinton campaign asserted, then there would be no reason for these folks to make such a desperate choice. With Democrats having controlled the presidency for 16 of the past 24 years, the degredation of the rust belt couldn't be palmed off as the fault of the conservatives. It was the direct result of neoliberalism; of the third way policies which liberals had espoused. Their governance, supposedly from the left, had driven the poor to such desperation that they were willing to burn it down and start again. This was understandably hard for the liberal establishment to accept.
But what if the people didn't really vote for Trump? Then the illusion could be maintained, the crippling effects of neoliberalism on communities could be ignored again. America was already great so the electoral college couldn't be blamed, nor the other absurdities of the voting system (Tuesday elections, first past the post, etc). The problem had to be international. 'Fake News' provided an initial suggestion – scammers from Macedonia were duping Americans with misinformation. But between the adoption of the term by Trump against those who criticised him and the generally dreadful quality of the US media, this couldn't be sustained.
Who had they been trained from birth to fear? The Soviet Union. Nothing riles up Americans like a good old fashioned red scare. Despite the absence of anything remotely socialist in modern Russia (thanks in part to US support for Yeltsin selling off the state to his oligarchic mates), Putin's KGB history provided enough connection to tap into a fear which has been built at a cultural level. So the spectre of Russian hacking was invoked, which went down a treat with the public. Throw in any past connections between Trump and Russia to demonstrate this, and you've got a media show which can go on for months. America is already great, our neoliberal policies are fine, but our nefarious enemies will do anything to stop us.
Updates on the Mueller investigation are given pride of place daily in the American media, with much of the remaining space for politics taken up with disgust at Trump's Twitter feed for breaking political norms. This has effectively crowded out discussion of what the regime is actually doing, which is mostly the very same neoliberalism the Democrats support. The Trump administration sells weapons to Saudi Arabia to use in their war on Yemen. So did Obama. Trump gave a massive tax cut to business. Obama cut tax on business too. By moving the focus to Russian interference, the liberal and media establishment can avoid discussing the failures of neoliberalism which Trump continues to perpetuate. By avoiding policy, they starve the oxygen from other challenges to the status quo. Massive corporate donations to the Democrats would be lost without support for neoliberalism, while the media is increasingly owned by oligarchs who favour business interests.
Russia probably did try to influence the election. Anything which shows democracy as chaotic supports Putin's autocratic rule at home, and a reality TV star as US President certainly fits in that category (as does Brexit). But to suppose that this is a calamitous injustice as the extent of coverage suggests is to be willfully ignorant of recent history. The Soviet Union didn't just post fake tweets, it actively ran political parties promoting its interests overseas. But while the Soviet/Russian state interfered in 36 foreign elections between the end of World War 2 and 2000, one other country managed more than double that number, with 81. That other country? The United States of America.
US interference in the affairs of other nations goes far beyond just intervening in elections to support their interests. The American state apparatus has supported coup after coup, from Iran to Guatemala, Chile to Grenada and across the world. For the US establishment to suddenly consider Russian email hacking to be beyond the pale shows either complete ignorance or breathtaking hypocrisy. But when their media has continually downplayed the extent of US involvement in these actions, one can understand the American public playing along. The conflation of freedom and free markets has propagandised these folks to believe the US is the capital of democracy rather than of the unrepentent capitalism which has driven 13% of their population into poverty. So they swallow the line and wait with baited breath for each update on the Mueller investigation, hoping that this leak will be the one which sinks Trump. Then democracy and civility will be restored, as a less vulgar Republican continues with the policies which drive the shrinking middle class into destitution.
Some more photos of birds.


If an envoy of local business bigwigs and Minneapolis boosters were convincing enough yesterday the city could host the MLB All-Star Game, Super Bowl and Final Four within a span of five years.
The NCAA will announce which of eight finalist cities will host the Final Four from 2017-2020 on Friday. Minnesota Sports Facilities Authority Chair Michele Kelm-Helgen said the presentation "went off without a hitch" when we caught up with her on her way home from the presentation to the NCAA in Indianapolis.
The pitch was centered around the city's big, shiny new stadium, the walkability of downtown Minneapolis and its connection to St. Paul and Bloomington via light rail.
Minneapolis' team had an hour to try to convince the NCAA, as opposed to only 12 minutes for the Super Bowl bid, which they won in May.
Kelm-Helgen said the package they offered did not include the same level of concessions it offered for the Super Bowl.
"Mainly we just provide our venues. We don't - their staff come in and rent hotel rooms, but they don't ask for anything to be specifically provided," she said.
Festivities would run for almost a week, with an fan fair called 'Bracket Town' taking over the Convention Center for four days and a three-day March Madness Music Festival happening around town.
The Commons, which is what the city is calling the controversial 4.2-acre park on the new stadium's doorstep, would also be booked for the duration of the Final Four.
"These type of events require large exterior event spaces, and that's part of what we were presenting, the fact that we have this large park/plaza space in front of the stadium that they'll have access to for all of their pregame events," said Kelm-Helgen.
Win or lose, the MSFA will release its presentation and videos on Friday after the announcement.


text:
Tunisia News Gazette
Covers all News from Tunisia
Production of eggs for consumption drops by 5.5% in 2021
(TAP)- In 2021, the production of eggs meant for consumption recorded a 5.5% drop compared to 2020, contrary to prices, which increased by 230 millimes per unit as of December 31, 2021, resulting in a 1.2% growth compared to the same month of the previous year.
These data come from the National Observatory of Agriculture (ONAGRI), at a time when pressure is being exerted on the supply and prices of eggs for consumption, prompting the Ministry of Trade to set maximum profit margins.
The ministerial department has announced profit margins of 15 millimes per unit at the wholesale level and 15 millimes per unit at the retail level with the adoption of a maximum price at the public sale level of around 1100 millimes for four eggs.
The Trade Ministry has, in the same context, called on egg producers to strengthen the supply, to meet the needs of supply and accelerate the formation of a buffer stock for Ramadan 2022.
ONAGRI noted that the average monthly price of eggs increased by 16.3% compared to the same month last year, to 229.7 millimes per unit in 2021, against 197.5 millimes per unit in 2020.
The average prices recorded slight volatility at the level of the regions. Indeed, in the south of the country production prices reached 229.8 millimes per unit, followed by the north with 229.7 millimes per unit, then the centre with 229.6 millimes per unit.
The Trade Ministry is working within the framework of a strategy to control the price of eggs for consumption to encourage stakeholders in the distribution channels of eggs to update the declarations of their activities and the patents of the premises of sale and storage within a maximum period not exceeding 31 January 2022.
Source: TAP News Agency
Previous Previous Post: Police reports drafted against several demonstrators in capital, says Interior Ministry
Next Next Post: AFCON 2021: Six Tunisian soccer players test positive for COVID-19
The Argentine news agency "Alternativa Presse Agency" recalled that "for years, various international humanitarian organizations and independent journalists publish articles, with photos and videos,…
Quoted by the Italian news agency "AISE", the Network noted in a statement that "a child soldier was present alongside the Special Envoy of…
© 2021 Tunisia News Gazette. All Rights Reserved

redpajama_set_name: RedPajamaCommonCrawl


Sargacal, Freeform pool with beach entry finished with sandy beach pebble.
Monchique, Freeform pool with Jacuzzi and infinity edge overflowing into children pool with Atlantic Blue pebble.
Monte Rei, Traditional step entry main swimming pool with a an overflow infinity edge with Sandy Beach pebble. Second guest pool overflow with rock feature, finished in Golden sandy Beach pebble.
We cover all of the Algarve including: Albufeira . Alcoutim . Aljezur . Almancil . Alvor . Armação de Perâ . Carvoeiro . Castro Marim . Faro . Guia . Lagoa . Lagos . Loulé . Monchique . Monte Gordo . Olhão . Portimão . Quarteira . Quinta da Lago . Sagres . São Brás de Alportel . Silves . Tavira . Vale do Lobo . V ila do Bispo . Vilamoura . Vila Real de S. António .
" We would like to thank you and your team at Iberia Blue for your excellent work on our pool. Thanks for the quick and efficient way you worked and your helpful advice..... The pebble looks fantastic by the way!"


Arborea Hotel is a 3.5* hotel located in Guadalajara, Mexico. It features 74 rooms and swimming pools.
Arborea Hotel is located near downtown Guadalajara and features lovely green areas as well as 74 beautifully appointed guestrooms. The extensive onsite facilities include a specialty restaurant and a pharmacy. Guests can also take advantage of free parking.
Arborea Hotel has event areas and wireless Internet access, so you can easily host a celebration and stay in touch with your loved ones back home.


text:
Q: Blank page when accessing page in admin I'm getting a blank page when I click on the page link in the administration in WordPress

/wp-admin/edit.php?post_type=page

It only happens with pages, all the other post types are fine. I have lots of pages, nearly 2000.
Here is what i tried so far without luck:

*

*switching to default theme

*deactivating all plugins

*deactivating revisions in wp-config

Here is some of my php settings:

*

*WP Memory Limit: 256MB

*PHP Post Max Size: 8MB

*PHP Time Limit: 300

*PHP Max Input Vars: 1920

When I turn on WP_debug I get this when I click on pages:
Notice: The called constructor method for WP_Widget is deprecated since  version 4.3.0! Use

__construct()

in /var/www/vhosts/example.com/wp-includes/functions.php on line 3457

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 80 bytes) in /var/www/vhosts/example.com/wp-includes/wp-db.php on line 2258

Any help is appreciated.

A: Seems like Memory issue. Can you please add following in your wp-config.php
define( 'WP_MAX_MEMORY_LIMIT' , '512M' );

Let's know if tihs fixes your memory issue? As currently error is saying 256M memory assigned is not enough for the page to load.

redpajama_set_name: RedPajamaStackExchange


view, understand, and be able to apply all previous apprentice level course videos. gather up all the supplies you need and be prepared to apply this look on yourself or a young model.
color, color, color – this is not your momma's makeup! never before has color made such a statement in fashion, on the runways, and in real life.
knowing when, where, and how to use color is the utmost of importance! an attempt to make a current look with color can go terribly wrong, but when done correctly it allows you to express your creativity and talent.


text:
Parish economy shows little growth
St. Landry Parish collected more in sales taxes in July than ever before but actual economy shows no real growth.
Parish economy shows little growth St. Landry Parish collected more in sales taxes in July than ever before but actual economy shows no real growth. Check out this story on dailyworld.com: https://www.dailyworld.com/story/news/local/2014/08/12/parish-economy-shows-little-growth/13982807/
William Johnson, Louisiana Published 9:03 p.m. CT Aug. 12, 2014
July sales taxes are showing a flat St. Landry economy. (Photo: File )
St. Landry Parish sales tax collections set a record in July, even though the parish economy was basically flat.
Figures released by the St. Landry Parish School Board, which tracks sales tax collections for the parish, indicate that sales tax collections for the month totaled $6.1 million.
This marks the first time in the parish's history that collections have exceeded $6 million.
Although that is good news, it doesn't tell the entire story.
Pushing the total over the top is the new Smooth Road Home tax. The 2-cent sales tax that took effect in January is only collected in the rural portions of the parish to pay for the largest road upgrade effort in the parish's history.
In July that new tax brought in $764,056.93, its highest total to date.
But if that new tax is removed from the total sales tax collections in the rest of parish reported a drop of $65,072.
That decline amounted to only one-tenth of 1 percent. That means the parish's economy was basically flat when compared to last July's total.
For the month, Opelousas, the parish's largest economy, brought in $830,368 in sales taxes — a 1.4 percent increase from the year before. So far this year, Opelousas has shown at least some growth in six of the first seven months.
Eunice, the parish's second largest economy, brought in $451,282, a drop of 3.5 percent from the previous July's total. Eunice has reported only two months this year in which sales tax collections exceeded the previous year's total.
Of the other eight municipalities that collect sales taxes, three were in positive territory for the month, three reported declines and two showed no significant change.
Reporting an increase for the month were Cankton, up 7 percent; Arnaudville, up 5 percent; and Sunset, up 2 percent.
In negative territory for the month were Krotz Springs, down 43 percent; Washington, down 34 percent; and Port Barre, down 15.5 percent.
Sales tax collections in Grand Coteau and Melville reported a slight decline. In both cases the drop amounted to less than one percent when compared to the previous July.
Leonville and Palmetto do not collect sales taxes.
July St. Landry Parish Sale Tax Collections
An increase of $698,984.93
or 13 percent
Read or Share this story: https://www.dailyworld.com/story/news/local/2014/08/12/parish-economy-shows-little-growth/13982807/


text:
import json
import os
import unittest
import warnings
from io import open

from monty.serialization import loadfn
import numpy

from pymatgen.core.lattice import Lattice
from pymatgen.electronic_structure.bandstructure import (
    BandStructureSymmLine,
    Kpoint,
    LobsterBandStructureSymmLine,
    get_reconstructed_band_structure,
)
from pymatgen.electronic_structure.core import Orbital, Spin
from pymatgen.electronic_structure.plotter import BSPlotterProjected
from pymatgen.io.vasp import BSVasprun
from pymatgen.util.testing import PymatgenTest

class KpointTest(unittest.TestCase):
    def setUp(self):
        self.lattice = Lattice.cubic(10.0)
        self.kpoint = Kpoint([0.1, 0.4, -0.5], self.lattice, label="X")

    def test_properties(self):
        self.assertEqual(self.kpoint.frac_coords[0], 0.1)
        self.assertEqual(self.kpoint.frac_coords[1], 0.4)
        self.assertEqual(self.kpoint.frac_coords[2], -0.5)
        self.assertEqual(self.kpoint.a, 0.1)
        self.assertEqual(self.kpoint.b, 0.4)
        self.assertEqual(self.kpoint.c, -0.5)
        self.assertEqual(self.lattice, Lattice.cubic(10.0))
        self.assertEqual(self.kpoint.cart_coords[0], 1.0)
        self.assertEqual(self.kpoint.cart_coords[1], 4.0)
        self.assertEqual(self.kpoint.cart_coords[2], -5.0)
        self.assertEqual(self.kpoint.label, "X")

    def test_as_dict(self):
        self.assertIsInstance(self.kpoint.as_dict()["fcoords"], list)
        self.assertIsInstance(self.kpoint.as_dict()["ccoords"], list)
        self.assertNotIsInstance(self.kpoint.as_dict()["fcoords"][0], numpy.float64)
        self.assertNotIsInstance(self.kpoint.as_dict()["ccoords"][0], numpy.float64)
        self.assertListEqual(self.kpoint.as_dict()["fcoords"], [0.1, 0.4, -0.5])
        self.assertListEqual(self.kpoint.as_dict()["ccoords"], [1.0, 4.0, -5.0])

    def test_from_dict(self):

        d = self.kpoint.as_dict()

        kpoint = Kpoint.from_dict(d)

        self.assertEqual(kpoint.frac_coords[0], 0.1)
        self.assertEqual(kpoint.frac_coords[1], 0.4)
        self.assertEqual(kpoint.frac_coords[2], -0.5)
        self.assertEqual(kpoint.a, 0.1)
        self.assertEqual(kpoint.b, 0.4)
        self.assertEqual(kpoint.c, -0.5)
        self.assertEqual(kpoint.lattice, Lattice.cubic(10.0))
        self.assertEqual(kpoint.cart_coords[0], 1.0)
        self.assertEqual(kpoint.cart_coords[1], 4.0)
        self.assertEqual(kpoint.cart_coords[2], -5.0)
        self.assertEqual(kpoint.label, "X")

class BandStructureSymmLine_test(PymatgenTest):
    def setUp(self):
        self.bs = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "Cu2O_361_bandstructure.json"))
        self.bs2 = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "CaO_2605_bandstructure.json"))
        self.bs_spin = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "NiO_19009_bandstructure.json"))
        self.bs_cbm0 = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "InN_22205_bandstructure.json"))
        self.bs_cu = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "Cu_30_bandstructure.json"))
        self.bs_diff_spins = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "VBr2_971787_bandstructure.json"))
        warnings.simplefilter("ignore")

    def tearDown(self):
        warnings.simplefilter("default")

    def test_basic(self):
        self.assertArrayAlmostEqual(self.bs.projections[Spin.up][10][12][0], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
        self.assertArrayAlmostEqual(
            self.bs.projections[Spin.up][25][0][Orbital.dyz.value],
            [0.0, 0.0, 0.0011, 0.0219, 0.0219, 0.069],
        )
        self.assertAlmostEqual(self.bs.get_projection_on_elements()[Spin.up][25][10]["O"], 0.0328)
        self.assertAlmostEqual(self.bs.get_projection_on_elements()[Spin.up][22][25]["Cu"], 0.8327)
        proj = self.bs.get_projections_on_elements_and_orbitals({"Cu": ["s", "d"]})
        self.assertAlmostEqual(proj[Spin.up][25][0]["Cu"]["s"], 0.0027)
        self.assertAlmostEqual(proj[Spin.up][25][0]["Cu"]["d"], 0.8495999999999999)

        self.assertEqual(self.bs2.nb_bands, 16)
        self.assertAlmostEqual(self.bs2.bands[Spin.up][5][10], 0.5608)
        self.assertAlmostEqual(self.bs2.bands[Spin.up][5][10], 0.5608)
        self.assertEqual(self.bs2.branches[5]["name"], "L-U")
        self.assertEqual(self.bs2.branches[5]["start_index"], 80)
        self.assertEqual(self.bs2.branches[5]["end_index"], 95)
        self.assertAlmostEqual(self.bs2.distance[70], 4.2335127528765737)

        self.assertEqual(self.bs_spin.nb_bands, 27)
        self.assertAlmostEqual(self.bs_spin.bands[Spin.up][5][10], 0.262)
        self.assertAlmostEqual(self.bs_spin.bands[Spin.down][5][10], 1.6156)

    def test_properties(self):
        self.one_kpoint = self.bs2.kpoints[31]
        self.assertEqual(self.one_kpoint.frac_coords[0], 0.5)
        self.assertEqual(self.one_kpoint.frac_coords[1], 0.25)
        self.assertEqual(self.one_kpoint.frac_coords[2], 0.75)
        self.assertAlmostEqual(self.one_kpoint.cart_coords[0], 0.64918757)
        self.assertAlmostEqual(self.one_kpoint.cart_coords[1], 1.29837513)
        self.assertAlmostEqual(self.one_kpoint.cart_coords[2], 0.0)
        self.assertEqual(self.one_kpoint.label, "W")

        self.assertAlmostEqual(self.bs2.efermi, 2.6211967, "wrong fermi energy")

    def test_get_branch(self):
        self.assertAlmostEqual(self.bs2.get_branch(110)[0]["name"], "U-W")

    def test_get_direct_band_gap_dict(self):
        direct_dict = self.bs_diff_spins.get_direct_band_gap_dict()
        self.assertEqual(direct_dict[Spin.down]["value"], 4.5365)

        for bs in [self.bs2, self.bs_spin]:
            dg_dict = bs.get_direct_band_gap_dict()
            for spin, v in bs.bands.items():
                kpt = dg_dict[spin]["kpoint_index"]
                vb, cb = dg_dict[spin]["band_indices"]
                gap = v[cb][kpt] - v[vb][kpt]
                self.assertEqual(gap, dg_dict[spin]["value"])
        self.assertRaises(ValueError, self.bs_cu.get_direct_band_gap_dict)

    def test_get_direct_band_gap(self):
        self.assertAlmostEqual(self.bs2.get_direct_band_gap(), 4.0125999999999999)
        self.assertTrue(self.bs_diff_spins.get_direct_band_gap() > 0)
        self.assertEqual(self.bs_cu.get_direct_band_gap(), 0)

    def test_is_metal(self):
        self.assertFalse(self.bs2.is_metal(), "wrong metal assignment")
        self.assertFalse(self.bs_spin.is_metal(), "wrong metal assignment")
        self.assertTrue(self.bs_cu.is_metal(), "wrong metal assignment")

    def test_get_cbm(self):
        cbm = self.bs2.get_cbm()
        self.assertAlmostEqual(cbm["energy"], 5.8709, "wrong CBM energy")
        self.assertEqual(cbm["band_index"][Spin.up][0], 8, "wrong CBM band index")
        self.assertEqual(cbm["kpoint_index"][0], 15, "wrong CBM kpoint index")
        self.assertEqual(cbm["kpoint"].frac_coords[0], 0.5, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].frac_coords[1], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].frac_coords[2], 0.5, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].label, "X", "wrong CBM kpoint label")
        cbm_spin = self.bs_spin.get_cbm()
        self.assertAlmostEqual(cbm_spin["energy"], 8.0458, "wrong CBM energy")
        self.assertEqual(cbm_spin["band_index"][Spin.up][0], 12, "wrong CBM band index")
        self.assertEqual(len(cbm_spin["band_index"][Spin.down]), 0, "wrong CBM band index")
        self.assertEqual(cbm_spin["kpoint_index"][0], 0, "wrong CBM kpoint index")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[0], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[1], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[2], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].label, "\\Gamma", "wrong CBM kpoint label")

    def test_get_vbm(self):
        vbm = self.bs2.get_vbm()
        self.assertAlmostEqual(vbm["energy"], 2.2361, "wrong VBM energy")
        self.assertEqual(len(vbm["band_index"][Spin.up]), 3, "wrong VBM number of bands")
        self.assertEqual(vbm["band_index"][Spin.up][0], 5, "wrong VBM band index")
        self.assertEqual(vbm["kpoint_index"][0], 0, "wrong VBM kpoint index")
        self.assertEqual(vbm["kpoint"].frac_coords[0], 0.0, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm["kpoint"].frac_coords[1], 0.0, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm["kpoint"].frac_coords[2], 0.0, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm["kpoint"].label, "\\Gamma", "wrong VBM kpoint label")
        vbm_spin = self.bs_spin.get_vbm()
        self.assertAlmostEqual(vbm_spin["energy"], 5.731, "wrong VBM energy")
        self.assertEqual(len(vbm_spin["band_index"][Spin.up]), 2, "wrong VBM number of bands")
        self.assertEqual(len(vbm_spin["band_index"][Spin.down]), 0, "wrong VBM number of bands")
        self.assertEqual(vbm_spin["band_index"][Spin.up][0], 10, "wrong VBM band index")
        self.assertEqual(vbm_spin["kpoint_index"][0], 79, "wrong VBM kpoint index")
        self.assertEqual(vbm_spin["kpoint"].frac_coords[0], 0.5, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm_spin["kpoint"].frac_coords[1], 0.5, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm_spin["kpoint"].frac_coords[2], 0.5, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm_spin["kpoint"].label, "L", "wrong VBM kpoint label")

    def test_get_band_gap(self):
        bg = self.bs2.get_band_gap()
        self.assertAlmostEqual(bg["energy"], 3.6348, "wrong gap energy")
        self.assertEqual(bg["transition"], "\\Gamma-X", "wrong kpoint transition")
        self.assertFalse(bg["direct"], "wrong nature of the gap")
        bg_spin = self.bs_spin.get_band_gap()
        self.assertAlmostEqual(bg_spin["energy"], 2.3148, "wrong gap energy")
        self.assertEqual(bg_spin["transition"], "L-\\Gamma", "wrong kpoint transition")
        self.assertFalse(bg_spin["direct"], "wrong nature of the gap")
        bg_cbm0 = self.bs_cbm0.get_band_gap()
        self.assertAlmostEqual(bg_cbm0["energy"], 0, places=3, msg="wrong gap energy")

    def test_get_sym_eq_kpoints_and_degeneracy(self):
        bs = self.bs2
        cbm_k = bs.get_cbm()["kpoint"].frac_coords
        vbm_k = bs.get_vbm()["kpoint"].frac_coords
        self.assertEqual(bs.get_kpoint_degeneracy(cbm_k), None)
        bs.structure = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "CaO_2605_structure.json"))
        self.assertEqual(bs.get_kpoint_degeneracy(cbm_k), 3)
        self.assertEqual(bs.get_kpoint_degeneracy(vbm_k), 1)
        cbm_eqs = bs.get_sym_eq_kpoints(cbm_k)
        self.assertTrue([0.5, 0.0, 0.5] in cbm_eqs)
        self.assertTrue([0.0, 0.5, 0.5] in cbm_eqs)
        self.assertTrue([0.5, 0.5, 0.0] in cbm_eqs)
        vbm_eqs = bs.get_sym_eq_kpoints(vbm_k)
        self.assertTrue([0.0, 0.0, 0.0] in vbm_eqs)

    def test_as_dict(self):
        s = json.dumps(self.bs.as_dict())
        self.assertIsNotNone(s)
        s = json.dumps(self.bs2.as_dict())
        self.assertIsNotNone(s)
        s = json.dumps(self.bs_spin.as_dict())
        self.assertIsNotNone(s)

    def test_old_format_load(self):
        with open(os.path.join(PymatgenTest.TEST_FILES_DIR, "bs_ZnS_old.json"), "r", encoding="utf-8") as f:
            d = json.load(f)
            bs_old = BandStructureSymmLine.from_dict(d)
            self.assertEqual(bs_old.get_projection_on_elements()[Spin.up][0][0]["Zn"], 0.0971)

class ReconstructBandStructureTest(PymatgenTest):
    def setUp(self):
        self.bs_cu = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "Cu_30_bandstructure.json"))
        self.bs_cu2 = loadfn(os.path.join(PymatgenTest.TEST_FILES_DIR, "Cu_30_bandstructure.json"))
        warnings.simplefilter("ignore")

    def tearDown(self):
        warnings.simplefilter("default")

    def test_reconstruct_band_structure(self):
        bs = get_reconstructed_band_structure([self.bs_cu, self.bs_cu2])
        self.assertEqual(bs.bands[Spin.up].shape, (20, 700), "wrong number of bands or kpoints")

    def test_vasprun_bs(self):
        bsv = BSVasprun(
            os.path.join(PymatgenTest.TEST_FILES_DIR, "vasprun.xml"),
            parse_projected_eigen=True,
            parse_potcar_file=True,
        )
        bs = bsv.get_band_structure(
            kpoints_filename=os.path.join(PymatgenTest.TEST_FILES_DIR, "KPOINTS.band"), line_mode=True
        )
        bs.get_projection_on_elements()

class LobsterBandStructureSymmLine_test(PymatgenTest):
    def setUp(self):
        warnings.simplefilter("ignore")
        with open(
            os.path.join(PymatgenTest.TEST_FILES_DIR, "cohp/Fatband_SiO2/Test_p/lobster_band_structure_spin.json"),
            "r",
        ) as f:
            bs_spin_dict = json.load(f)
        self.bs_spin = LobsterBandStructureSymmLine.from_dict(bs_spin_dict)

        with open(
            os.path.join(PymatgenTest.TEST_FILES_DIR, "cohp/Fatband_SiO2/Test_p/lobster_band_structure.json"),
            "r",
        ) as f:
            bs_dict = json.load(f)
        self.bs_p = LobsterBandStructureSymmLine.from_dict(bs_dict)

    def tearDown(self):
        warnings.simplefilter("default")

    def test_basic(self):
        bs_p = self.bs_p
        bs_spin = self.bs_spin
        self.assertAlmostEqual(bs_p.structure[0].frac_coords[0], 0.0)
        self.assertAlmostEqual(bs_p.structure[0].frac_coords[1], 0.47634315)
        self.assertAlmostEqual(bs_p.structure[0].frac_coords[2], 0.666667)
        self.assertEqual(bs_p.structure[0].species_string, "Si")
        self.assertAlmostEqual(bs_p.structure[0].coords[0], -1.19607309)
        self.assertAlmostEqual(bs_p.structure[0].coords[1], 2.0716597)
        self.assertAlmostEqual(bs_p.structure[0].coords[2], 3.67462144)
        self.assertAlmostEqual(bs_p.efermi, 1.06470288)

        lattice = bs_p.lattice_rec.as_dict()
        self.assertAlmostEqual(lattice["matrix"][0][0], 1.2511575194890285)
        self.assertAlmostEqual(lattice["matrix"][0][1], 0.7223560132915973)
        self.assertAlmostEqual(lattice["matrix"][0][2], 0.0)
        self.assertAlmostEqual(lattice["matrix"][1][0], 0.0)
        self.assertAlmostEqual(lattice["matrix"][1][1], 1.4447123171425553)
        self.assertAlmostEqual(lattice["matrix"][1][2], 0.0)
        self.assertAlmostEqual(lattice["matrix"][2][0], 0.0)
        self.assertAlmostEqual(lattice["matrix"][2][1], 0.0)
        self.assertAlmostEqual(lattice["matrix"][2][2], 1.1399248502312707)
        self.assertAlmostEqual(bs_p.kpoints[8].frac_coords[0], 0.09090909)
        self.assertAlmostEqual(bs_p.kpoints[8].frac_coords[1], 0.0)
        self.assertAlmostEqual(bs_p.kpoints[8].frac_coords[2], 0.0)
        self.assertAlmostEqual(bs_p.kpoints[8].cart_coords[0], 0.11374159)
        self.assertAlmostEqual(bs_p.kpoints[8].cart_coords[1], 0.06566873)
        self.assertAlmostEqual(bs_p.kpoints[8].cart_coords[2], 0.0)
        self.assertAlmostEqual(bs_p.kpoints[50].frac_coords[0], 0.46153846)
        self.assertAlmostEqual(bs_p.kpoints[50].frac_coords[1], 0.07692308)
        self.assertAlmostEqual(bs_p.kpoints[50].frac_coords[2], 0.0)
        self.assertAlmostEqual(bs_p.kpoints[50].cart_coords[0], 0.57745732)
        self.assertAlmostEqual(bs_p.kpoints[50].cart_coords[1], 0.4445268)
        self.assertAlmostEqual(bs_p.kpoints[50].cart_coords[2], 0.0)
        self.assertAlmostEqual(bs_p.distance[30], 0.49251552363382556)
        self.assertTrue(bs_p.branches[0]["name"], "\\Gamma-K")
        self.assertAlmostEqual(bs_p.get_band_gap()["energy"], 5.6739999999999995)
        self.assertAlmostEqual(bs_p.get_projection_on_elements()[Spin.up][0][0]["Si"], 3 * (0.001 + 0.064))
        self.assertAlmostEqual(
            bs_p.get_projections_on_elements_and_orbitals({"Si": ["3p"]})[Spin.up][0][0]["Si"]["3p"],
            0.003,
        )
        self.assertAlmostEqual(
            bs_p.get_projections_on_elements_and_orbitals({"O": ["2p"]})[Spin.up][0][0]["O"]["2p"],
            0.002 * 3 + 0.003 * 3,
        )
        dict_here = bs_p.get_projections_on_elements_and_orbitals({"Si": ["3s", "3p"], "O": ["2s", "2p"]})[Spin.up][0][
            0
        ]
        self.assertAlmostEqual(dict_here["Si"]["3s"], 0.192)
        self.assertAlmostEqual(dict_here["Si"]["3p"], 0.003)
        self.assertAlmostEqual(dict_here["O"]["2s"], 0.792)
        self.assertAlmostEqual(dict_here["O"]["2p"], 0.015)

        self.assertAlmostEqual(
            bs_spin.get_projection_on_elements()[Spin.up][0][0]["Si"],
            3 * (0.001 + 0.064),
        )
        self.assertAlmostEqual(
            bs_spin.get_projections_on_elements_and_orbitals({"Si": ["3p"]})[Spin.up][0][0]["Si"]["3p"],
            0.003,
        )
        self.assertAlmostEqual(
            bs_spin.get_projections_on_elements_and_orbitals({"O": ["2p"]})[Spin.up][0][0]["O"]["2p"],
            0.002 * 3 + 0.003 * 3,
        )

        dict_here = bs_spin.get_projections_on_elements_and_orbitals({"Si": ["3s", "3p"], "O": ["2s", "2p"]})[Spin.up][
            0
        ][0]
        self.assertAlmostEqual(dict_here["Si"]["3s"], 0.192)
        self.assertAlmostEqual(dict_here["Si"]["3p"], 0.003)
        self.assertAlmostEqual(dict_here["O"]["2s"], 0.792)
        self.assertAlmostEqual(dict_here["O"]["2p"], 0.015)
        self.assertAlmostEqual(
            bs_spin.get_projection_on_elements()[Spin.up][0][0]["Si"],
            3 * (0.001 + 0.064),
        )
        self.assertAlmostEqual(
            bs_spin.get_projections_on_elements_and_orbitals({"Si": ["3p"]})[Spin.down][0][0]["Si"]["3p"],
            0.003,
        )
        self.assertAlmostEqual(
            bs_spin.get_projections_on_elements_and_orbitals({"O": ["2p"]})[Spin.down][0][0]["O"]["2p"],
            0.002 * 3 + 0.003 * 3,
        )
        dict_here = bs_spin.get_projections_on_elements_and_orbitals({"Si": ["3s", "3p"], "O": ["2s", "2p"]})[
            Spin.down
        ][0][0]
        self.assertAlmostEqual(dict_here["Si"]["3s"], 0.192)
        self.assertAlmostEqual(dict_here["Si"]["3p"], 0.003)
        self.assertAlmostEqual(dict_here["O"]["2s"], 0.792)
        self.assertAlmostEqual(dict_here["O"]["2p"], 0.015)

    def test_proj_bandstructure_plot(self):
        # make sure that it can be plotted!
        BSPlotterProjected(self.bs_spin).get_elt_projected_plots()
        BSPlotterProjected(self.bs_spin).get_projected_plots_dots({"Si": ["3s"]})

    def test_get_branch(self):
        branch = self.bs_p.get_branch(0)[0]
        self.assertEqual(branch["name"], "\\Gamma-K")
        self.assertEqual(branch["start_index"], 0)
        self.assertEqual(branch["end_index"], 70)
        self.assertEqual(branch["index"], 0)

    def test_get_direct_band_gap_dict(self):
        direct_dict = self.bs_p.get_direct_band_gap_dict()
        self.assertAlmostEqual(direct_dict[Spin.up]["value"], 6.005999999999999)
        self.assertEqual(direct_dict[Spin.up]["kpoint_index"], 0)
        self.assertListEqual(direct_dict[Spin.up]["band_indices"], [22, 24])

        direct_dict = self.bs_spin.get_direct_band_gap_dict()
        self.assertAlmostEqual(direct_dict[Spin.up]["value"], 6.005999999999999)
        self.assertEqual(direct_dict[Spin.up]["kpoint_index"], 0)
        self.assertListEqual(direct_dict[Spin.up]["band_indices"], [22, 24])
        self.assertAlmostEqual(direct_dict[Spin.down]["value"], 6.005999999999999)
        self.assertEqual(direct_dict[Spin.down]["kpoint_index"], 0)
        self.assertListEqual(direct_dict[Spin.down]["band_indices"], [22, 24])

    def test_get_direct_band_gap(self):
        self.assertAlmostEqual(self.bs_p.get_direct_band_gap(), 6.005999999999999)
        self.assertAlmostEqual(self.bs_spin.get_direct_band_gap(), 6.005999999999999)

    def test_is_metal(self):
        self.assertFalse(self.bs_p.is_metal(), "wrong metal assignment")
        self.assertFalse(self.bs_spin.is_metal(), "wrong metal assignment")

    def test_get_cbm(self):
        cbm = self.bs_p.get_cbm()
        self.assertAlmostEqual(cbm["energy"], 6.3037028799999995, "wrong CBM energy")
        self.assertEqual(cbm["band_index"][Spin.up][0], 24, "wrong CBM band index")
        self.assertEqual(cbm["kpoint_index"][0], 0, "wrong CBM kpoint index")
        self.assertEqual(cbm["kpoint"].frac_coords[0], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].frac_coords[1], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].frac_coords[2], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm["kpoint"].label, "\\Gamma", "wrong CBM kpoint label")
        cbm_spin = self.bs_spin.get_cbm()
        self.assertAlmostEqual(cbm_spin["energy"], 6.30370274, "wrong CBM energy")
        self.assertEqual(cbm_spin["band_index"][Spin.up][0], 24, "wrong CBM band index")
        self.assertEqual(len(cbm_spin["band_index"][Spin.down]), 1, "wrong CBM band index")
        self.assertEqual(cbm_spin["kpoint_index"][0], 0, "wrong CBM kpoint index")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[0], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[1], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].frac_coords[2], 0.0, "wrong CBM kpoint frac coords")
        self.assertEqual(cbm_spin["kpoint"].label, "\\Gamma", "wrong CBM kpoint label")

    def test_get_vbm(self):
        vbm = self.bs_p.get_vbm()
        self.assertAlmostEqual(vbm["energy"], 0.62970288, "wrong VBM energy")
        self.assertEqual(len(vbm["band_index"][Spin.up]), 1, "wrong VBM number of bands")
        self.assertEqual(vbm["band_index"][Spin.up][0], 23, "wrong VBM band index")
        self.assertEqual(vbm["kpoint_index"][0], 68, "wrong VBM kpoint index")
        self.assertAlmostEqual(
            vbm["kpoint"].frac_coords[0],
            0.34615384615385,
            "wrong VBM kpoint frac coords",
        )
        self.assertAlmostEqual(
            vbm["kpoint"].frac_coords[1],
            0.30769230769231,
            "wrong VBM kpoint frac coords",
        )
        self.assertAlmostEqual(vbm["kpoint"].frac_coords[2], 0.0, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm["kpoint"].label, None, "wrong VBM kpoint label")
        vbm_spin = self.bs_spin.get_vbm()
        self.assertAlmostEqual(vbm_spin["energy"], 0.6297027399999999, "wrong VBM energy")
        self.assertEqual(len(vbm_spin["band_index"][Spin.up]), 1, "wrong VBM number of bands")
        self.assertEqual(len(vbm_spin["band_index"][Spin.down]), 1, "wrong VBM number of bands")
        self.assertEqual(vbm_spin["band_index"][Spin.up][0], 23, "wrong VBM band index")
        self.assertEqual(vbm_spin["kpoint_index"][0], 68, "wrong VBM kpoint index")
        self.assertAlmostEqual(
            vbm_spin["kpoint"].frac_coords[0],
            0.34615384615385,
            "wrong VBM kpoint frac coords",
        )
        self.assertAlmostEqual(
            vbm_spin["kpoint"].frac_coords[1],
            0.30769230769231,
            "wrong VBM kpoint frac coords",
        )
        self.assertAlmostEqual(vbm_spin["kpoint"].frac_coords[2], 0.0, "wrong VBM kpoint frac coords")
        self.assertEqual(vbm_spin["kpoint"].label, None, "wrong VBM kpoint label")

    def test_get_band_gap(self):
        bg = self.bs_p.get_band_gap()
        self.assertAlmostEqual(bg["energy"], 5.6739999999999995, "wrong gap energy")
        self.assertEqual(bg["transition"], "(0.346,0.308,0.000)-\\Gamma", "wrong kpoint transition")
        self.assertFalse(bg["direct"], "wrong nature of the gap")
        bg_spin = self.bs_spin.get_band_gap()
        self.assertAlmostEqual(bg_spin["energy"], 5.674, "wrong gap energy")
        self.assertEqual(
            bg_spin["transition"],
            "(0.346,0.308,0.000)-\\Gamma",
            "wrong kpoint transition",
        )
        self.assertFalse(bg_spin["direct"], "wrong nature of the gap")

    def test_get_sym_eq_kpoints_and_degeneracy(self):
        bs = self.bs_p
        cbm_k = bs.get_cbm()["kpoint"].frac_coords
        vbm_k = bs.get_vbm()["kpoint"].frac_coords
        self.assertEqual(bs.get_kpoint_degeneracy(cbm_k), 1)
        self.assertEqual(bs.get_kpoint_degeneracy(vbm_k), 3)

    def test_as_dict(self):
        s = json.dumps(self.bs_p.as_dict())
        self.assertIsNotNone(s)
        s = json.dumps(self.bs_spin.as_dict())
        self.assertIsNotNone(s)

    def test_old_format_load(self):
        # this method will use the loading from the old dict
        self.bs_spin.apply_scissor(3.0)

if __name__ == "__main__":
    unittest.main()

redpajama_set_name: RedPajamaGithub