Пример #1
0
void CorrectorStepS ()
{
  real cr[] = {3.,10.,-1.}, cv[] = {7.,6.,-1.}, div = 24., wr, wv;
  int n;

  wr = Sqr (deltaT) / div;
  wv = deltaT / div;
  DO_MOL {
    CS (x);
    CSV (x);
    CS (y);
    CSV (y);
    CS (z);
    CSV (z);
  }
}
Пример #2
0
FreeMillerLibrary::FreeMillerLibrary(std::string filename, double maxResolution)
{
    double freeProportion = FileParser::getKey("FREE_MILLER_FRACTION", 0.05);
    int spaceGroup = FileParser::getKey("SPACE_GROUP", 0);
    std::vector<double> unitCell = FileParser::getKey("UNIT_CELL", std::vector<double>());

    if (spaceGroup == 0)
    {
        std::cout << "Space group is unassigned! Please assign your space group using the command SPACE_GROUP in order to generate a free Miller set during refinement." << std::endl;
        exit(1);
    }

    if (unitCell.size() == 0)
    {
        std::cout << "Please specify the UNIT_CELL in order to generate a free Miller set during refinement." << std::endl;
        exit(1);
    }

    UnitCellLatticePtr lattice = UnitCellLatticePtr(new UnitCellLattice(unitCell[0], unitCell[1], unitCell[2],
                                 unitCell[3], unitCell[4], unitCell[5], spaceGroup, maxResolution));

    for (int i = 0; i < lattice->standardVectorCount(); i++)
    {
        vec3<int> oneVec = lattice->intVector(i);

        double randomNumber = rand() / (double)RAND_MAX;

        if (randomNumber < freeProportion)
        {
            freeIndices.push_back(oneVec);
        }
    }

    if (filename != "")
    {
        CSV csv = CSV(3, "h", "k", "l");

        for (int i = 0; i < freeIndexCount(); i++)
        {
            csv.addEntry(0, (double)freeIndices[i][0], (double)freeIndices[i][1], (double)freeIndices[i][2]);
        }

        csv.writeToFile(filename);
    }
}
Пример #3
0
static UDataTable* CreateGameplayDataTable()
{
	FString CSV(TEXT(",Tag,CategoryText,"));
	CSV.Append(TEXT("\r\n0,Damage"));
	CSV.Append(TEXT("\r\n1,Damage.Basic"));
	CSV.Append(TEXT("\r\n2,Damage.Type1"));
	CSV.Append(TEXT("\r\n3,Damage.Type2"));
	CSV.Append(TEXT("\r\n4,Damage.Reduce"));
	CSV.Append(TEXT("\r\n5,Damage.Buffable"));
	CSV.Append(TEXT("\r\n6,Damage.Buff"));
	CSV.Append(TEXT("\r\n7,Damage.Physical"));
	CSV.Append(TEXT("\r\n8,Damage.Fire"));
	CSV.Append(TEXT("\r\n9,Damage.Buffed.FireBuff"));
	CSV.Append(TEXT("\r\n10,Damage.Mitigated.Armor"));
	CSV.Append(TEXT("\r\n11,Lifesteal"));
	CSV.Append(TEXT("\r\n12,Shield"));
	CSV.Append(TEXT("\r\n13,Buff"));
	CSV.Append(TEXT("\r\n14,Immune"));
	CSV.Append(TEXT("\r\n15,FireDamage"));
	CSV.Append(TEXT("\r\n16,ShieldAbsorb"));
	CSV.Append(TEXT("\r\n17,Stackable"));
	CSV.Append(TEXT("\r\n18,Stack"));
	CSV.Append(TEXT("\r\n19,Stack.CappedNumber"));
	CSV.Append(TEXT("\r\n20,Stack.DiminishingReturns"));
	CSV.Append(TEXT("\r\n21,Protect.Damage"));
	CSV.Append(TEXT("\r\n22,SpellDmg.Buff"));
	CSV.Append(TEXT("\r\n23,GameplayCue.Burning"));

	auto DataTable = NewObject<UDataTable>(GetTransientPackage(), FName(TEXT("TempDataTable")));
	DataTable->RowStruct = FGameplayTagTableRow::StaticStruct();
	DataTable->CreateTableFromCSVString(CSV);

	FGameplayTagTableRow * Row = (FGameplayTagTableRow*)DataTable->RowMap["0"];
	if (Row)
	{
		check(Row->Tag == TEXT("Damage"));
	}
	return DataTable;
}