Date: 201810
Local time of day: 1801-2400
Location: SJC.Airport, CA
Light: Night
Aircraft: B737-700
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class C SJC
ATC / advisory: TRACON NCT
Reporter organization: Air Carrier
Reporter function: Pilot Flying; Captain
Reporter qualification: Flight Crew Air Transport Pilot (ATP); Flight Crew Multiengine; Flight Crew Commercial; Flight Crew Instrument
Human factors: Situational Awareness
Second reporter function: Pilot Not Flying; First Officer
Anomaly: Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Air Traffic Control
When detected: In-flight
Result: Air Traffic Control Issued Advisory / Alert; Air Traffic Control Issued New Clearance; Flight Crew Became Reoriented; Flight Crew Returned To Clearance
Contributing factors: Human Factors
Primary problem: Human Factors

Narrative: An amended clearance for the SJC 2 Departure instead of the filed LOUPE 4 was noted and inserted into the route. As Captain; I completed the First Officer duties as he went into the terminal to find food and to stretch his legs. When he returned; I advised him of changes and he reviewed his preflight requirements as well as review the new departure SID assignment. There were no other abnormalities noted with the preflight. A review of the departure was briefed. The legs were correct in CDNU as well as and visually confirmed in the DU. Approaching the departure runway; I attempted to select LNAV and was unable. I cycled the F/D for both the Captain and First Officer thinking this might help. It did not as I still could not select LNAV.We were cleared for takeoff. I elected to takeoff as the legs had been reviewed to be correct and the display showed what I believed to be the correct path on the departure. Passing 400 feet AGL; I called for LNAV and at this point; it engaged. Passing approximately 1;000 feet AGL; the F/D commanded a right turn which was what the SID graphically showed. While in the turn; ATC queried as to why we were turning early. Their question seemed to contradict our 'new' assigned SID. We were given vectors and I believe a new assigned lower altitude. We were soon passed to a different controller and we questioned him if they were aware of our new assigned SID. He said they were but we had started our right turn earlier than the 1.8 DME stated in the SID and we were conflicting with another flight who departed in front of us. After a few vectors we were given direct SJC and the rest of the flight was uneventful.I trusted automation too much. Even though the legs were discussed and confirmed; I should have tuned the VOR to the appropriate NAVAID as well as placed a 1.8 ring on the fix page to know exactly where the turn should have occurred. I also should have slowed down prior to departure to determine the reason for not being able to select LNAV prior to departure.


Second narrative: [Report narrative contained no additional information.]


Synopsis: B737-700 flight crew reported a track deviation occurred departing SJC.