Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Did you set the 'IdealGasRosenbluthWeight'?

Since every flexible model changes the reference chemical potential, the IdealGasRosenbluthWeight needs to be explicitly computed using a simulation of a single molecule in an empty box, and then used as the reference in the adsorption simulation.
22
General / Re: Issue with ExtraFrameworkMolecule
« Last post by David Dubbeldam on December 23, 2020, 09:09:27 PM »
I re-ran "examples/Non-Basic/MC_Adsorption_of_CO2_in_LTA4A_Sodium" without problems.
There was however a small memory-issue which could affect this, so you could retry with version 2.0.40.

But usually "illegal instruction" is related to the compiler, for example compiling on intel-type A and then running on intel-type B.
23
Input files and parameters / Re: Flexible and chiral molecules
« Last post by David Dubbeldam on December 23, 2020, 07:38:15 PM »
Did you define a flexible-ring? (RASPA can not handle flexible rings).
24
Input files and parameters / Re: Miture Grand canonical MC Fugacity
« Last post by David Dubbeldam on December 23, 2020, 07:35:52 PM »
See the example: Non-Basic/Adsorption_of_Binary_mixture_CO2_CH4_in_IRMOF-1
You specify total pressure and mol-fractions. Partial fugacities are computed and written to the output-file.


ExternalTemperature 300.0
ExternalPressure  10e5

Component 0 MoleculeName               CO2
            MolFraction                0.25

Component 1 MoleculeName               methane
            MolFraction                0.75
25
Bug reports / Re: Charge Equilibration leads to Segmentation Fault
« Last post by David Dubbeldam on December 23, 2020, 07:31:05 PM »
Most likely it is related to the encoding of your cif-file (i.e. newline and carriage return which differed between windows and Mac/linux).

Framework[CurrentSystem].Atoms[CurrentFramework].Type
The type seems be nonsensical, so the error must be during the reading of the cif-file.

To quickly debug, run with 1x1x1 and 'ChargeFromChargeEquilibration    no', and then check in the output-file that the file is read properly.
26
Bug reports / Re: Charge Equilibration leads to Segmentation Fault
« Last post by neumannrf on December 23, 2020, 05:40:17 PM »
In a similar test, the Segmentation Fault crash also happened with a positive Type = 993687961, so it's not just negative indexes.
27
Bug reports / Charge Equilibration leads to Segmentation Fault
« Last post by neumannrf on December 23, 2020, 04:26:56 PM »
Hello everyone! Happy holidays!

I have been using RASPA for the past few months, and recently I started incorporating the charge equilibration feature in my simulation pipeline. Initially, everything went fine, but then I started having problems.

When the ChargeFromChargeEquilibration option is set to yes, the simulation crashes with a Segmentation Fault for some (but not all) CIF files.

One example of a CIF file that leads to a crash is TER.cif from the Database of Zeolite Structures: https://asia.iza-structure.org/IZA-SC/cif/TER.cif.

The simulation.input file is as simple as
Code: [Select]
SimulationType                  MonteCarlo
NumberOfCycles                  0
Framework                       0
FrameworkName                   TER
UnitCells                       3 2 2

ChargeFromChargeEquilibration   yes
ChargeEquilibrationPeriodic     yes
ChargeEquilibrationEwald        yes
SymmetrizeFrameworkCharges      no

The purpose of this MonteCarlo simulation is simply to create a new CIF file containing a 3x2x2 supercell with P1 symmetry.

To help with debugging, I recompiled RASPA v2.0.39 with CFLAGS="-w -ggdb -O0" and executed

Code: [Select]
gdb ~/RASPA2-2.0.39/bin/simulate

(gdb) run
Starting program: ~/RASPA2-2.0.39/bin/simulate
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6492e18 in __strcpy_sse2_unaligned () from /lib64/libc.so.6

(gdb) bt
#0  0x00007ffff6492e18 in __strcpy_sse2_unaligned () from /lib64/libc.so.6
#1  0x00007ffff718e543 in WriteFrameworkDefinitionShell (string=0x7ffff7bff6f8 "initial") at framework.c:2103
#2  0x00007ffff793de5e in run (inputData=0x408910 "simulation.input", inputCrystal=0x408930 "",
    raspaDir=0x7fffffffd8cb "~/RASPA2-2.0.39/", stream=false) at run.c:101
#3  0x00000000004013e1 in main (argc=1, argv=0x7fffffffd398) at main.c:106

(gdb) frame 1
#1  0x00007ffff718e543 in WriteFrameworkDefinitionShell (string=0x7ffff7bff6f8 "initial") at framework.c:2103
2103         strcpy(symbol,PseudoAtoms[Type].ChemicalElement);

(gdb) p Type
$2 = -415391835

(gdb) p PseudoAtoms[Type].ChemicalElement
Cannot access memory at address 0xffffffce7b817de4

The source of the Segmentation Fault seems to be that we are trying to access the PseudoAtoms array at a negative index (Type = -415391835), which does not exist. This occurs at https://github.com/iRASPA/RASPA2/blob/master/src/framework.c#L2103.

So I investigated further why/where the Type index variable was set to a negative value and found it at https://github.com/iRASPA/RASPA2/blob/master/src/framework.c#L2101.

Code: [Select]
(gdb) p CurrentSystem
$3 = 0

(gdb) p CurrentFramework
$4 = 0

(gdb) p i
$5 = 0

(gdb) p Framework[CurrentSystem].Atoms[CurrentFramework][i].Type
$6 = -415391835

gdb) p Framework[CurrentSystem].Atoms[CurrentFramework][i]
$14 = {
    "Type": -415391835,
    "Charge": 0.10504292071040217,
    "CFVDWScalingParameter": 0.60642472553108762,
    "CFChargeScalingParameter": -0.79514090088772649,
    "CFStoredScalingParameter": 0.99604382482586074,
    "Modified": 159528,
    "OriginalType": -1078542400,
    "CreationState": -845529396,
    "AssymetricType": 1068764949,
    "temp": 0.99692550651848566,
    "Position": {
        "x": 0.42480330804058136,
        "y": 0.9052856728556895,
        "z": -0.13602553641904541
    },
    "AnisotropicPosition": {
        "x": 0.99070533128772031,
        "y": 0.93363353366682034,
        "z": -0.35822956998662936
    },
    "ReferencePosition": {
        "x": -0.73270495495271304,
        "y": -0.68054643411580806,
        "z": 0.9831752294314593
    },
    "ReferenceAnisotropicPosition": {
        "x": 0.18266490695368287,
        "y": 0.74724584781165182,
        "z": 0.6645476980083872
    },
    "RattleReferencePosition": {
        "x": 0.99913704083225319,
        "y": -0.041535209605439771,
        "z": 0.93363353366682034
    },
    "Velocity": {
        "x": -0.35822956998662936,
        "y": 0.74724584781165182,
        "z": 0.6645476980083872
    },
    "ReferenceVelocity": {
        "x": 0.99913704083225319,
        "y": -0.041535209605439771,
        "z": 0.93363353366682034
    },
    "Force": {
        "x": -0.35822956998662936,
        "y": 0.74724584781165182,
        "z": 0.6645476980083872
    },
    "ReferenceForce": {
        "x": 0.99913704083225319,
        "y": -0.041535209605439771,
        "z": 0.93363353366682034
    },
    "RattleGradient": {
        "x": -0.35822956998662936,
        "y": 0.74724584781165182,
        "z": 0.6645476980083872
    },
    "ElectricField": {
        "x": 0.99913704083225319,
        "y": -0.041535209605439771,
        "z": 0.93363353366682034
    },
    "ReferenceElectricField": {
        "x": -0.35822956998662936,
        "y": 0.75562487546411949,
        "z": 0.65500461645688624
    },
    "InducedElectricField": {
        "x": -0.50000000000000122,
        "y": -0.86602540378443804,
        "z": -0.50000000000000122
    },
    "InducedDipole": {
        "x": -0.86602540378443804,
        "y": -0.50000000000000122,
        "z": -0.86602540378443804
    },
    "HessianIndex": {
        "x": 11,
        "y": -1075838976,
        "z": -396866395
    },
    "HessianAtomIndex": -1075071366,
    "Fixed": {
        "x": -1725695833,
        "y": -1075481023,
        "z": 1040166342
    }
}

I notice that both Type and OriginalType are negative, but AssymetricType is positive.

I have read here several times that is typically something in the CIF files that generates these Segmentation Faults. I also agree that is probably easier to fix the non-standard CIF rather than implementing safeguards in the code to deal with rare situations. I hope that I was able to pinpoint the issue well enough to make it easier for the experts identify its origin. I also posted this as an issue in the RASPA Github repository for proper documentation.

Is there anything we can do (preferably) to the CIF file (otherwise, to the code itself) to prevent this Segmentation Fault from happening?
28
Input files and parameters / Re: Miture Grand canonical MC Fugacity
« Last post by Christopher on December 21, 2020, 02:48:45 PM »
I just solved my problem.

When entering a fugacity coefficient the Molfraction still has to be specified otherwise raspa uses default values and sets them to equimolar fractions. I thougt that the molefraction is already represented in the fugacity coefficient but since the reservoir is an ideal gas this should not be the case. Anyway keep in mind to specify Molfractions when simulated mixture in GCMC simulation is not equimolar.

best Christopher
29
Input files and parameters / Flexible and chiral molecules
« Last post by bz475 on December 18, 2020, 07:31:13 PM »
Hello everyone,

I am trying to use flexible molecule models and simulate the adsorption process of these molecules into a MOF. Then I have this error message:
Code: [Select]
Error: no energy conservation in internal MC scheme (Bend 121.689515)The parameter following 'Bend' changes in every simulation.

The component section in my .input file looks like this:
Code: [Select]
Component 0 MoleculeName                  ibuprofen_flex_try
            MoleculeDefinition            local
            StartingBead                  2
            IdealRosenbluthValue          1.0
            WidomProbability              1.0
            CreateNumberOfMolecules       0
            Intra14VDWScalingValue        0.5
            Intra14ChargeChargeScalingValue   0.5

I defined a chiral center in my .def file because ibuprofen is a chiral molecule:
Code: [Select]
# Chiral centers Bond BondDipoles Bend UrayBradley InvBend Torsion Imp. Torsion Bond/Bond Stretch/Bend Bend/Bend Stretch/Torsion Bend/Torsion IntraVDW IntraCoulomb
               1    33            0    58           0      0        80           7         0            0         0               0            0         0            0
# chiral center
5 10 12 11 L
It seems that only four atoms can be read, including the chiral center. Then how do I decide the combination and the sequence of these atoms?

I set the ibuprofen group as rigid accidentally but I don't have the error and the simulation runs perfectly. Does that make sense? Does anyone know how to fix it? Thank you.
30
Input files and parameters / Miture Grand canonical MC Fugacity
« Last post by Christopher on December 18, 2020, 06:51:24 PM »
Dear RASPA fellows,

I want to do a Simulation in the Grand canonical ensemble in a COF. So the thermodynamic state is already chosen and I want to specify a fugacity coefficient that I calculated with PC-SAFT EOS.

The coefficient is already calculated in a mixture let's say 0.8 Molfrac methane and 0.2 Molfrac butane.

How do i correctly put in all necessary things. I think need:
ExternalPressure
FugacityCoefficient
MolFraction
IdealGasRosenbluthweight (for butane while methane is 1.)

Why do I have to specify the molfrac? Is this input fine now?
Best Christopher
Pages: 1 2 [3] 4 5 ... 10