예제 #1
0
    def __init__(self,
                 ff_file_path,
                 label='compass',
                 pair_cutoff=9.5,
                 kspace=False,
                 **kwargs):
        LAMMPSBase.__init__(self, label, **kwargs)

        self.parameters.units = 'real'

        if kspace:
            self.parameters.pair_style = 'lj/class2/coul/long %f' % pair_cutoff
            self.parameters.kspace_style = 'ewald 0.0001'
        else:
            self.parameters.pair_style = 'lj/class2/coul/cut %f' % pair_cutoff

        self.parameters.bond_style = 'class2'
        self.parameters.angle_style = 'class2'
        self.parameters.dihedral_style = 'class2'
        self.parameters.improper_style = 'class2'
        self.parameters.special_bonds = 'lj/coul 0.0 0.0 1.0 dihedral yes'

        self.ff_data, self.bond_increments = read_compass_params.read(
            open(ff_file_path))
        self.type_resolver = typing.TypeResolver(compasstypes.data)
예제 #2
0
	def __init__(self, gromacs_dir, label='opls-aa', pair_cutoff=10.0, kspace=False, **kwargs):
		LAMMPSBase.__init__(self, label, **kwargs)
		
		self.parameters.units          = 'real'
		if kspace:
			self.parameters.pair_style     = 'lj/cut/coul/long %f' % pair_cutoff
			self.parameters.kspace_style   = 'ewald 0.0001'
		else:
			self.parameters.pair_style     = 'lj/cut/coul/cut %f' % pair_cutoff
		self.parameters.pair_modify    = 'mix geometric'
		self.parameters.bond_style     = 'harmonic'
		self.parameters.angle_style    = 'harmonic'
		self.parameters.dihedral_style = 'multi/harmonic'
		#self.parameters.improper_style = 'harmonic'
		self.parameters.special_bonds  = 'lj/coul 0.0 0.0 0.5'
		
		# Read force field file
		ffnonbonded = os.path.join(gromacs_dir, 'oplsaa.ff', 'ffnonbonded.itp')
		ffbonded = os.path.join(gromacs_dir, 'oplsaa.ff', 'ffbonded.itp')
		
		self.ff_data, self.charges = read_gromacs_params.read((ffnonbonded, ffbonded), return_charges=True)
		self.type_resolver = typing.TypeResolver(oplsaatypes.data)
		
		# Add parameters for flexible TIP3P water
		self.ff_data.add('bond', SequenceType(['OW', 'HW']), 'Bond Coeffs', [450, 0.9572])
		self.ff_data.add('angle', SequenceType(['HW', 'OW', 'HW']), 'Angle Coeffs', [55, 104.52])
예제 #3
0
	def __init__(self, gromacs_dir, label='amber', inner_cutoff = 8.0, outer_cutoff=10.0, **kwargs):
		LAMMPSBase.__init__(self, label, **kwargs)
		
		self.parameters.units          = 'real'
		self.parameters.pair_style     = 'lj/charmm/coul/charmm %f %f' % (inner_cutoff, outer_cutoff)
		self.parameters.bond_style     = 'harmonic'
		self.parameters.angle_style    = 'harmonic'
		self.parameters.dihedral_style = 'charmm'
		#self.parameters.improper_style = 'harmonic'
		self.parameters.special_bonds  = 'amber'
		
		# Read force field file
		ffnonbonded = os.path.join(gromacs_dir, 'amber03.ff', 'ffnonbonded.itp')
		ffbonded = os.path.join(gromacs_dir, 'amber03.ff', 'ffbonded.itp')
		
		self.ff_data = read_gromacs_params.read((ffnonbonded, ffbonded))
		self.type_resolver = typing.TypeResolver(ambertypes.data)
예제 #4
0
    def __init__(self, label='clayff', pair_cutoff=(10.0, 10.0), **kwargs):
        LAMMPSBase.__init__(self, label, **kwargs)

        try:
            ljcut, coulcut = pair_cutoff
        except:
            ljcut = pair_cutoff
            coulcut = pair_cutoff

        self.parameters.units = 'real'
        self.parameters.pair_style = 'lj/cut/coul/long %f %f' % (ljcut,
                                                                 coulcut)
        #self.parameters.pair_style     = 'lj/cut/coul/cut %f %f' % (ljcut, coulcut)
        self.parameters.pair_modify = 'mix arithmetic'
        self.parameters.bond_style = 'harmonic'
        self.parameters.angle_style = 'harmonic'
        self.parameters.kspace_style = 'ewald/disp 0.0001'

        self.ff_data = ff_data
        self.type_resolver = typing.TypeResolver(clayff_types)
예제 #5
0
    def __init__(self,
                 ff_file_path,
                 label='charmm',
                 pair_cutoff=10.0,
                 auto_charges=False,
                 **kwargs):
        LAMMPSBase.__init__(self, label, **kwargs)

        self.parameters.units = 'real'
        self.parameters.pair_style = 'lj/charmm/coul/charmm 8.0 10.0'
        self.parameters.bond_style = 'harmonic'
        self.parameters.angle_style = 'charmm'
        self.parameters.dihedral_style = 'charmm'
        self.parameters.improper_style = 'harmonic'
        self.parameters.special_bonds = 'charmm'

        # Read force field file
        self.ff_data = read_charmm_params.read(open(ff_file_path))
        self.type_resolver = typing.TypeResolver(charmmtypes.data)

        self.auto_charges = auto_charges