@@ -2599,23 +2599,91 @@ class MVLRelax52Set(VaspInputSet):
2599
2599
_valid_potcars : Sequence [str ] | None = ("PBE_52" , "PBE_54" , "PBE_64" )
2600
2600
2601
2601
2602
- class MITNEBSet (VaspInputSet ):
2602
+ @dataclass
2603
+ class MITMDSet (VaspInputSet ):
2604
+ """Write a VASP MD run. This DOES NOT do multiple stage runs.
2605
+
2606
+ Args:
2607
+ structure (Structure): Input structure.
2608
+ start_temp (float): Starting temperature.
2609
+ end_temp (float): Final temperature.
2610
+ nsteps (int): Number of time steps for simulations. NSW parameter.
2611
+ time_step (float): The time step for the simulation. The POTIM
2612
+ parameter. Defaults to 2fs.
2613
+ spin_polarized (bool): Whether to do spin polarized calculations.
2614
+ The ISPIN parameter. Defaults to False.
2615
+ **kwargs: Other kwargs supported by VaspInputSet.
2616
+ """
2617
+
2618
+ structure : Structure | None = None
2619
+ start_temp : float = 0.0
2620
+ end_temp : float = 300.0
2621
+ nsteps : int = 1000
2622
+ time_step : float = 2
2623
+ spin_polarized : bool = False
2624
+ CONFIG = MITRelaxSet .CONFIG
2625
+
2626
+ @property
2627
+ def incar_updates (self ) -> dict [str , Any ]:
2628
+ """Updates to the INCAR config for this calculation type."""
2629
+ # MD default settings
2630
+ return {
2631
+ "TEBEG" : self .start_temp ,
2632
+ "TEEND" : self .end_temp ,
2633
+ "NSW" : self .nsteps ,
2634
+ "EDIFF_PER_ATOM" : 0.000001 ,
2635
+ "LSCALU" : False ,
2636
+ "LCHARG" : False ,
2637
+ "LPLANE" : False ,
2638
+ "LWAVE" : True ,
2639
+ "ISMEAR" : 0 ,
2640
+ "NELMIN" : 4 ,
2641
+ "LREAL" : True ,
2642
+ "BMIX" : 1 ,
2643
+ "MAXMIX" : 20 ,
2644
+ "NELM" : 500 ,
2645
+ "NSIM" : 4 ,
2646
+ "ISYM" : 0 ,
2647
+ "ISIF" : 0 ,
2648
+ "IBRION" : 0 ,
2649
+ "NBLOCK" : 1 ,
2650
+ "KBLOCK" : 100 ,
2651
+ "SMASS" : 0 ,
2652
+ "POTIM" : self .time_step ,
2653
+ "PREC" : "Low" ,
2654
+ "ISPIN" : 2 if self .spin_polarized else 1 ,
2655
+ "LDAU" : False ,
2656
+ "ENCUT" : None ,
2657
+ }
2658
+
2659
+ @property
2660
+ def kpoints_updates (self ) -> Kpoints :
2661
+ """Updates to the kpoints configuration for this calculation type."""
2662
+ return Kpoints .gamma_automatic ()
2663
+
2664
+
2665
+ class NEBSet (VaspInputSet ):
2603
2666
"""Write NEB inputs.
2604
2667
2605
2668
Note that EDIFF is not on a per atom basis for this input set.
2606
2669
"""
2607
2670
2608
- def __init__ (self , structures : list [Structure ], unset_encut : bool = False , ** kwargs ) -> None :
2671
+ def __init__ (
2672
+ self , structures : list [Structure ], unset_encut : bool = False , parent_set = "MPRelaxSet" , ** kwargs
2673
+ ) -> None :
2609
2674
"""
2610
2675
Args:
2611
2676
structures: List of Structure objects.
2612
2677
unset_encut (bool): Whether to unset ENCUT.
2678
+ parent_set (str): The parent input set to inherit from. Defaults to MPRelaxSet. This should be a string
2679
+ name to support MSONable.
2613
2680
**kwargs: Other kwargs supported by VaspInputSet.
2614
2681
"""
2615
2682
if len (structures ) < 3 :
2616
2683
raise ValueError (f"You need at least 3 structures for an NEB, got { len (structures )} " )
2617
2684
kwargs ["sort_structure" ] = False
2618
- super ().__init__ (structures [0 ], MITRelaxSet .CONFIG , ** kwargs )
2685
+ self .parent = globals ()[parent_set ]
2686
+ super ().__init__ (structures [0 ], self .parent .CONFIG , ** kwargs )
2619
2687
self .structures = self ._process_structures (structures )
2620
2688
2621
2689
self .unset_encut = False
@@ -2634,6 +2702,7 @@ def __init__(self, structures: list[Structure], unset_encut: bool = False, **kwa
2634
2702
"LDAU" : False ,
2635
2703
}
2636
2704
self ._config_dict ["INCAR" ].update (defaults )
2705
+ self .parent_set = parent_set
2637
2706
2638
2707
@property
2639
2708
def poscar (self ) -> Poscar :
@@ -2698,7 +2767,7 @@ def write_input(
2698
2767
if write_cif :
2699
2768
poscar .structure .to (filename = str (d / f"{ idx } .cif" ))
2700
2769
if write_endpoint_inputs :
2701
- end_point_param = MITRelaxSet (self .structures [0 ], user_incar_settings = self .user_incar_settings )
2770
+ end_point_param = self . parent (self .structures [0 ], user_incar_settings = self .user_incar_settings )
2702
2771
2703
2772
for image in ("00" , str (len (self .structures ) - 1 ).zfill (2 )):
2704
2773
end_point_param .incar .write_file (str (output_dir / image / "INCAR" ))
@@ -2715,67 +2784,59 @@ def write_input(
2715
2784
neb_path .to (filename = f"{ output_dir } /path.cif" )
2716
2785
2717
2786
2718
- @dataclass
2719
- class MITMDSet (VaspInputSet ):
2720
- """Write a VASP MD run. This DOES NOT do multiple stage runs.
2721
-
2722
- Args:
2723
- structure (Structure): Input structure.
2724
- start_temp (float): Starting temperature.
2725
- end_temp (float): Final temperature.
2726
- nsteps (int): Number of time steps for simulations. NSW parameter.
2727
- time_step (float): The time step for the simulation. The POTIM
2728
- parameter. Defaults to 2fs.
2729
- spin_polarized (bool): Whether to do spin polarized calculations.
2730
- The ISPIN parameter. Defaults to False.
2731
- **kwargs: Other kwargs supported by VaspInputSet.
2787
+ class CINEBSet (NEBSet ):
2788
+ """
2789
+ MAVRL-tested settings for CI-NEB calculations. Note that these parameters
2790
+ requires the VTST modification of VASP from the Henkelman group. See
2791
+ http://theory.cm.utexas.edu/vtsttools/.
2732
2792
"""
2733
2793
2734
- structure : Structure | None = None
2735
- start_temp : float = 0.0
2736
- end_temp : float = 300.0
2737
- nsteps : int = 1000
2738
- time_step : float = 2
2739
- spin_polarized : bool = False
2740
- CONFIG = MITRelaxSet . CONFIG
2794
+ def __init__ ( self , structures : list [ Structure ], ** kwargs ) -> None :
2795
+ r"""
2796
+ Args:
2797
+ structures: Input structures.
2798
+ **kwargs: Keyword args supported by VaspInputSets.
2799
+ """
2800
+ user_incar_settings = kwargs . get ( "user_incar_settings" , {})
2741
2801
2742
- @property
2743
- def incar_updates (self ) -> dict [str , Any ]:
2744
- """Updates to the INCAR config for this calculation type."""
2745
- # MD default settings
2746
- return {
2747
- "TEBEG" : self .start_temp ,
2748
- "TEEND" : self .end_temp ,
2749
- "NSW" : self .nsteps ,
2750
- "EDIFF_PER_ATOM" : 0.000001 ,
2751
- "LSCALU" : False ,
2752
- "LCHARG" : False ,
2753
- "LPLANE" : False ,
2754
- "LWAVE" : True ,
2802
+ # CI-NEB settings
2803
+ defaults = {
2804
+ "EDIFF" : 5e-5 ,
2805
+ "EDIFFG" : - 0.02 ,
2806
+ "IBRION" : 3 ,
2807
+ "ICHAIN" : 0 ,
2808
+ "IOPT" : 1 ,
2809
+ "ISIF" : 2 ,
2755
2810
"ISMEAR" : 0 ,
2756
- "NELMIN" : 4 ,
2757
- "LREAL" : True ,
2758
- "BMIX" : 1 ,
2759
- "MAXMIX" : 20 ,
2760
- "NELM" : 500 ,
2761
- "NSIM" : 4 ,
2762
- "ISYM" : 0 ,
2763
- "ISIF" : 0 ,
2764
- "IBRION" : 0 ,
2765
- "NBLOCK" : 1 ,
2766
- "KBLOCK" : 100 ,
2767
- "SMASS" : 0 ,
2768
- "POTIM" : self .time_step ,
2769
- "PREC" : "Low" ,
2770
- "ISPIN" : 2 if self .spin_polarized else 1 ,
2811
+ "ISPIN" : 2 ,
2812
+ "LCHARG" : False ,
2813
+ "LCLIMB" : True ,
2771
2814
"LDAU" : False ,
2772
- "ENCUT" : None ,
2815
+ "LORBIT" : 0 ,
2816
+ "NSW" : 200 ,
2817
+ "POTIM" : 0 ,
2818
+ "SPRING" : - 5 ,
2773
2819
}
2820
+ if user_incar_settings != {}:
2821
+ defaults .update (user_incar_settings )
2774
2822
2775
- @property
2776
- def kpoints_updates (self ) -> Kpoints :
2777
- """Updates to the kpoints configuration for this calculation type."""
2778
- return Kpoints .gamma_automatic ()
2823
+ kwargs ["user_incar_settings" ] = defaults
2824
+
2825
+ super ().__init__ (structures , ** kwargs )
2826
+
2827
+
2828
+ class MITNEBSet (NEBSet ):
2829
+ """
2830
+ NEBSet using MITRelaxSet as parent. Retained for compatibility.
2831
+ """
2832
+
2833
+ def __init__ (self , structures : list [Structure ], ** kwargs ) -> None :
2834
+ """
2835
+ Args:
2836
+ structures: List of Structure objects.
2837
+ **kwargs: Other kwargs supported by VaspInputSet.
2838
+ """
2839
+ super ().__init__ (structures , parent_set = "MITRelaxSet" , ** kwargs )
2779
2840
2780
2841
2781
2842
@dataclass
0 commit comments